bag recording with OAK-D for RTAB-Map

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

bag recording with OAK-D for RTAB-Map

Parastou Bakhtiari
Hi,

I have found this .py file in the github repo depthai_sdk/examples/recording/rosbag_record.py which is related to recording a bag file.

I am trying to record rosbag file using OAK-D W POE camera and launch RTAB-Map on this recorded bag file.

Would you please tell me where can I find the document related to recording the bag file compatible with RTAB-Map? I need /tf and /tf_statics, too.

and which ROS version do you suggest? ROS Noetic or ROS2 Humble?

Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: bag recording with OAK-D for RTAB-Map

matlabbe
Administrator
Hi,

Yeah, you would need /tf, /tf_static, the camera_info and the image topics. You could do it on ros1 or ros2, it doesn't matter. ros1 is deprecated this year, so I suggest to record a ros2 bag if you can.

Here an example with an OAK-D.

ros1:
rosbag record /tf /tf_static \
   /stereo_inertial_publisher/right/image_rect \
   /stereo_inertial_publisher/stereo/depth \
   /stereo_inertial_publisher/right/camera_info

ros2:
ros2 bag record /tf /tf_static \
   /right/image_rect \
   /right/camera_info \
   /stereo/depth

When you replay a bag, don't forget to add "--clock" argument.