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

Does rosservice support custom tab completion?

asked 2019-12-16 15:31:32 -0500

billtheplatypus gravatar image

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-12-16 16:56:15 -0500

tfoote gravatar image

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.

edit flag offensive delete link more

Comments

I guessed this would be the case, but I hoped there was a workaround.

billtheplatypus gravatar image billtheplatypus  ( 2019-12-16 17:47:29 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2019-12-16 15:31:32 -0500

Seen: 169 times

Last updated: Dec 16 '19