-
Notifications
You must be signed in to change notification settings - Fork 64
RSDK-6011 - Add Motion Expose Paths project RPC methods #500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nits, but LGTM!
src/viam/services/motion/client.py
Outdated
destination (GeoPoint): The destination point | ||
movement_sensor_name (ResourceName): The ``MovementSensor`` which will be used to check robot location | ||
obstacles (Optional[Sequence[GeoObstacle]], optional): Obstacles to be considered for motion planning. Defaults to None. | ||
heading (Optional[float], optional): Compass heading to achieve at the destination, in degrees [0-360). Defaults to None. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: in degrees [0-360)
ends with )
instead of ]
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be on purpose -- I assume it's set notation? 0 is inclusive, 360 is not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope, @purplenicole730 was right, was just a typo
src/viam/services/motion/client.py
Outdated
obstacles (Optional[Sequence[GeoObstacle]], optional): Obstacles to be considered for motion planning. Defaults to None. | ||
heading (Optional[float], optional): Compass heading to achieve at the destination, in degrees [0-360). Defaults to None. | ||
linear_meters_per_sec (Optional[float], optional): Linear velocity to target when moving. Defaults to None. | ||
angular_deg_per_sec (Optional[float], optional): Angular velocity to target when turning. Defaults to None. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the extra optional
in Optional[float], optional
for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure, I was copying the pattern from move_on_globe
which this is based on but which I didn't write. should this be just Optional[float]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
src/viam/services/motion/client.py
Outdated
) -> ListPlanStatusesResponse: | ||
"""**Experimental** | ||
Returns the status of plans created by MoveOnGlobe requests that are executing | ||
OR are part of an execution which changed it statewithin the a 24HR TTL OR until the robot reinitializes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...which changed its state within a 24HR TTL...
src/viam/services/motion/client.py
Outdated
extra = {} | ||
|
||
if only_active_plans is None: | ||
only_active_plans = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not default it to False
instead of None
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM % Nicole's nits
Ticket
Note:
New methods are annotated as Experimental until the RPC definition of MoveOnGlobe is changed to be that of MoveOnGlobeNew.
Follow up PR will rename
move_on_globe_new
tomove_on_globe
& delete the oldmove_on_globe
& remove the Experimental annotations.I'm making these changes now so I can confirm that the docs update links to the python documentation work as expected.
Changes:
move_on_globe_new
, marked as Experimentalstop_plan
, marked as Experimentalget_plan
, marked as Experimentallist_plan_statuses
, marked as Experimental