Robotics StackExchange | Archived questions

Is autocompletion supported for rosbag record?

I was trying to record a bag file using rosbag record /my_topic. However, apparently, there is not autocompletion for the topics, if I click on the tab key, after having written rosbag record. Is this the normal behaviour? Actually, I can see the ROS topics (including the ones I am interested in recording) by issuing the command rostopic list. Autocompletion seems to be working for other commands.

Asked by nbro on 2019-03-02 07:27:49 UTC

Comments

Answers

I tried it on my machine. On ROS Melodic, the current autocompletion behaviour of rosbag record and other subcommands of rosbag is to insert a file name, so when you press the tab key, the computer inserts the name of the only file in the current directory or shows you a list of the files in the directory if you have more than one file. Nothing will be inserted if you don't have any file in the current directory.

Asked by holadepo on 2019-03-03 09:21:31 UTC

Comments

Ok, but I would like the autocompletion to work for existing ROS topics, not folder names.

Asked by nbro on 2019-03-03 09:23:47 UTC

I am not sure of how tab completion is configured, but I think this would have to be done by the developers of ROS. You may be able to configure it manually too, so I recommend you check online for how to do that.

Asked by holadepo on 2019-03-03 09:39:45 UTC

I just learnt that tab completion for ROS utilities is enabled by the rosbash package. You can check this page for more information.

Asked by holadepo on 2019-03-03 10:10:35 UTC