-
Notifications
You must be signed in to change notification settings - Fork 52
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
DOCS-2313: Clean up gantry, camera, board, encoder and arm pages for docs parsing #631
Merged
sguequierre
merged 5 commits into
viamrobotics:main
from
sguequierre:DOCS-2313/py-sdk-upstream-fixes
Jun 11, 2024
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
eefb7e0
Clean up gantry and arm pages for docs parsing
sguequierre 2b76836
Remove extra and timeout parameters and fix line spacing
sguequierre 9bfece4
Sweep camera page
sguequierre 7a3f6c1
Make board fixes
sguequierre ca544f4
Add encoder fix
sguequierre File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ async def get_end_position( | |
**kwargs, | ||
) -> Pose: | ||
""" | ||
Get the current position of the end of the arm expressed as a Pose. | ||
Get the current position of the end of the arm expressed as a ``Pose``. | ||
|
||
:: | ||
|
||
|
@@ -44,8 +44,14 @@ async def get_end_position( | |
# Get the end position of the arm as a Pose. | ||
pos = await my_arm.get_end_position() | ||
|
||
Args: | ||
extra (Optional[Dict[str, Any]]): Extra options to pass to the underlying RPC call. | ||
timeout (Optional[float]): An option to set how long to wait (in seconds) before calling a time-out and closing the underlying RPC call. | ||
Returns: | ||
Pose: The location and orientation of the arm described as a Pose. | ||
Pose: A representation of the arm’s current position as a 6 DOF (six degrees of freedom) pose. | ||
The ``Pose`` is composed of values for location and orientation with respect to the origin. | ||
Location is expressed as distance, which is represented by x, y, and z coordinate values. | ||
Orientation is expressed as an orientation vector, which is represented by o_x, o_y, o_z, and theta values. | ||
""" | ||
... | ||
|
||
|
@@ -72,7 +78,11 @@ async def move_to_position( | |
await my_arm.move_to_position(pose=examplePose) | ||
|
||
Args: | ||
pose (Pose): The destination Pose for the arm. | ||
pose (Pose): The destination ``Pose`` for the arm. The ``Pose`` is composed of values for location and orientation with respect to the origin. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The linter is complaining about this line (and some others) that they're too long; can we cut this down or break it into multiple lines? |
||
Location is expressed as distance, which is represented by x, y, and z coordinate values. | ||
Orientation is expressed as an orientation vector, which is represented by o_x, o_y, o_z, and theta values. | ||
extra (Optional[Dict[str, Any]]): Extra options to pass to the underlying RPC call. | ||
timeout (Optional[float]): An option to set how long to wait (in seconds) before calling a time-out and closing the underlying RPC call. | ||
""" | ||
... | ||
|
||
|
@@ -105,6 +115,8 @@ async def move_to_joint_positions( | |
|
||
Args: | ||
positions (JointPositions): The destination ``JointPositions`` for the arm. | ||
extra (Optional[Dict[str, Any]]): Extra options to pass to the underlying RPC call. | ||
timeout (Optional[float]): An option to set how long to wait (in seconds) before calling a time-out and closing the underlying RPC call. | ||
""" | ||
... | ||
|
||
|
@@ -126,8 +138,12 @@ async def get_joint_positions( | |
# Get the current position of each joint on the arm as JointPositions. | ||
pos = await my_arm.get_joint_positions() | ||
|
||
Args: | ||
extra (Optional[Dict[str, Any]]): Extra options to pass to the underlying RPC call. | ||
timeout (Optional[float]): An option to set how long to wait (in seconds) before calling a time-out and closing the underlying RPC call. | ||
Returns: | ||
JointPositions: The current JointPositions for the arm. | ||
JointPositions: The current ``JointPositions`` for the arm. | ||
``JointPositions`` can have one attribute, ``values``, a list of joint positions with rotational values (degrees) and translational values (mm). | ||
""" | ||
... | ||
|
||
|
@@ -148,6 +164,10 @@ async def stop( | |
|
||
# Stop all motion of the arm. It is assumed that the arm stops immediately. | ||
await my_arm.stop() | ||
|
||
Args: | ||
extra (Optional[Dict[str, Any]]): Extra options to pass to the underlying RPC call. | ||
timeout (Optional[float]): An option to set how long to wait (in seconds) before calling a time-out and closing the underlying RPC call. | ||
""" | ||
... | ||
|
||
|
@@ -193,7 +213,7 @@ async def get_kinematics( | |
|
||
Returns: | ||
Tuple[KinematicsFileFormat.ValueType, bytes]: A tuple containing two values; the first [0] value represents the format of the | ||
file, either in URDF format or Viam's kinematic parameter format (spatial vector algebra), and the second [1] value | ||
represents the byte contents of the file. | ||
file, either in URDF format or Viam's kinematic parameter format (spatial vector algebra), and the second [1] value | ||
represents the byte contents of the file. | ||
""" | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The idiom in python is to not provide docstring comments for
extra
andtimeout
, so we should remove these (and the same comments in below methods). It looks like the same comment is used here as inmotion
; sorry for the confusion! Themotion
doc comments should probably get removed at some point.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.
Ok, thank you!