thien94 / orb_slam3_ros

A ROS implementation of ORB_SLAM3
GNU General Public License v3.0
261 stars 81 forks source link

Run ROS Stereo-Inertial with recorded .bag from realsense D435i #29

Closed Styazoua closed 5 months ago

Styazoua commented 6 months ago

Hello,

First I want to say that I am not that deep into ROS. I would like to run Stereo-Inertial with ROS and a pre recorded bag file with Intel RealSense D435i. I already tried the ros_stereo_inertial example. But while looking into the source code I have seen that it subscribes to /imu topic. But when I record with the D435i I have the IMU data devided in 2 separate topics (acceleration and gyro). Is there a way to run that without modifying the whole example? I was hoping to find something in this repo.

IamRam3 commented 5 months ago

Hi @Styazoua you can record rosbag after setting "unite_imu_method" as 1 or 2 Then I think you can be able to run.

Filippo-Steffenel commented 4 months ago

Hi @Styazoua I have the same problem, do you find a solution?

Styazoua commented 4 months ago

Yes the "unite_imu_method" argument solved the problem. I use this command to launch the camera and record:

# launch camera
roslaunch realsense2_camera rs_camera.launch enable_accel:=true enable_gyro:=true enable_infra1:=true enable_infra2:=true unite_imu_method:=linear_interpolation infra_width:=640 infra_height:=480 global_time_enable:=true

# rosbag record
rosbag record -O recording.bag /camera/imu /camera/infra1/image_rect_raw /camera/infra2/image_rect_raw

Imu data is published on "/camera/imu" topic