rtabmap_ros icon indicating copy to clipboard operation
rtabmap_ros copied to clipboard

Issue: Rtabamap Node has no output, Using icp_odometry (LiDAR odom) + rtabmap (mono camera with SfM) for 2D SLAM

Open KimchiPizza opened this issue 3 months ago • 2 comments

Hello, and thank you for taking a look. This report concerns a 2D SLAM setup that fuses LiDAR ICP odometry with a monocular camera while leveraging RTAB-Map’s motion-based depth (SfM) for visual constraints and loop closures. The system is currently not producing any SLAM outputs despite appearing correctly wired.

- Environment

OS/CPU: NVIDIA Jetson Orin NX (Ubuntu 22.04)

ROS 2: Humble

RTAB-Map ROS: 0.21.9

- Sensors:

Monocular RGB camera (rectified topic, using Mem/StereoFromMotion=true)

2D LiDAR publishing /scan

rtabmap_odom/icp_odometry publishes /odom

- Goals

Use LiDAR ICP odometry as primary odom (/odom).

Use monocular RGB with SfM(StereoFromMotion) for make 3D map

Build 2D occupancy grid or Sparse map.

- Problem

The rtabmap node produces no outputs at all (no /map, no /octomap_grid, no graph updates), and the database file size remains 0 MB even after running for several minutes.

topics appear connected, but no data in topic messages.

- launch.py

        # LiDAR ICP Odometry -> publishes /odom
        Node(
            package='rtabmap_odom',
            executable='icp_odometry',
            name='icp_odom',
            output='screen',
            parameters=[{
                'use_sim_time': use_sim_time,
                'subscribe_scan': 'True',
                'subscribe_scan_cloud': 'False',
                'subscribe_rgbd': 'False',
                'frame_id': 'base_footprint',
                'publish_tf': 'False',
                'Reg/Force3DoF': 'true',
                'Reg/Strategy': '1',
                'qos_scan': qos,
                'qos_image': qos,
                'qos_imu': qos
            }],
            remappings=[
                ('scan', '/scan'),
                ('scan_cloud', '/dummy_scan_cloud'),
                ('odom', '/odom'),
                ('odom_info', '/odom_info'),
            ]
        ),

        # RTAB-Map SLAM (mono RGB + LiDAR grid, use SfM )
        Node(
            package='rtabmap_slam',
            executable='rtabmap',
            name='rtabmap',
            output='screen',
            parameters=[{
                'use_sim_time': use_sim_time,
                'subscribe_rgb': 'True',
                'subscribe_rgbd': 'False',
                'subscribe_odom': 'True',
                'subscribe_scan': 'True',
                'subscribe_depth': 'False',

                # Occupancy grid from LiDAR (2D)
                'Grid/FromDepth': 'False',
                'Grid/3D': 'False',
                'Grid/CellSize': '0.05',
                'Grid/RangeMin': '0.15',
                'Grid/RangeMax': '12.0',
                'Grid/Sensor': '0',

                'Mem/StereoFromMotion': 'True',

                'Mem/IncrementalMemory': 'True',
                'Mem/InitWMWithAllNodes': 'True',
                'Reg/Strategy': '0',
                'approx_sync': 'True',
                'database_path': os.path.expanduser('~/.ros/rtab_cam1.db'),
                'qos_scan': qos,
                'qos_image': qos,
                'qos_imu': qos,
                'frame_id': 'base_footprint',
                'publish_tf': 'True'
            }],
            remappings=[
                ('rgb/image', '/camera2/image_rect'),
                ('rgb/camera_info', '/camera2/camera_info'),
                ('scan', '/scan'),
                ('odom', '/odom'),
            ]
        ),

KimchiPizza avatar Sep 19 '25 05:09 KimchiPizza

Are there any warnings on the terminal? There should be if rtabmap is not processing anything. Another way to debug is to look at the errors with:

ros2 run rqt_runtime_monitor rqt_runtime_monitor

matlabbe avatar Sep 21 '25 18:09 matlabbe

@matlabbe terminal didn't have an error message, but as you said, I used rqt_runtime_monitor and found that the problem was that the rtabmap input topic hz was too low. Thanks for your help!

KimchiPizza avatar Sep 22 '25 01:09 KimchiPizza