ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The content in the demos (https://github.com/ros2/demos) repository are usually technical demos or code we referenced in our technical demos. Eventually the demos may get refactored to some where else or just dropped entirely, but for now they are safe to study and use as examples. They are kept up-to-date and are tested regularly.

The examples (https://github.com/ros2/examples) repository is meant to be a long standing "cookbook" for how to do common things with ROS 2. As much as possible they're meant to be "copy-paste-edit"-able, as a starting point for various tasks. And to that end they are built but not extensively tested (as that would be invasive to the examples or their cmake code) and are light on explanatory comments.

There's also a tutorials (https://github.com/ros2/tutorials) repositories which is not up-to-date right now, but in the future will contain code which is used in tutorials (like the ROS 1 versions, e.g. https://wiki.ros.org/ROS/Tutorials/WritingPublisherSubscriber%28c%2B%2B%29). In contrast to the examples they will be highly commented and have comprehensive automated tests (like the demos), as we'll be referencing their code in stylized documentation (again like the ROS 1 tutorial I linked to again). Also these tutorials will likely show one good way to do things, where as the examples have lots of different styles demonstrated, e.g. the examples have a version of subscribing which uses a free function, a class method, and a lambda, etc. where as the tutorial might just show one that we recommend, maybe the free function or lambda for simplicity.

Sorry, I know it's a bit unclear at the moment, but it's still a work in progress, and the above is the vision we had for it long term.

The content in the demos (https://github.com/ros2/demos) repository are usually technical demos or code we referenced in our technical demos. Eventually the demos may get refactored to some where else or just dropped entirely, but for now they are safe to study and use as examples. They are kept up-to-date and are tested regularly.

The examples (https://github.com/ros2/examples) repository is meant to be a long standing "cookbook" for how to do common things with ROS 2. As much as possible they're meant to be "copy-paste-edit"-able, as a starting point for various tasks. And to that end they are built but not extensively tested (as that would be invasive to the examples or their cmake code) and are light on explanatory comments.

There's also a tutorials (https://github.com/ros2/tutorials) repositories repository which is not up-to-date right now, but in the future will contain code which is used in tutorials (like the ROS 1 versions, e.g. https://wiki.ros.org/ROS/Tutorials/WritingPublisherSubscriber%28c%2B%2B%29). In contrast to the examples they will be highly commented and have comprehensive automated tests (like the demos), as we'll be referencing their code in stylized documentation (again like the ROS 1 tutorial I linked to again). Also these tutorials will likely show one good way to do things, where as the examples have lots of different styles demonstrated, e.g. the examples have a version of subscribing which uses a free function, a class method, and a lambda, etc. where as the tutorial might just show one that we recommend, maybe the free function or lambda for simplicity.

Sorry, I know it's a bit unclear at the moment, but it's still a work in progress, and the above is the vision we had for it long term.