Hello @matlabbe, greetings to you!
The aim of my project is to use rtabmap_ros2 (humble) to implement 3D mapping and using the same for autonomous navigation of a drone (PX4 and mavros). I am using intel RealSense D435 camera as my RGBD sensor. I tried implementing RTABMap from the
official github repository with docker, and all default parameters. I am facing the following probelms: -
1. Frequent odometry loss.
- The odometry gets lost, and the map construction gets stuck at the frame where odom was lost.
- I tried using the rest odom service which allows the map to be constructed from the point where the odom gets lost and I reset it, but the map in that case remains incomplete since the previously constructed map gets lost.
- I believe that upon revisiting locations, the lost map can be recovered, is that correct?
2. No loop closures.
- I did not see any loop closures happening, while revisiting locations.
Can you please suggest any resources I can refer for solving these problems?
Can you please suggest any parameter values to be set for achieving correct performance?
This is my workstation's configuration.

This is the command I use:
xhost +local:root
sudo docker run -it --rm \
--user $UID \
-e ROS_HOME=/tmp/.ros \
-e OMP_WAIT_POLICY=passive \
-e ROS_DOMAIN_ID=55 \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix \
--network=host \
--ipc=host \
--runtime=nvidia \
-v ~/.ros:/tmp/.ros \
introlab3it/rtabmap_ros:humble-latest \
ros2 launch rtabmap_launch rtabmap.launch.py rtabmap_viz:=true database_path:=/tmp/.ros/rtabmap.db rtabmap_args:="--delete_db_on_start" \
depth_topic:=/camera/camera/aligned_depth_to_color/image_raw \
rgb_topic:=/camera/camera/color/image_raw \
camera_info_topic:=/camera/camera/color/camera_info \
approx_sync:=false \
I would appreciate any help from you, Thanks in advance!

Regards,
MidKnight