1.命令
-
1.采集数据
- 采集所有话题:rosbag record -a
- 采集部分话题: rosbag record /chatter -o chat -o及后面的参数,是用来给bag文件命名的
- 采集特定节点订阅的话题:rosbag record --node=/joy_teleop
-
2.查看bag信息
- rosbag info /path/to/my.bag
- 查看特定的信息:rosbag info -y -k duration /path/to/my.bag
-
3.播放bag
- rosbag play recorded1.bag
- 同步:rosbag play --clock recorded1.bag
- 10倍速度播放:rosbag play -r 10 recorded1.bag
-
4.取子包
- 话题:rosbag filter in.bag out.bag “topic == ‘/tf’ or topic == ‘/tf2’”
- 时间:rosbag filter in.bag out.bag “t.to_sec() >= 123.4 and t.to_sec() <= 234.5”
- noetic版本:rosbag filter in.bag out.bag “t.secs > 60”
2.问题
- 1.使用rosbag filter出现
UnicodeDecodeError: &