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

Can someone teach me how to love ROS2?

asked 2022-03-16 09:27:33 -0500

Gijs van Oort gravatar image

... Or, at least, like it? ... Or, at the very least, not hate it?

I've worked with ROS2 for about a year now, but, to be honest, I hate it... I really like the concept of having communicating nodes, but too often I get frustrated by, in my eyes, stupid design choices made by the ROS2 developers, which make me think "If they had done it this-and-that way, everything would have been so much easier". I think my frustration might be relieved a lot if I understand why certain choices were made. I'm using ROS2 Galactic on Linux, programming only in C++. I consider myself a good programmer (for non-ROS stuff, that is :-) ). I had no prior experience with ROS.

I think that almost all of my questions boil down to one single question:

  • Why is ROS2 not just a normal library that you can include in your own project (e.g., like SDL)?
    (plus some binaries for things like inspection etc, like ros2 topic)
    Just add -lROS2 to your link options and you're done (and you have none of the frustrations listed below)...

Or, more closely related to some of the specific frustrations I have:

  1. Why is everything structured into packages? To group related parts belonging to one project? If so, then why should custom messages be in a separate package1? (and why do all .cpp files for all executables mix up in the src directory2?

  2. Why do you need a separate build tool (colcon) to compile ROS2 stuff? Why isn't just make or cmake good enough? This makes it extra challenging to integrate into an IDE (depending on which IDE of course).

  3. Why is compiling so terribly slow? On a new laptop it takes 6 seconds to compile just a 100 line program (normal gcc would take only the blink of an eye). This is especially annoying when developing on a Raspberry Pi, which creates even longer compile times.

  4. Why does it take more than 100 files in the install directory to just supply one executable?

  5. Why isn't it possible to build and run your program in the same terminal?

  6. Why is it necessary to . install/local_setup.sh?

  7. Why can't I just run my own executable instead of leaving it to ros2 run to execute it?

  8. Why is it so hard to configure the project (CMakeLists.txt + package.xml)? I only can get them right by heavy googling and trial-and-erroring the suggestions from forums. Error messages are too cryptic or don't relate to the actual problem and the building process sometimes just stops working after having worked for several days (seemingly without any good reason).

I guess that there's a good reason for all of the above questions, which outweighs the burden of the extra complexity introduced (when compared to just being a simple library as described abobve). I hope that, by understanding these reasons, I will appreciate the design decisions more, and hopefully start to like or love ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2022-03-16 10:35:54 -0500

ljaniec gravatar image

I think you already know this, but the posts there https://design.ros2.org/ had a lot of useful answers and explanations for me (at least on the design choices, of course).

If you want have some real impact on everything, you can register on ROS Discourse and there discuss with the maintainers or even Technical Steering Committees and go to meetings of Working Groups of your choice too :)

edit flag offensive delete link more

Question Tools

4 followers

Stats

Asked: 2022-03-16 09:27:33 -0500

Seen: 229 times

Last updated: Mar 16 '22