-
Notifications
You must be signed in to change notification settings - Fork 200
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
Cli tools documentation #653
Conversation
Signed-off-by: CursedRock17 <[email protected]>
Signed-off-by: CursedRock17 <[email protected]>
Signed-off-by: CursedRock17 <[email protected]>
Signed-off-by: CursedRock17 <[email protected]>
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 tried running this with rosdoc2 and I don't think that these are being picked up by sphinx in ROS 2 and rendered. I think this will need a rosdoc2.yaml config setup to pick up these resources.
tf2_ros/docs/source/index.rst
Outdated
- Pass the :class:`tf2_ros.Buffer` to the constructor of :class:`tf2_ros.TransformListener`. | ||
- Optionally, pass a :class:`ros.NodeHandle` (otherwise TransformListener will connect to the node for the process). | ||
- Optionally, specify if the TransformListener runs in its own thread or not. | ||
* **tf2_ros::Buffer::transform** is the main method for applying transforms. |
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.
Do these still create links to the Doxygen content?
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.
Right now the loacl links are done through rst which puts them next to what we're trying to list. I assumed this would be the easiest thing to do when it came to overall documentation.
Here's a video of what it should look like:
Geometry2_Docs.mov
To recreate do the following in the terminal
- Clone the repo
cd tf2_ros/docs
make html
rosdoc2 build --package-path ./..
rosdoc2 open ./docs_output/tf2_ros/index.html
- Run it on the web so something like
python3 -m http.server
will work for localhost
Are packages like rosdoc2
, exhale
, and breathe
able to run on the docs, or is this overengineered?
Signed-off-by: CursedRock17 <[email protected]>
I've recreated the |
Signed-off-by: CursedRock17 <[email protected]>
Signed-off-by: CursedRock17 <[email protected]>
Signed-off-by: CursedRock17 <[email protected]>
Signed-off-by: CursedRock17 <[email protected]>
Signed-off-by: CursedRock17 <[email protected]>
Signed-off-by: CursedRock17 <[email protected]>
Signed-off-by: CursedRock17 <[email protected]>
This pull request has been mentioned on ROS Discourse. There might be relevant details there: https://discourse.ros.org/t/nomenclature-of-tf-echo-and-tf-listener/36985/6 |
I made here some suggestions CursedRock17#1 |
Signed-off-by: CursedRock17 <[email protected]> Removing exhale Signed-off-by: CursedRock17 <[email protected]> Fixing doxyfile Signed-off-by: CursedRock17 <[email protected]> Removing extra picture Signed-off-by: CursedRock17 <[email protected]>
bf86132
to
8e38be6
Compare
Signed-off-by: CursedRock17 <[email protected]>
I went ahead and added those changes you suggested, along with getting the Sphinx and Doxygen docs working for both python and C++ |
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 can see these errors:
/home/ahcorde/ros2_rolling/src/ros2/geometry2/tf2_ros/doc/index.rst:8: WARNING: undefined label: 'exhale_class_classtf2__ros_1_1_transform_broadcaster'
/home/ahcorde/ros2_rolling/src/ros2/geometry2/tf2_ros/doc/index.rst:14: WARNING: undefined label: 'exhale_class_classtf2__ros_1_1_static_transform_broadcaster'
/home/ahcorde/ros2_rolling/src/ros2/geometry2/tf2_ros/doc/index.rst:20: WARNING: undefined label: 'exhale_class_classtf2__ros_1_1_buffer'
/home/ahcorde/ros2_rolling/src/ros2/geometry2/tf2_ros/doc/index.rst:20: WARNING: undefined label: 'exhale_class_classtf2__ros_1_1_buffer_interface'
/home/ahcorde/ros2_rolling/src/ros2/geometry2/tf2_ros/doc/index.rst:20: WARNING: undefined label: 'exhale_class_classtf2__ros_1_1_transform_listener'
/home/ahcorde/ros2_rolling/src/ros2/geometry2/tf2_ros/doc/index.rst:32: WARNING: undefined label: 'exhale_class_classtf2__ros_1_1_message_filter'
tf2_ros/docs/source/tf2_ros2.rst
Outdated
@@ -39,7 +39,7 @@ Exceptions | |||
.. exception:: tf2.InvalidArgumentException | |||
|
|||
subclass of :exc:`TransformException`. | |||
Raised when the arguments to the method are called improperly formed. An example of why this might be raised is if an argument is nan. | |||
Raised when the arguments to the method are called improperly formed. An example of why this might be raised is if an argument is nan. |
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.
Raised when the arguments to the method are called improperly formed. An example of why this might be raised is if an argument is nan. | |
Raised when the arguments to the method are called improperly formed. An example of why this might be raised is if an argument is nan. |
tf2_ros/doc/cli_tools.rst
Outdated
|
||
ros2 run turtlesim turtle_teleop_key | ||
|
||
Now using tf2_echo to take a look at the different transformations occuring between two frames |
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.
Now using tf2_echo to take a look at the different transformations occuring between two frames | |
Now using tf2_echo to take a look at the different transformations occurring between two frames |
tf2_ros/doc/cli_tools.rst
Outdated
|
||
1. tf2_echo | ||
^^^^^^^^^^^ | ||
tf2_echo is the simplest tool to look at the numeric values of a specific transform. tf2_echo takes two arguments: the source frame and the target frame. The output of tf2_echo is the target frame in comparison to the source frame. E.g. to get the transformation from turtle1 to turtle2, set up the turtlesim example with: |
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.
tf2_echo is the simplest tool to look at the numeric values of a specific transform. tf2_echo takes two arguments: the source frame and the target frame. The output of tf2_echo is the target frame in comparison to the source frame. E.g. to get the transformation from turtle1 to turtle2, set up the turtlesim example with: | |
``tf2_echo`` is the simplest tool to look at the numeric values of a specific transform. ``tf2_echo`` takes two arguments: the source frame and the target frame. The output of ``tf2_echo`` is the target frame in comparison to the source frame. E.g. to get the transformation from turtle1 to turtle2, set up the turtlesim example with: |
tf2_ros/doc/cli_tools.rst
Outdated
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
`rqt_tf_tree <https://github.com/ros-visualization/rqt_tf_tree/tree/master>`_ provides a GUI to inspect tf tree during runtime. | ||
|
||
A simple tree from the tutorial in 1. tf2_echo looks like: |
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.
A simple tree from the tutorial in 1. tf2_echo looks like: | |
A simple tree from the tutorial in 1. ``tf2_echo`` looks like: |
tf2_ros/doc/cli_tools.rst
Outdated
|
||
2. tf2_monitor | ||
^^^^^^^^^^^^^^ | ||
tf2_monitor can give you a lot of detailed information about a specific transformation you care about. The monitor will break down the chain between two frames into individual transforms, and provide statistics about timing, broadcasters, etc. |
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.
tf2_monitor can give you a lot of detailed information about a specific transformation you care about. The monitor will break down the chain between two frames into individual transforms, and provide statistics about timing, broadcasters, etc. | |
``tf2_monitor`` can give you a lot of detailed information about a specific transformation you care about. The monitor will break down the chain between two frames into individual transforms, and provide statistics about timing, broadcasters, etc. |
tf2_ros/doc/cli_tools.rst
Outdated
|
||
ros2 run tf2_ros static_transform_publisher [--x X] [--y Y] [--z Z] [--yaw Yaw] [--pitch Pitch] [--roll Roll] --frame_id Frame --child_frame_id Child_Frame | ||
|
||
Static_transform_publisher can also publish a static coordinate transform to tf2 using an x/y/z offset in meters and quaternion. |
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.
Static_transform_publisher can also publish a static coordinate transform to tf2 using an x/y/z offset in meters and quaternion. | |
``static_transform_publisher`` can also publish a static coordinate transform to tf2 using an x/y/z offset in meters and quaternion. |
tf2_ros/doc/cli_tools.rst
Outdated
|
||
ros2 run tf2_ros static_transform_publisher [--x X] [--y Y] [--z Z] [--qx QX] [--qy QY] [--qz QZ] [--qw QW] --frame_id Frame --child_frame_id Child_Frame | ||
|
||
Static_transform_publisher is designed both as a command-line tool for manual use, as well as for use within roslaunch files for setting static transforms. For example: |
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.
Static_transform_publisher is designed both as a command-line tool for manual use, as well as for use within roslaunch files for setting static transforms. For example: | |
``static_transform_publisher`` is designed both as a command-line tool for manual use, as well as for use within roslaunch files for setting static transforms. For example: |
tf2_ros/doc/conf.py
Outdated
'Miscellaneous'), | ||
] | ||
|
||
# Configuration for breathe to link doxygen |
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.
remove ?
tf2_ros/doc/index.rst
Outdated
1.3 Filtering Transforms | ||
------------------------ | ||
|
||
tf2_ros provides a feature which allows to pass only the messages once there is transform data available. This follows the pattern from the message_filters package. Here is a brief list of functions that the user is most likely to use. |
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.
tf2_ros provides a feature which allows to pass only the messages once there is transform data available. This follows the pattern from the message_filters package. Here is a brief list of functions that the user is most likely to use. | |
``tf2_ros`` provides a feature which allows to pass only the messages once there is transform data available. This follows the pattern from the ``message_filters`` package. Here is a brief list of functions that the user is most likely to use. |
tf2_ros/doc/index.rst
Outdated
1.4 Exceptions | ||
-------------- | ||
|
||
Here is the list of exceptions that can be thrown by tf2_ros and are inherited from tf2. |
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.
Here is the list of exceptions that can be thrown by tf2_ros and are inherited from tf2. | |
Here is the list of exceptions that can be thrown by ``tf2_ros`` and are inherited from tf2. |
Signed-off-by: CursedRock17 <[email protected]>
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 made these changes to be able to get the links
Signed-off-by: CursedRock17 <[email protected]>
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.
Linters are failing https://ci.ros2.org/job/ci_linux/21127/
Signed-off-by: CursedRock17 <[email protected]>
This Pull Request is a direct link to issue #550 which looks to improve documentation, specifically in CLI commands like
tf2_echo
. In this PR, all tools and documentation related to tf2_ros are put in one central place, hopefully https://docs.ros.org/.