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

rosbag record

asked 2011-12-07 22:20:39 -0500

apalomer gravatar image


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?


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2011-12-08 01:56:06 -0500

phil0stine gravatar image

updated 2011-12-08 02:32:19 -0500

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

edit flag offensive delete link more


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.
Mac gravatar image Mac  ( 2011-12-08 02:36:03 -0500 )edit

Question Tools


Asked: 2011-12-07 22:20:39 -0500

Seen: 1,314 times

Last updated: Dec 08 '11