我是大天然的搬運工。。。。express
rosbag record -a
rosbag record -o session1 /chatter
rosbag record -O session2_090210.bag /chatter
rosbag record --duration=30 /chatter rosbag record --duration=5m /chatter rosbag record --duration=2h /chatter
rosbag record --split --size=1024 /chatter rosbag record --split --duration=30 /chatter rosbag record --split --duration=5m /chatter rosbag record --split --duration=2h /chatter
rosbag record -h
rosbag info session*.bag
rosbag info -y /path/to/my.bag
rosbag info -h
rosbag play recorded1.bag recorded2.bag
注: 若是播放兩個及以上bag包,那麼他們會第一幀對其,後面根據第一幀時間戳的時間差播放。session
rosbag play -s 5 recorded1.bag
rosbag play -l recorded1.bag
rosbag play -r 10 recorded1.bag
rosbag play -h
filter <in-bag> <out-bag> <expression>
eg.oop
rosbag filter my.bag only-tf.bag "topic == '/tf'"
rosbag filter my.bag out.bag "topic == '/tf' or topic == '/tf2'"
rosbag filter my.bag out.bag "t.to_sec() >= 123444.77 and t.to_sec() <= 234545.88"
rosbag filter -h
rosbag compress is a command-line tool for a backup of bag file. Currently, there are two supported formats:BZ2 and LZ4. BZ2 is selected by default. BZ2 generally produces smaller bags than LZ4, However, BZ2 is typically much slower than LZ4.code
compress <bag-files>
rosbag compress *.bag
rosbag compress --lz4 *.bag
rosbag compress -h
decompress <bag-files>
rosbag decompress *.bag