i am trying to simulate the depth camera in gazebo harmonic i.e, gazebo 8.9
the rtabmap slam needs this four topics
('imu', '/camera/camera/imu'),
('rgb/image', '/camera/camera/infra1/image_rect_raw'),
('rgb/camera_info', '/camera/camera/infra1/camera_info'),
('depth/image', '/camera/camera/depth/image_rect_raw')\]
so i simulated all of them from simulation
when i ran the launch file of rtabmap it gave me this warnings and errors
[rtabmap-2] [WARN] [1755969827.752845137] [rtabmap]: rtabmap: Did not receive data since 5 seconds! Make sure the input topics are published (“$ ros2 topic hz my_topic”) and the timestamps in their header are set. If topics are coming from different computers, make sure the clocks of the computers are synchronized (“ntpdate”). Ajusting topic_queue_size (10) and sync_queue_size (10) can also help for better synchronization if framerates and/or delays are different. If topics are not published at the same rate, you could increase “sync_queue_size” and/or “topic_queue_size” parameters (current=10 and 10 respectively).
[rtabmap-2] rtabmap subscribed to (approx sync):
[rtabmap-2] /odom
[rtabmap-2] /camera/camera/infra1/image_rect_raw
[rtabmap-2] /camera/camera/depth/image_rect_raw
[rtabmap-2] /camera/camera/infra1/camera_info
[rgbd_odometry-1] [ WARN] (2025-08-23 22:53:47.139) MsgConversion.cpp:2010::getTransform() (getting transform depth_camera/link/depth_camera1 → depth_camera/link/ir_camera) “depth_camera/link/depth_camera1” passed to lookupTransform argument target_frame does not exist. (wait_for_transform=0.100000)
it looks like the /odom isnt published by node rgb_odometry but why ??
all other topics are giving the data except /odom
Launch File
# Requirements:
# A realsense D435i
# Install realsense2 ros2 package (ros-$ROS_DISTRO-realsense2-camera)
# Example:
# $ ros2 launch rtabmap_examples realsense_d435i_infra.launch.py
import os
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch_ros.actions import Node, SetParameter
from launch.actions import IncludeLaunchDescription
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.substitutions import LaunchConfiguration
def generate_launch_description():
parameters=[{
'frame_id':'depth_camera/link/depth_camera1',
'subscribe_depth':True,
'subscribe_odom_info':False,
'approx_sync':True,
'wait_imu_to_init':False}]
remappings=[
('imu', '/camera/camera/imu'),
('rgb/image', '/camera/camera/infra1/image_rect_raw'),
('rgb/camera_info', '/camera/camera/infra1/camera_info'),
('depth/image', '/camera/camera/depth/image_rect_raw')]
return LaunchDescription([
# Launch arguments
DeclareLaunchArgument(
'unite_imu_method', default_value='2',
description='0-None, 1-copy, 2-linear_interpolation. Use unite_imu_method:="1" if imu topics stop being published.'),
#Hack to disable IR emitter
SetParameter(name='depth_module.emitter_enabled', value=0),
# Launch camera driver
Node(
package='rtabmap_odom', executable='rgbd_odometry', output='screen',
parameters=parameters,
remappings=remappings),
Node(
package='rtabmap_slam', executable='rtabmap', output='screen',
parameters=parameters,
remappings=remappings,
arguments=['-d']),
Node(
package='rtabmap_viz', executable='rtabmap_viz', output='screen',
parameters=parameters,
remappings=remappings),
# Compute quaternion of the IMU
Node(
package='imu_filter_madgwick', executable='imu_filter_madgwick_node', output='screen',
parameters=[{'use_mag': False,
'world_frame':'enu',
'publish_tf':False}],
remappings=[('imu/data_raw', '/camera/camera/imu')]),
])
Simulation sdf