- OpenCV (with Contrib)
- Eigen
- ROS
- cv_bridge
- sensor_msgs
- Realsense-ros
(1) SAVE_IMG
- Not save images → 0
- Save images → 1
(2) PUBLISH_SYNCED_IMGS
- Use publish ROS topic → true
- Not use publish ROS topic → false
(3) DIFF_THRESHOLD
- Set different between current time and lastest time → ${VALUE}
(4) SYNC_GT_TIME
- Sync with GT and image time → true
- Not use GT info → false
(5) SIM_THRESHOLD
- To set GT boundary near by current image → ${VALUE}
(6) std::string gt_path
- To write GT absolute path → ${STRING}
Clone the repository and build and run simultaneously:
$ cd catkin_ws/src
$ git clone https://github.com/SungJaeShin/parsingROSBag.git
$ cd ../../
$ catkin config -DCMAKE_BUILD_TYPE=Release
$ catkin build parsingROSBag
$ source devel/setup.bash
$ sh start_parsing.sh
(1) sensor_msgs::CameraInfo
- /camera/camera/color/camera_info
- /camera/camera/depth/camera_info
- /camera/camera/infra1/camera_info
- /camera/camera/infra2/camera_info
(2) sensor_msgs::CompressedImage
- /camera/camera/color/image_raw/compressed
- /camera/camera/infra1/image_rect_raw/compressed
- /camera/camera/infra2/image_rect_raw/compressed
(3) sensor_msgs::Image
- /camera/camera/depth/image_rect_raw
(1) sensor_msgs::Image
- /sync_color
- /sync_depth
- /sync_infra1
(2) Save Sync Color and Depth Image (.jpg)
- If you want to save .png extension image, please go to saveSyncImgs funtion and change .jpg to .png !!
- Default saved image is 3 FPS in rosbag time !!
- If you want to save more images, then please change double value in
time_diff
statement ! (in this code, setting 0.25)
- If you want to save more images, then please change double value in
(3) Save the Image Concerning Sync Color time and GT time Image (.jpg)
- You can set the time to sync with gt. By adjusting
SIM_THRESHOLD
, you can set an image that fits the range of GT ! (in this code, setting 0.01)
- example of ar table dataset
- In the result, the only image is saved as 00002.jpg, and the image parsed according to GT time is saved as gt_2_1662915732.374960.jpg.
GT text file (looking at Line 2) |
Only image parsing | Parsing image depend on GT time (line 2) |
Thank you Alvin Jinsung Choi for correcting the code error!
- I will sync all other images !