1. 程式人生 > >在roslaunch中通過rosbag執行bag檔案

在roslaunch中通過rosbag執行bag檔案

在launch檔案中可以用以下方法執行bag檔案


<launch>
  <!-- <remap from="/camera/depth_registered/camera_info" to="/camera/depth/camera_info"/> -->
  <!-- <remap from="/camera/depth_registered/image_raw" to="/camera/depth/image_raw"/> -->
  <node pkg="rosbag" type="play" name="playe" output="screen" args="--clock /home/zuo/database/tModel-P/calib/test/2017-10-18-21-30-41.bag"/>
  <!-- 注意這裡bag檔案的路徑必須為絕對路徑-->
</launch>


這樣就可以對bag檔案內的topic進行remap了。