I have made services, actions, etc... for performing functions of my robot, now what is the best way to bring them together?
I am fairly new to ros2 and it has been a big learning curve but I have developed a handful of mainly services and actions for performing various functions like reading sensors or moving something but I don't really have a clear picture of how I should use them all simultaneously at like the top level of abstraction.
Is this something that is meant to be covered by a ros2 pattern or concept? The only idea I really have is to make one top level node which contains many clients but it just does not feel like a great solution because the clients are kind of code heavy so the file will just get very lengthy fast. Is there a better way?
Instead of one "top level" node, why not have a top level package whose
CMakeLists.txt
andpackage.xml
include the package(s) containing your services and actions? And that top level package can have as many nodes you wantIam not sure if this is what you are looking for but have a look here smach. Its a high level state machine approach. There is also a c++ "version" of this. I only know it for ros1, but as it is as useful a high level concept I would assume there is ros2 development going on as well.