https://github.com/shichaoy/pop_up_slam
This is code work with:
- Python 2.7
- ROS Melodic
- Ubuntu 18.04
- Opencv 2/3
- Parameters:
- path for images/video.
- out file rosbag.
- topic.
- format for img.
- id for msg image.
- Appears also in the notebook newRosBagName = "newName.bag" with rosbag.Bag(newRosBagName, 'w') as outbag: createRosbagFromImages('../../src/data/Images/almostrectangle/almostrectangle_orginal/',outbag,'/rect_color_raw','bgr8','camera_rgb_optical_frame') createRosbagFromImages('../../src/data/Images/almostrectangle/almostrectangle_segmentation/',outbag,'/cnn_label','mono8','openni_rgb_optical_frame')
- Appears also in the notebook name = "../../src/rosbag2video/galaxy360.bag" with rosbag.Bag(name, 'w') as outbag: CreateRosbagFromVideo('../../src/data/Video/galaxy360_rotate.avi',outbag,'/rect_color_raw','bgr8','camera_rgb_optical_frame') CreateRosbagFromVideo('../../src/data/Video/galaxy360_segmentation.avi',outbag,'/cnn_label','mono8','openni_rgb_optical_frame')