0
$\begingroup$

Rosanswers logo

Hi,

I'm trying to record all the topics on ros with rosbag, but there are some topics that I don't want, for exemple /cmd_vel and all the topics releted to the camera /camera/*.

I have tried with rosbag record -a -x "/cmd_vel" -x "/camera(.)" and it doesn't work, but if i try it separatley it does work and it donsen't record /cmd_vel or /camera is there some command to exclude from the record more than one topic or types of topics?

Thanks.


Originally posted by apalomer on ROS Answers with karma: 318 on 2011-12-07

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

How about this:

  • rosbag record -a -x "((/cmd_vel)|(/camera(.*)))"

You can logically control the topics to exclude, using & or |, as you would in python


Originally posted by phil0stine with karma: 682 on 2011-12-08

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Mac on 2011-12-08:
Give or take the fact that getting regular expressions written down correctly (in shell, at that) can be a pain. I'd suggest a few minutes with xargs.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.