Best practices for string commands

asked 2021-03-15 05:47:21 -0500

ramdambo gravatar image

updated 2021-03-15 05:48:54 -0500


I was wondering what best practices are for the use case that I want to send commands to a node that in turn is parsing the command and then moving the robot, performing other actions, etc.

E.g. I would send "move left" and the robot would move left.

My options are to either

a) send a command as a string via an action to an action server (as the actions can take a long time to execute) or

b) provide services for each command and call these remotely via rosservice

The second option seems like the more reasonable one but what bothers me is that it goes against ROS guidelines since the service call essentially performs a call to an action server that takes a long time (as stated in a))

What I am asking now is whether there are best practices for this kind of use case and whether I'm maybe on the wrong path design-wise ?

Thank you in advance.

edit retag flag offensive close merge delete