ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

rosbag record

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

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 -0600

phil0stine gravatar image

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

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 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


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

Seen: 1,183 times

Last updated: Dec 08 '11