Ask Your Question
2

difference of ros2 demos and ros2 examples

asked 2019-03-09 06:53:16 -0600

vKuehn gravatar image

trying to work myself through the tutorials for ROS2 so I am new to it

Sometimes tutorials refer to ros2 demos and sometimes to ros2 examples and both are actively used.

Is that a historically grown thing ? if not when should I to look at which ?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2019-03-11 22:16:02 -0600

William gravatar image

updated 2019-03-11 22:17:04 -0600

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 ) 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/Wr... ). 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.

edit flag offensive delete link more
0

answered 2019-03-12 19:28:13 -0600

vKuehn gravatar image

thanks a lot for your detailed answer.

thought there is also a mix/link into the ros2 installation like for the AddTwoInts service. As you said it will be more clearer once more sorted and maybe easier to maintain for you also Your work on it is greatly appreciated !

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

4 followers

Stats

Asked: 2019-03-09 06:53:16 -0600

Seen: 122 times

Last updated: Mar 12