Python publisher/subscriber tutorial uses std_msgs/msg/String, which is marked as deprecated
Maintainers usually reply within 1 day
@abhishek5127-hash is already working on this.
Since Nov 20, 2026.
- #7505 by @abhishek5127-hash — open
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 65/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- python
- Domain
- documentation
Research direction
Read the rolling tutorial at source/ROS-Framework/client-libraries/Working-with-Client-Libraries/Writing-A-Simple-Py-Publisher-And-Subscriber.rst and compare it with the Jazzy version. Check the minimal_publisher and minimal_subscriber examples in ros2/examples and confirm how example_interfaces is declared as a dependency. Done means the chosen message type and dependency guidance are consistent across the tutorial and examples.
Written by the indexing model from the issue text.
Description
Description
The tutorial "Writing a simple publisher and subscriber (Python)" and the code it is
based on (rclpy/topics/minimal_publisher and minimal_subscriber in ros2/examples)
use std_msgs/msg/String.
That message is marked as deprecated in ros2/common_interfaces (std_msgs/msg/String.msg,
rolling):
# This was originally provided as an example message.
# It is deprecated as of Foxy
# It is recommended to create your own semantically meaningful message.
# However if you would like to continue using this please use the equivalent in example_msgs.
(I assume example_msgs means example_interfaces.) The example_interfaces/msg/String
definition adds that, if deploying it into a system, one should create a semantically
meaningful message type.
Where
- Tutorial source (rolling):
source/ROS-Framework/client-libraries/Working-with-Client-Libraries/Writing-A-Simple-Py-Publisher-And-Subscriber.rst
(the text, the code blocks and theexec_dependstep all mention std_msgs) - Same tutorial on the jazzy branch
- ros2/examples: rclpy/topics/minimal_publisher and minimal_subscriber (rolling and jazzy)
Question
Would you accept a change to use example_interfaces/msg/String in the tutorial and the
minimal examples? The alternative would be keeping std_msgs and adding a short note
that the message is meant for examples only and that real systems should define their own.
One thing I noticed: on a system with only ros-jazzy-ros-base installed,
ros2 interface show example_interfaces/msg/String returned "Unknown package", so the
tutorial would need to mention the extra dependency (the existing rosdep install step
would cover it through exec_depend).
I may be missing context on why std_msgs was kept, so I wanted to ask before sending a PR.
I am happy to prepare one for the docs and/or the examples if this direction makes sense.
Tested on: ROS 2 Jazzy, Ubuntu 24.04 (arm64 container).
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 1.4k
- Avg merge
- 18h 52m
- Merged PRs (30d)
- 119
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ros2/ros2_documentation
-
Rolling Ubuntu deb install page: add a temporary note directing Resolute users to the testing repositoryPossibly taken @fujitatomoya claimed this today. Open
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
ros2/ros2_documentation#7519 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ros2/ros2_documentation#7353 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 76/100
ros2/ros2_documentation#6567 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
ros2/ros2_documentation#6513 ·
Maintainers usually reply within 1 day
-
📝 Missing links in the "ROS for Beginners" section of docs.ros.orgPossibly taken @christophebedard claimed this 57 days ago. Open
ros2/ros2_documentation#7217 · 1 comment · 1 reaction · 1 assignee ·
Maintainers usually reply within 1 day
All issues in ros2/ros2_documentation
Similar issues
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gke-labs/kube-agents#7441 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
bug confirmed issue
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
open-webui/open-webui#35142 · 1 comment ·
Maintainers usually reply within 1 day