一、查看.bag文件内部信息

rosbag info *.bag
提取ROS .bag文件中的图片

二、根据信息创建.launch文件

提取ROS .bag文件中的图片

` <launch>
      <node pkg="rosbag" type="play" name="rosbag" args="-d 2 /home/prince/stereo_calibra.bag"/>
      <node name="extract" pkg="image_view" type="extract_images" respawn="false" output="screen" cwd="ROS_HOME">
        <remap from="image" to="/img_right"/>
      </node>
 </launch>`

将文件中阴影部分改为.bag文件路径。
将第五行 <remap from="image" to="/img_right"/>中/img_right改为想要读取的topic名称。

三、解码

在命令行输入roslaunch export.launch进行解码。
解码后文件会保存在/.ros目录下。

相关文章:

  • 2021-11-30
  • 2021-06-16
  • 2021-11-17
  • 2021-07-03
  • 2022-12-23
  • 2021-04-11
  • 2022-02-06
  • 2023-01-12
猜你喜欢
  • 2022-12-23
  • 2022-01-10
  • 2022-12-23
  • 2022-12-23
  • 2021-11-12
  • 2022-12-23
相关资源
相似解决方案