Update python publisher tutorial with links to relevant docs#6181
Update python publisher tutorial with links to relevant docs#6181EmmanuelMess wants to merge 1 commit intoros2:rollingfrom
Conversation
fujitatomoya
left a comment
There was a problem hiding this comment.
lgtm with green CI.
|
@christophebedard can i have a second review on this? |
source/Tutorials/Beginner-Client-Libraries/Writing-A-Simple-Py-Publisher-And-Subscriber.rst
Outdated
Show resolved
Hide resolved
source/Tutorials/Beginner-Client-Libraries/Writing-A-Simple-Py-Publisher-And-Subscriber.rst
Outdated
Show resolved
Hide resolved
source/Tutorials/Beginner-Client-Libraries/Writing-A-Simple-Py-Publisher-And-Subscriber.rst
Outdated
Show resolved
Hide resolved
source/Tutorials/Beginner-Client-Libraries/Writing-A-Simple-Py-Publisher-And-Subscriber.rst
Outdated
Show resolved
Hide resolved
source/Tutorials/Beginner-Client-Libraries/Writing-A-Simple-Py-Publisher-And-Subscriber.rst
Outdated
Show resolved
Hide resolved
source/Tutorials/Beginner-Client-Libraries/Writing-A-Simple-Py-Publisher-And-Subscriber.rst
Outdated
Show resolved
Hide resolved
This PR is OK, but, similar to what was mentioned in #4985 (comment), I would not systematically do this for other articles. Instead of writing `Node <{package_link(rclpy)}api/node.html>`__ classeverywhere to link to the API docs for {api(rclpy, rclpy.Node)} classand expands it to the correct page. For now, I think we're still generally working on making sure API docs are properly generated, which does mean changes to rosdoc2, but it mostly means fixing a lot of the packages (e.g., ros2/geometry2#857). Then we can think about how to create/find tooling to easily link to it from here. Otherwise the page we link to may not exist or the actual URL may change shortly after. |
|
I can look up for developing/incorporating a proper system for links in a seperate issue. Or help with something that's WIP. Can this be taken care on the URL side? Maintaining a database of URL matched with the doc links? |
cd29132 to
0eaa779
Compare
0eaa779 to
419088d
Compare
| self.i = 0 | ||
|
|
||
| ``timer_callback`` creates a message with the counter value appended, and publishes it to the console with ``get_logger().info``. | ||
| ``timer_callback`` creates a message with the counter value appended, publishes it, and prints it to the console with `get_logger() <https://docs.ros.org/en/rolling/p/rclpy/api/node.html#rclpy.node.Node.get_logger>`__'s `info() <{package_link(rclpy)}rclpy.impl.rcutils_logger.html#rclpy.impl.rcutils_logger.RcutilsLogger.info>`__ function. |
There was a problem hiding this comment.
| ``timer_callback`` creates a message with the counter value appended, publishes it, and prints it to the console with `get_logger() <https://docs.ros.org/en/rolling/p/rclpy/api/node.html#rclpy.node.Node.get_logger>`__'s `info() <{package_link(rclpy)}rclpy.impl.rcutils_logger.html#rclpy.impl.rcutils_logger.RcutilsLogger.info>`__ function. | |
| ``timer_callback`` creates a message with the counter value appended, publishes it, and prints it to the console with `get_logger() <{package_link(rclpy)}api/node.html#rclpy.node.Node.get_logger>`__'s `info() <{package_link(rclpy)}rclpy.impl.rcutils_logger.html#rclpy.impl.rcutils_logger.RcutilsLogger.info>`__ function. |
| You likely already have the ``rclpy`` and ``std_msgs`` packages installed as part of your ROS 2 system. | ||
| It's good practice to run ``rosdep`` in the root of your workspace (``ros2_ws``) to check for missing dependencies before building: | ||
| You likely already have the {package(rclpy)} and {package(std_msgs)} packages installed as part of your ROS 2 system. | ||
| It's good practice to run `rosdep <https://docs.ros.org/en/independent/api/rosdep/html/>`__ in the root of your workspace (``ros2_ws``) to check for missing dependencies before building: |
There was a problem hiding this comment.
I think I would prefer linking to the rosdep tutorial in the ROS 2 docs. That tutorial is a bit more user-friendly and up-to-date, and does link to https://docs.ros.org/en/independent/api/rosdep/html/
I would hold off for now. Please see #6186 (comment) |
Description
Update python publisher and subscriber tutorial with links to relevant documentation.
Addresses #4985
Did you use Generative AI?
No.
Additional Information
This first PR is to test the idea. Also see that rosdep's link is explicitly set because the macro doesn't work, see #6180.