Basic python publisher / subscriber tutorials only show ament_python
Issue Type
- [ ] 🐛 Bug / Problem
- [ ] ✏️ Typo / Grammar
- [ ] 📖 Outdated Content
- [ ] 🚀 Enhancement
Generated by Generative AI
No response
Distribution
No response
Description
Trying to onboard a number of users to ROS2. Along the way, they do this tutorial
https://docs.ros.org/en/kilted/Tutorials/Beginner-Client-Libraries/Writing-A-Simple-Py-Publisher-And-Subscriber.html
For our purposes it would be much better to teach users ament_cmake even for python packages as they are much more generalizable.
It seems similar to this creating a package tutorial selectors for how to build your python package, with minimal ament_python config or minimal ament_cmake config would be helpful.
Affected Pages/Sections
No response
Screenshots or Examples (if applicable)
No response
Suggested Fix
Explain both with selecting headings.
Additional Context
No response
Thanks for creating this issue. However, I'm a bit unsure. While that may be useful for some users, these are beginner tutorials, so we want to keep things simple. We also don't want to show multiple ways of doing the same thing; that tends to confuse (new) users.
At the very least, this tutorial would live somewhere else (i.e., not in the "beginner" tutorials) to avoid confusing new users, but I'm personally still not convinced.
as they are much more generalizable.
Can you share more?
Can you share more?
https://docs.ros.org/en/kilted/Tutorials/Beginner-Client-Libraries/Single-Package-Define-And-Use-Interface.html
Other beginner tutorials show how to define a message in the same package as write a node. This requires defining a package with cmake. If a user is told python nodes should be defined in packages using ament_python they will have no clue how to add anything on top.
A simple tutorial showing a package with basic subscriber/publisher in Python but using the general purpose package definition will be more generalizable.
Yeah I agree with @gftabor, having two ways to build packages with one only working for python is terrible even conceptually. Cmake can build cpp, python, and messages, making the setup.py approach entirely useless in comparison and just confuses people who already have to learn a billion things.
It also gives people the false impression that python nodes need to be built with ament_python which is false and results in a lot of unnecessary package splitting.
🧇 we briefly talked about this during our triage meeting earlier. I've added this to the agenda for the next ROS PMC meeting on Nov 4th, which you can join if you want.
This issue has been mentioned on Open Robotics Discourse. There might be relevant details there:
https://discourse.openrobotics.org/t/ros-pmc-minutes-for-november-11-2025/51100/1