话题录制:
录制全部发布出来的话题,此时默认将话题保存在一个以当时时间戳命名的文件夹中:
$ rosbag record -a1
录制指定话题:
$ rosbag record /topic1 /topic121
话题回放:
基本功能:
$ rosbag play <your bagfile name>1
等待必定时间以后发布bag文件中的内容
$ rosbag play <your bagfile name> -d <delay time>1
按必定频率回放,-r选项用来设定消息发布速率,以下面命令则表示以3倍原始速率发布话题
$ rosbag play -r 3 <your bagfile name>1
回放指定话题:
$ rosbag play <your bagfile name> --topics <topics>1
其余指令:
展现bag文件中所包含话题的名称、类型和消息数量:
$ rosbag info <your bagfile name>1
更加灵活的回放方式,例如回放除了某个话题之外的全部话题:
注意:rosbag的remap方法-----------rosbag
play ros.bag /image_raw:=/camera/image_raw