Does rosservice support custom tab completion?
I am currently implementing a rosservice that changes settings for a device. Settings are represented to the user as two strings, a name and a value. For convenience, both of these are strings. For example:
rosservice call /set_setting BOOT_DEVICE USB1
Because the node knows ahead of time valid choices for both the setting names and the value, it would be useful if it could provide tab completion when a user is calling the service from the command line. Is this possible with ROS?
Asked by billtheplatypus on 2019-12-16 16:31:32 UTC
Answers
rosservice provides tab completion based on the advertised types of the data. However there's not a way to get specific string values etc from the provider of the service. That would actually require having a parallel service to call to get the valid strings etc from the remote node.
I would suggest that you look at dynamic_reconfigure or ROS 2's parameters as an alternative with more informative content. Also you could simply write a specific front end for your application where you have this more constrained system instead of trying to use the fully generic rosservice script.
Asked by tfoote on 2019-12-16 17:56:15 UTC
Comments
I guessed this would be the case, but I hoped there was a workaround.
Asked by billtheplatypus on 2019-12-16 18:47:29 UTC
Comments