rtabmap_ros icon indicating copy to clipboard operation
rtabmap_ros copied to clipboard

Two RGBD cameras using ROS2

Open takahiko-hasegawa-hdjp opened this issue 2 years ago • 5 comments

I have two RGB-D cameras: Front & Rear camera. I want to use both cameras for my localization. Is there a way to do that? if so do you have any example using ROS launch file?

Thanks in advance

takahiko-hasegawa-hdjp avatar Jul 24 '23 05:07 takahiko-hasegawa-hdjp

Hi @takahiko-hasegawa-hdjp you can take a look into my examples with the D405x2 and D405x3 cameras. I am doing simultaneous mapping using multi session cameras, but I am only localizing so far with the front one. I think there is a way to use two, even three, by configuring the odometry node with rgbd_cameras:2, but I think there are more configs you have to setup. At least, the mapping, is done synchronized.

adricort avatar Jul 25 '23 09:07 adricort

@adricort Thanks so much! I will take a look!

takahiko-hasegawa-hdjp avatar Jul 25 '23 23:07 takahiko-hasegawa-hdjp

That example uses 2 cameras for localization, 1 for odometry. You could make rgbd_odometry working with both cameras by also setting rgbd_cameras to 2 (with correct remaps). I suggest to build rtabmap with OpenGV to get better odometry/localization when using multi-camera setup.

matlabbe avatar Jul 30 '23 23:07 matlabbe

Well, so I have my own wheel enocders that publishes odom-base_link so I dont need visual odometry. I want to use both two camera for pure localization. can I do that?

takahiko-hasegawa-hdjp avatar Dec 06 '23 11:12 takahiko-hasegawa-hdjp

Yes, you can set rgbd_cameras parameter to 2 for rtabmap node and provide the input topics (possibly outputs of two rgbd_sync nodes). For multi-cameras localization, it is also preferred to build rtabmap with OpenGV.

matlabbe avatar Dec 10 '23 03:12 matlabbe