This is a tool to extract images from a ROS1 rosbag without requiring manual setup of the ROS1 environment on the Host OS.
Host OS with Docker and Bash installed.
First you need to run setup.sh to build the docker image.
$ bash setup.sh
$ ./extract.sh <path to rosbag file>
$ ./extract.sh <path to ros1 rosbag file> <path to output image directory> <topic name>
If you want to swap the red and blue channels in color images, you can specify the --swaprb
option after the topic name.
$ ./extract.sh <path to ros1 rosbag file> <path to output image directory> <topic name> --swaprb
The image extraction script rosbag2images.py
is the modification of priteshgohil's work, which is distributed under the MIT license.