当前位置: 代码迷 >> 综合 >> rosbag使用简介
  详细解决方案

rosbag使用简介

热度:78   发布时间:2023-10-22 03:40:50.0

话题录制:
录制所有发布出来的话题,此时默认将话题保存在一个以当时时间戳命名的文件夹中:

$ rosbag record -a

录制指定话题:

$ rosbag record /topic1 /topic12

话题回放:
基本功能:

$ rosbag play <your bagfile name>

等待一定时间之后发布bag文件中的内容

$ rosbag play <your bagfile name> -d <delay time>

按一定频率回放,-r选项用来设定消息发布速率,如下面命令则表示以3倍原始速率发布话题

$ rosbag play -r 3 <your bagfile name>

回放指定话题:

$ rosbag play <your bagfile name> --topics <topics>

其他指令:
展示bag文件中所包含话题的名称、类型和消息数量:

$ rosbag info <your bagfile name>


 

  相关解决方案