搞了一下午,终于把bag文件中数据储存为图片了,其实教程不难,只怪一直遇到bug,调来调去,终于好了
教程其实ros官网上给的很详细了:http://wiki.ros.org/rosbag/Tutorials/Exporting image and video data
我的电脑之前一直报错:
ERROR: cannot launch node of type [image_view/extract_images]: image_view
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/home/linxiaorui/catkin_ws/src
ROS path [2]=/home/linxiaorui/turtlebot/src
ROS path [3]=/home/linxiaorui/kobuki/src
ROS path [4]=/home/linxiaorui/rocon/src
ROS path [5]=/opt/ros/kinetic/share
[FATAL] [1557646481.548094860]: Error opening file: ~/data/2019-05-11-22-13-19.bag
[rosbag-1] process has died [pid 5897, exit code 1, cmd /opt/ros/kinetic/lib/rosbag/play -d 2 ~/data/2019-05-11-22-13-19.bag __name:=rosbag __log:=/home/linxiaorui/.ros/log/d219636e-747e-11e9-beb1-2cf0ee15f6d8/rosbag-1.log].
log file