rtabmap_ros icon indicating copy to clipboard operation
rtabmap_ros copied to clipboard

multiple errors using rtabmap on my rosbag

Open parastoobakhtiarii opened this issue 1 year ago • 1 comments

Hello, I am pretty new to this field of automated robots and navigation, I appreciate it if anyone can help me in solving this problem, I have a rosbag file captured using ros2 humble and oak-d pro camera containing of /camera/depth/image, /camera/left/image, /camera/right/image and /imu/data ( I need to mention that data was saved as raw images and a csv file of imu data which I used python to sync the timestamps of imu data and images and save them in a csv file and then used a ros package to publish the synced data in a rosbag) now I am trying to capture the generated map from slam. Since I don't have pose data I am using rtabmap to capture both estimated odometry and generated map. Below, I will put my ros2 topic list and ros2 topic info and my launch file and the errors I have.

ros2 topic list
/camera/depth/image
/camera/left/image
/camera/right/image
/clock
/disparity
/events/read_split
/imu/data
/in/compressed
/left/image_rect
/left/image_rect_color
/parameter_events
/points2
/right/image_rect
/rosout
/stereo_camera/left/camera_info_throttle
/stereo_camera/left/image_raw_throttle_relay
/stereo_camera/right/camera_info_throttle
/stereo_camera/right/image_raw_throttle_relay
ros2 bag info /home/parastou/rosbag2_2024_11_22-12_24_38/rosbag2_2024_11_22-12_24_38_0.db3
[INFO] [1734462390.885319098] [rosbag2_storage]: Opened database '/home/parastou/rosbag2_2024_11_22-12_24_38/rosbag2_2024_11_22-12_24_38_0.db3' for READ_ONLY.

Files:             /home/parastou/rosbag2_2024_11_22-12_24_38/rosbag2_2024_11_22-12_24_38_0.db3
Bag size:          10.3 GiB
Storage id:        sqlite3
Duration:          576.307459882s
Start:             Nov 22 2024 12:24:38.528207500 (1732299878.528207500)
End:               Nov 22 2024 12:34:14.835667382 (1732300454.835667382)
Messages:          3288
Topic information: Topic: /imu/data | Type: sensor_msgs/msg/Imu | Count: 822 | Serialization Format: cdr
                   Topic: /camera/right/image | Type: sensor_msgs/msg/Image | Count: 822 | Serialization Format: cdr
                   Topic: /camera/left/image | Type: sensor_msgs/msg/Image | Count: 822 | Serialization Format: cdr
                   Topic: /camera/depth/image | Type: sensor_msgs/msg/Image | Count: 822 | Serialization Format: cdr

launch file:

from launch import LaunchDescription
from launch_ros.actions import Node

def generate_launch_description():
    return LaunchDescription([
    	# Synchronize Topics using ApproximateTimeSynchronizer
        Node(
            package='tractor_description',  # Use the correct package name
            executable='sync_topics',  # This should match the script name without '.py'
            name='topic_synchronizer',
            output='screen',
        ),

        # Static transforms to align coordinate frames (you may adjust the values as needed)
        Node(
            package="tf2_ros",
            executable="static_transform_publisher",
            name="camera_base_link",
            output="screen",
            arguments=["0", "0", "0", "0", "0", "0", "/base_link", "/camera_link", "100"]
        ),
        Node(
            package="tf2_ros",
            executable="static_transform_publisher",
            name="camera_link_to_depth_frame",
            output="screen",
            arguments=["0", "0", "0", "0", "0", "0", "/camera_link", "/camera_depth_frame", "100"]
        ),
        Node(
            package="tf2_ros",
            executable="static_transform_publisher",
            name="camera_link_to_rgb_frame",
            output="screen",
            arguments=["0", "0", "0", "0", "0", "0", "/camera_link", "/camera_rgb_frame", "100"]
        ),
        Node(
            package="tf2_ros",
            executable="static_transform_publisher",
            name="depth_frame_to_optical_frame",
            output="screen",
            arguments=["0", "0", "0", "0", "0", "0", "/camera_depth_frame", "/camera_depth_optical_frame", "100"]
        ),
        Node(
            package="tf2_ros",
            executable="static_transform_publisher",
            name="rgb_frame_to_optical_frame",
            output="screen",
            arguments=["0", "0", "0", "0", "0", "0", "/camera_rgb_frame", "/camera_rgb_optical_frame", "100"]
        ),

        # Republish images to uncompress them for stereo image rectification
        Node(
            executable='republish',
            package='image_transport',
            name='republish_left',
            output='screen',
            arguments=['compressed', 'in:=/camera/left/image', 'raw', 'out:=/stereo_camera/left/image_raw_throttle_relay']
        ),
        Node(
            executable='republish',
            package='image_transport',
            name='republish_right',
            output='screen',
            arguments=['compressed', 'in:=/camera/right/image', 'raw', 'out:=/stereo_camera/right/image_raw_throttle_relay']
        ),

        # Stereo Image Processing
        Node(
            package='stereo_image_proc',
            executable='disparity_node',  # Use disparity_node
            name='disparity_node',
            output='screen',
            remappings=[
                ('left/image_raw', '/stereo_camera/left/image_raw_throttle_relay'),
                ('right/image_raw', '/stereo_camera/right/image_raw_throttle_relay'),
                ('left/camera_info', '/stereo_camera/left/camera_info_throttle'),
                ('right/camera_info', '/stereo_camera/right/camera_info_throttle')
            ]
        ),
        Node(
            package='stereo_image_proc',
            executable='point_cloud_node',  # Use point_cloud_node
            name='point_cloud_node',
            output='screen',
            remappings=[
                ('left/image_raw', '/stereo_camera/left/image_raw_throttle_relay'),
                ('right/image_raw', '/stereo_camera/right/image_raw_throttle_relay'),
                ('left/camera_info', '/stereo_camera/left/camera_info_throttle'),
                ('right/camera_info', '/stereo_camera/right/camera_info_throttle')
            ]
        ),

        # Stereo Odometry (Visual Odometry)
        Node(
            executable='stereo_odometry',
            package='rtabmap_odom',
            name='stereo_odometry',
            output='screen',
            remappings=[
                ('left/image_rect', '/stereo_camera/left/image_rect_color'),
                ('right/image_rect', '/stereo_camera/right/image_rect'),
                ('left/camera_info', '/stereo_camera/left/camera_info_throttle'),
                ('right/camera_info', '/stereo_camera/right/camera_info_throttle'),
                ('odom', '/stereo_odometry')
            ],
            parameters=[
                {'frame_id': 'base_footprint'},
                {'odom_frame_id': 'odom'},
                {'Odom/Strategy': '0'},
                {'Odom/EstimationType': '1'},
                {'Odom/MinInliers': '10'},
                {'Odom/MaxDepth': '10'},
                {'approx_sync': True}  # Enable approximate sync
            ]
        ),

        # RTAB-Map SLAM for visual odometry and map generation
        Node(
            executable='rtabmap',
            package='rtabmap_slam',
            name='rtabmap',
            output='screen',
            arguments=['--delete_db_on_start'],
            parameters=[
                {'frame_id': 'base_footprint'},
                {'subscribe_stereo': True},
                {'subscribe_depth': False},
                {'approx_sync': True}  # Enable approximate sync
            ],
            remappings=[
                ('left/image_rect', '/stereo_camera/left/image_rect_color'),
                ('right/image_rect', '/stereo_camera/right/image_rect'),
                ('left/camera_info', '/stereo_camera/left/camera_info_throttle'),
                ('right/camera_info', '/stereo_camera/right/camera_info_throttle'),
                ('odom', '/stereo_odometry')
            ]
        ),

        # Approximate Synchronization
        Node(
            executable='rgbd_sync',
            package='rtabmap_sync',
            name='rgbd_sync',
            output='screen',
            parameters=[{
                'approx_sync': 'true',  # Enable approximate synchronization
                'approx_sync_max_interval': '0.1',  # Maximum interval for sync
                'sync_queue_size': '30',
                'topic_queue_size': '30',
                'qos': '1',
                'qos_camera_info': '1',
                'depth_scale': '1.0'
            }],
            remappings=[
                ('rgb/image', '/stereo_camera/left/image_rect_color'),
                ('depth/image', '/stereo_camera/right/image_rect'),
                ('rgb/camera_info', '/stereo_camera/left/camera_info_throttle'),
                ('rgbd_image', '/rgbd_image')
            ]
        ),

        # Map saving (optional)
        Node(
            executable='map_saver_server',
            package='nav2_map_server',
            name='map_saver_server',
            output='screen',
            parameters=[{'use_sim_time': True}],
            remappings=[('/map', '/generated_map')],
            arguments=["--output", "/home/parastou/maps/my_map"]
        )
    ])
ros2 launch rtabmap_launch rtabmap.launch.py
[INFO] [launch]: All log files can be found below /home/parastou/.ros/log/2024-12-17-15-30-09-819724-parastou-Alienware-x17-R2-23801
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [sync_topics-1]: process started with pid [23802]
[INFO] [static_transform_publisher-2]: process started with pid [23804]
[ERROR] [static_transform_publisher-2]: process has died [pid 23804, exit code 1, cmd '/opt/ros/humble/lib/tf2_ros/static_transform_publisher 0 0 0 0 0 0 /base_link /camera_link 100 --ros-args -r __node:=camera_base_link'].
[INFO] [static_transform_publisher-3]: process started with pid [23806]
[ERROR] [static_transform_publisher-3]: process has died [pid 23806, exit code 1, cmd '/opt/ros/humble/lib/tf2_ros/static_transform_publisher 0 0 0 0 0 0 /camera_link /camera_depth_frame 100 --ros-args -r __node:=camera_link_to_depth_frame'].
[INFO] [static_transform_publisher-4]: process started with pid [23808]
[ERROR] [static_transform_publisher-4]: process has died [pid 23808, exit code 1, cmd '/opt/ros/humble/lib/tf2_ros/static_transform_publisher 0 0 0 0 0 0 /camera_link /camera_rgb_frame 100 --ros-args -r __node:=camera_link_to_rgb_frame'].
[INFO] [static_transform_publisher-5]: process started with pid [23810]
[ERROR] [static_transform_publisher-5]: process has died [pid 23810, exit code 1, cmd '/opt/ros/humble/lib/tf2_ros/static_transform_publisher 0 0 0 0 0 0 /camera_depth_frame /camera_depth_optical_frame 100 --ros-args -r __node:=depth_frame_to_optical_frame'].
[INFO] [static_transform_publisher-6]: process started with pid [23812]
[ERROR] [static_transform_publisher-6]: process has died [pid 23812, exit code 1, cmd '/opt/ros/humble/lib/tf2_ros/static_transform_publisher 0 0 0 0 0 0 /camera_rgb_frame /camera_rgb_optical_frame 100 --ros-args -r __node:=rgb_frame_to_optical_frame'].
[INFO] [republish-7]: process started with pid [23814]
[INFO] [republish-8]: process started with pid [23816]
[INFO] [disparity_node-9]: process started with pid [23818]
[INFO] [point_cloud_node-10]: process started with pid [23820]
[INFO] [stereo_odometry-11]: process started with pid [23822]
[INFO] [rtabmap-12]: process started with pid [23824]
[INFO] [rgbd_sync-13]: process started with pid [23826]
[INFO] [map_saver_server-14]: process started with pid [23852]
[static_transform_publisher-2] usage: static_transform_publisher [--x X] [--y Y] [--z Z] [--qx QX] [--qy QY] [--qz QZ] [--qw QW] [--roll ROLL] [--pitch PITCH] [--yaw YAW] --frame-id FRAME_ID --child-frame-id CHILD_FRAME_ID
[static_transform_publisher-2] 
[static_transform_publisher-2] A command line utility for manually sending a static transform.
[static_transform_publisher-2] 
[static_transform_publisher-2] If no translation or orientation is provided, the identity transform will be published.
[static_transform_publisher-2] 
[static_transform_publisher-2] The translation offsets are in meters.
[static_transform_publisher-2] 
[static_transform_publisher-2] The rotation may be provided with roll, pitch, yaw euler angles in radians, or as a quaternion.
[static_transform_publisher-2] 
[static_transform_publisher-2] required arguments:
[static_transform_publisher-2]   --frame-id FRAME_ID parent frame
[static_transform_publisher-2]   --child-frame-id CHILD_FRAME_ID child frame id
[static_transform_publisher-2] 
[static_transform_publisher-2] optional arguments:
[static_transform_publisher-2]   --x X                 x component of translation
[static_transform_publisher-2]   --y Y                 y component of translation
[static_transform_publisher-2]   --z Z                 z component of translation
[static_transform_publisher-2]   --qx QX               x component of quaternion rotation
[static_transform_publisher-2]   --qy QY               y component of quaternion rotation
[static_transform_publisher-2]   --qz QZ               z component of quaternion rotation
[static_transform_publisher-2]   --qw QW               w component of quaternion rotation
[static_transform_publisher-2]   --roll ROLL           roll component Euler rotation
[static_transform_publisher-2]   --pitch PITCH         pitch component Euler rotation
[static_transform_publisher-2]   --yaw YAW             yaw component Euler rotation
[static_transform_publisher-3] usage: static_transform_publisher [--x X] [--y Y] [--z Z] [--qx QX] [--qy QY] [--qz QZ] [--qw QW] [--roll ROLL] [--pitch PITCH] [--yaw YAW] --frame-id FRAME_ID --child-frame-id CHILD_FRAME_ID
[static_transform_publisher-3] 
[static_transform_publisher-3] A command line utility for manually sending a static transform.
[static_transform_publisher-3] 
[static_transform_publisher-3] If no translation or orientation is provided, the identity transform will be published.
[static_transform_publisher-3] 
[static_transform_publisher-3] The translation offsets are in meters.
[static_transform_publisher-3] 
[static_transform_publisher-3] The rotation may be provided with roll, pitch, yaw euler angles in radians, or as a quaternion.
[static_transform_publisher-3] 
[static_transform_publisher-3] required arguments:
[static_transform_publisher-3]   --frame-id FRAME_ID parent frame
[static_transform_publisher-3]   --child-frame-id CHILD_FRAME_ID child frame id
[static_transform_publisher-3] 
[static_transform_publisher-3] optional arguments:
[static_transform_publisher-3]   --x X                 x component of translation
[static_transform_publisher-3]   --y Y                 y component of translation
[static_transform_publisher-3]   --z Z                 z component of translation
[static_transform_publisher-3]   --qx QX               x component of quaternion rotation
[static_transform_publisher-3]   --qy QY               y component of quaternion rotation
[static_transform_publisher-3]   --qz QZ               z component of quaternion rotation
[static_transform_publisher-3]   --qw QW               w component of quaternion rotation
[static_transform_publisher-3]   --roll ROLL           roll component Euler rotation
[static_transform_publisher-3]   --pitch PITCH         pitch component Euler rotation
[static_transform_publisher-3]   --yaw YAW             yaw component Euler rotation
[static_transform_publisher-4] usage: static_transform_publisher [--x X] [--y Y] [--z Z] [--qx QX] [--qy QY] [--qz QZ] [--qw QW] [--roll ROLL] [--pitch PITCH] [--yaw YAW] --frame-id FRAME_ID --child-frame-id CHILD_FRAME_ID
[static_transform_publisher-4] 
[static_transform_publisher-4] A command line utility for manually sending a static transform.
[static_transform_publisher-4] 
[static_transform_publisher-4] If no translation or orientation is provided, the identity transform will be published.
[static_transform_publisher-4] 
[static_transform_publisher-4] The translation offsets are in meters.
[static_transform_publisher-4] 
[static_transform_publisher-4] The rotation may be provided with roll, pitch, yaw euler angles in radians, or as a quaternion.
[static_transform_publisher-4] 
[static_transform_publisher-4] required arguments:
[static_transform_publisher-4]   --frame-id FRAME_ID parent frame
[static_transform_publisher-4]   --child-frame-id CHILD_FRAME_ID child frame id
[static_transform_publisher-4] 
[static_transform_publisher-4] optional arguments:
[static_transform_publisher-4]   --x X                 x component of translation
[static_transform_publisher-4]   --y Y                 y component of translation
[static_transform_publisher-4]   --z Z                 z component of translation
[static_transform_publisher-4]   --qx QX               x component of quaternion rotation
[static_transform_publisher-4]   --qy QY               y component of quaternion rotation
[static_transform_publisher-4]   --qz QZ               z component of quaternion rotation
[static_transform_publisher-4]   --qw QW               w component of quaternion rotation
[static_transform_publisher-4]   --roll ROLL           roll component Euler rotation
[static_transform_publisher-4]   --pitch PITCH         pitch component Euler rotation
[static_transform_publisher-4]   --yaw YAW             yaw component Euler rotation
[static_transform_publisher-5] usage: static_transform_publisher [--x X] [--y Y] [--z Z] [--qx QX] [--qy QY] [--qz QZ] [--qw QW] [--roll ROLL] [--pitch PITCH] [--yaw YAW] --frame-id FRAME_ID --child-frame-id CHILD_FRAME_ID
[static_transform_publisher-5] 
[static_transform_publisher-5] A command line utility for manually sending a static transform.
[static_transform_publisher-5] 
[static_transform_publisher-5] If no translation or orientation is provided, the identity transform will be published.
[static_transform_publisher-5] 
[static_transform_publisher-5] The translation offsets are in meters.
[static_transform_publisher-5] 
[static_transform_publisher-5] The rotation may be provided with roll, pitch, yaw euler angles in radians, or as a quaternion.
[static_transform_publisher-5] 
[static_transform_publisher-5] required arguments:
[static_transform_publisher-5]   --frame-id FRAME_ID parent frame
[static_transform_publisher-5]   --child-frame-id CHILD_FRAME_ID child frame id
[static_transform_publisher-5] 
[static_transform_publisher-5] optional arguments:
[static_transform_publisher-5]   --x X                 x component of translation
[static_transform_publisher-5]   --y Y                 y component of translation
[static_transform_publisher-5]   --z Z                 z component of translation
[static_transform_publisher-5]   --qx QX               x component of quaternion rotation
[static_transform_publisher-5]   --qy QY               y component of quaternion rotation
[static_transform_publisher-5]   --qz QZ               z component of quaternion rotation
[static_transform_publisher-5]   --qw QW               w component of quaternion rotation
[static_transform_publisher-5]   --roll ROLL           roll component Euler rotation
[static_transform_publisher-5]   --pitch PITCH         pitch component Euler rotation
[static_transform_publisher-5]   --yaw YAW             yaw component Euler rotation
[static_transform_publisher-6] usage: static_transform_publisher [--x X] [--y Y] [--z Z] [--qx QX] [--qy QY] [--qz QZ] [--qw QW] [--roll ROLL] [--pitch PITCH] [--yaw YAW] --frame-id FRAME_ID --child-frame-id CHILD_FRAME_ID
[static_transform_publisher-6] 
[static_transform_publisher-6] A command line utility for manually sending a static transform.
[static_transform_publisher-6] 
[static_transform_publisher-6] If no translation or orientation is provided, the identity transform will be published.
[static_transform_publisher-6] 
[static_transform_publisher-6] The translation offsets are in meters.
[static_transform_publisher-6] 
[static_transform_publisher-6] The rotation may be provided with roll, pitch, yaw euler angles in radians, or as a quaternion.
[static_transform_publisher-6] 
[static_transform_publisher-6] required arguments:
[static_transform_publisher-6]   --frame-id FRAME_ID parent frame
[static_transform_publisher-6]   --child-frame-id CHILD_FRAME_ID child frame id
[static_transform_publisher-6] 
[static_transform_publisher-6] optional arguments:
[static_transform_publisher-6]   --x X                 x component of translation
[static_transform_publisher-6]   --y Y                 y component of translation
[static_transform_publisher-6]   --z Z                 z component of translation
[static_transform_publisher-6]   --qx QX               x component of quaternion rotation
[static_transform_publisher-6]   --qy QY               y component of quaternion rotation
[static_transform_publisher-6]   --qz QZ               z component of quaternion rotation
[static_transform_publisher-6]   --qw QW               w component of quaternion rotation
[static_transform_publisher-6]   --roll ROLL           roll component Euler rotation
[static_transform_publisher-6]   --pitch PITCH         pitch component Euler rotation
[static_transform_publisher-6]   --yaw YAW             yaw component Euler rotation
[static_transform_publisher-2] [WARN] [1734471009.945082632] []: Old-style arguments are deprecated; see --help for new-style arguments
[static_transform_publisher-2] [ERROR] [1734471009.945165632] []: error parsing command line arguments: Failed to parse qw argument as float
[static_transform_publisher-3] [WARN] [1734471009.945068257] []: Old-style arguments are deprecated; see --help for new-style arguments
[static_transform_publisher-3] [ERROR] [1734471009.945159818] []: error parsing command line arguments: Failed to parse qw argument as float
[static_transform_publisher-4] [WARN] [1734471009.945478789] []: Old-style arguments are deprecated; see --help for new-style arguments
[static_transform_publisher-4] [ERROR] [1734471009.945566789] []: error parsing command line arguments: Failed to parse qw argument as float
[static_transform_publisher-5] [WARN] [1734471009.945770158] []: Old-style arguments are deprecated; see --help for new-style arguments
[static_transform_publisher-5] [ERROR] [1734471009.945856485] []: error parsing command line arguments: Failed to parse qw argument as float
[static_transform_publisher-6] [WARN] [1734471009.944685638] []: Old-style arguments are deprecated; see --help for new-style arguments
[static_transform_publisher-6] [ERROR] [1734471009.944757475] []: error parsing command line arguments: Failed to parse qw argument as float
[republish-7] [WARN] [1734471009.946169654] [rcl]: Found remap rule 'in:=/camera/left/image'. This syntax is deprecated. Use '--ros-args --remap in:=/camera/left/image' instead.
[republish-7] [WARN] [1734471009.946187242] [rcl]: Found remap rule 'out:=/stereo_camera/left/image_raw_throttle_relay'. This syntax is deprecated. Use '--ros-args --remap out:=/stereo_camera/left/image_raw_throttle_relay' instead.
[republish-8] [WARN] [1734471009.945504713] [rcl]: Found remap rule 'in:=/camera/right/image'. This syntax is deprecated. Use '--ros-args --remap in:=/camera/right/image' instead.
[republish-8] [WARN] [1734471009.945515288] [rcl]: Found remap rule 'out:=/stereo_camera/right/image_raw_throttle_relay'. This syntax is deprecated. Use '--ros-args --remap out:=/stereo_camera/right/image_raw_throttle_relay' instead.
[map_saver_server-14] [INFO] [1734471009.970245302] [map_saver_server]: 
[map_saver_server-14] 	map_saver_server lifecycle node launched. 
[map_saver_server-14] 	Waiting on external lifecycle transitions to activate
[map_saver_server-14] 	See https://design.ros2.org/articles/node_lifecycle.html for more information.
[map_saver_server-14] [INFO] [1734471009.970327262] [map_saver_server]: Creating
[sync_topics-1] Traceback (most recent call last):
[sync_topics-1]   File "/home/parastou/ros2_ws/install/tractor_description/lib/tractor_description/sync_topics", line 33, in <module>
[sync_topics-1]     sys.exit(load_entry_point('tractor-description', 'console_scripts', 'sync_topics')())
[sync_topics-1]   File "/home/parastou/ros2_ws/install/tractor_description/lib/tractor_description/sync_topics", line 25, in importlib_load_entry_point
[sync_topics-1]     return next(matches).load()
[sync_topics-1]   File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
[sync_topics-1]     module = import_module(match.group('module'))
[sync_topics-1]   File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
[sync_topics-1]     return _bootstrap._gcd_import(name[level:], package, level)
[sync_topics-1]   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
[sync_topics-1]   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
[sync_topics-1]   File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
[sync_topics-1] ModuleNotFoundError: No module named 'tractor_description.sync_topics'
[ERROR] [sync_topics-1]: process has died [pid 23802, exit code 1, cmd '/home/parastou/ros2_ws/install/tractor_description/lib/tractor_description/sync_topics --ros-args -r __node:=topic_synchronizer'].
[rgbd_sync-13] terminate called after throwing an instance of 'rclcpp::exceptions::InvalidParameterTypeException'
[rgbd_sync-13]   what():  parameter 'approx_sync' has invalid type: Wrong parameter type, parameter {approx_sync} is of type {bool}, setting it to {string} is not allowed.
[rtabmap-12] [INFO] [1734471010.139079927] [rtabmap]: rtabmap(maps): latch                      = true
[rtabmap-12] [INFO] [1734471010.139219699] [rtabmap]: rtabmap(maps): map_filter_radius          = 0.000000
[rtabmap-12] [INFO] [1734471010.139241025] [rtabmap]: rtabmap(maps): map_filter_angle           = 30.000000
[rtabmap-12] [INFO] [1734471010.139248828] [rtabmap]: rtabmap(maps): map_cleanup                = true
[rtabmap-12] [INFO] [1734471010.139254237] [rtabmap]: rtabmap(maps): map_always_update          = false
[rtabmap-12] [INFO] [1734471010.139259507] [rtabmap]: rtabmap(maps): map_empty_ray_tracing      = true
[rtabmap-12] [INFO] [1734471010.139264492] [rtabmap]: rtabmap(maps): cloud_output_voxelized     = true
[rtabmap-12] [INFO] [1734471010.139270891] [rtabmap]: rtabmap(maps): cloud_subtract_filtering   = false
[rtabmap-12] [INFO] [1734471010.139276074] [rtabmap]: rtabmap(maps): cloud_subtract_filtering_min_neighbors = 2
[rtabmap-12] [INFO] [1734471010.139327597] [rtabmap]: rtabmap(maps): octomap_tree_depth         = 16
[stereo_odometry-11] [INFO] [1734471010.145605089] [stereo_odometry]: Odometry: frame_id               = base_footprint
[stereo_odometry-11] [INFO] [1734471010.145743162] [stereo_odometry]: Odometry: odom_frame_id          = odom
[stereo_odometry-11] [INFO] [1734471010.145757948] [stereo_odometry]: Odometry: publish_tf             = true
[stereo_odometry-11] [INFO] [1734471010.145775603] [stereo_odometry]: Odometry: wait_for_transform     = 0.100000
[stereo_odometry-11] [INFO] [1734471010.145796928] [stereo_odometry]: Odometry: log_to_rosout_level    = 4
[stereo_odometry-11] [INFO] [1734471010.145824407] [stereo_odometry]: Odometry: initial_pose           = xyz=0.000000,0.000000,0.000000 rpy=0.000000,-0.000000,0.000000
[stereo_odometry-11] [INFO] [1734471010.145836081] [stereo_odometry]: Odometry: ground_truth_frame_id  = 
[stereo_odometry-11] [INFO] [1734471010.145846038] [stereo_odometry]: Odometry: ground_truth_base_frame_id = base_footprint
[stereo_odometry-11] [INFO] [1734471010.145855396] [stereo_odometry]: Odometry: config_path            = 
[stereo_odometry-11] [INFO] [1734471010.145864382] [stereo_odometry]: Odometry: publish_null_when_lost = true
[stereo_odometry-11] [INFO] [1734471010.145872819] [stereo_odometry]: Odometry: publish_compressed_sensor_data = false
[stereo_odometry-11] [INFO] [1734471010.145881642] [stereo_odometry]: Odometry: guess_frame_id         = 
[stereo_odometry-11] [INFO] [1734471010.145890420] [stereo_odometry]: Odometry: guess_min_translation  = 0.000000
[stereo_odometry-11] [INFO] [1734471010.145900003] [stereo_odometry]: Odometry: guess_min_rotation     = 0.000000
[stereo_odometry-11] [INFO] [1734471010.145909258] [stereo_odometry]: Odometry: guess_min_time         = 0.000000
[stereo_odometry-11] [INFO] [1734471010.145918364] [stereo_odometry]: Odometry: expected_update_rate   = 0.000000 Hz
[stereo_odometry-11] [INFO] [1734471010.145927737] [stereo_odometry]: Odometry: max_update_rate        = 0.000000 Hz
[stereo_odometry-11] [INFO] [1734471010.145936705] [stereo_odometry]: Odometry: min_update_rate        = 0.000000 Hz
[stereo_odometry-11] [INFO] [1734471010.145945843] [stereo_odometry]: Odometry: wait_imu_to_init       = false
[stereo_odometry-11] [INFO] [1734471010.145954151] [stereo_odometry]: Odometry: always_check_imu_tf    = true
[stereo_odometry-11] [INFO] [1734471010.145962551] [stereo_odometry]: Odometry: sensor_data_compression_format = .jpg
[stereo_odometry-11] [INFO] [1734471010.145971092] [stereo_odometry]: Odometry: sensor_data_parallel_compression = true
[stereo_odometry-11] [INFO] [1734471010.146068374] [stereo_odometry]: Odometry: stereoParams_=1 visParams_=1 icpParams_=0
[rtabmap-12] [INFO] [1734471010.153836988] [rtabmap]: rtabmap: frame_id      = base_footprint
[rtabmap-12] [INFO] [1734471010.153869126] [rtabmap]: rtabmap: map_frame_id  = map
[rtabmap-12] [INFO] [1734471010.153880088] [rtabmap]: rtabmap: log_to_rosout_level  = 4
[rtabmap-12] [INFO] [1734471010.153893347] [rtabmap]: rtabmap: initial_pose  = 
[rtabmap-12] [INFO] [1734471010.153901951] [rtabmap]: rtabmap: use_action_for_goal  = false
[rtabmap-12] [INFO] [1734471010.153910029] [rtabmap]: rtabmap: tf_delay      = 0.050000
[rtabmap-12] [INFO] [1734471010.153922002] [rtabmap]: rtabmap: tf_tolerance  = 0.100000
[rtabmap-12] [INFO] [1734471010.153931045] [rtabmap]: rtabmap: odom_sensor_sync   = false
[rtabmap-12] [INFO] [1734471010.153938722] [rtabmap]: rtabmap: pub_loc_pose_only_when_localizing = false
[rtabmap-12] [INFO] [1734471010.153946728] [rtabmap]: rtabmap: stereo_to_depth = false
[rtabmap-12] [INFO] [1734471010.153954442] [rtabmap]: rtabmap: gen_scan  = false
[rtabmap-12] [INFO] [1734471010.153961959] [rtabmap]: rtabmap: gen_depth  = false
[stereo_odometry-11] [INFO] [1734471010.169300001] [stereo_odometry]: StereoOdometry: approx_sync = true
[stereo_odometry-11] [INFO] [1734471010.169335797] [stereo_odometry]: StereoOdometry: approx_sync_max_interval = 0.000000
[stereo_odometry-11] [INFO] [1734471010.169351268] [stereo_odometry]: StereoOdometry: topic_queue_size  = 10
[stereo_odometry-11] [INFO] [1734471010.169361280] [stereo_odometry]: StereoOdometry: sync_queue_size   = 5
[stereo_odometry-11] [INFO] [1734471010.169370510] [stereo_odometry]: StereoOdometry: qos             = 0
[stereo_odometry-11] [INFO] [1734471010.169379321] [stereo_odometry]: StereoOdometry: qos_camera_info = 0
[stereo_odometry-11] [INFO] [1734471010.169387673] [stereo_odometry]: StereoOdometry: subscribe_rgbd = false
[stereo_odometry-11] [INFO] [1734471010.169395847] [stereo_odometry]: StereoOdometry: keep_color     = false
[stereo_odometry-11] [INFO] [1734471010.173851782] [stereo_odometry]: 
[stereo_odometry-11] stereo_odometry subscribed to (approx sync, topic_queue_size=10, sync_queue_size=5):
[stereo_odometry-11]    /stereo_camera/left/image_rect_color \
[stereo_odometry-11]    /stereo_camera/right/image_rect \
[stereo_odometry-11]    /stereo_camera/left/camera_info_throttle \
[stereo_odometry-11]    /stereo_camera/right/camera_info_throttle
[rtabmap-12] [INFO] [1734471010.178725781] [rtabmap]: RTAB-Map detection rate = 1.000000 Hz
[rtabmap-12] [INFO] [1734471010.178856719] [rtabmap]: rtabmap: Deleted database "/home/parastou/.ros/rtabmap.db" (--delete_db_on_start or -d are set).
[rtabmap-12] [INFO] [1734471010.178875630] [rtabmap]: rtabmap: Using database from "/home/parastou/.ros/rtabmap.db" (0 MB).
[ERROR] [rgbd_sync-13]: process has died [pid 23826, exit code -6, cmd '/home/parastou/rtabmap_ws/install/rtabmap_sync/lib/rtabmap_sync/rgbd_sync --ros-args -r __node:=rgbd_sync --params-file /tmp/launch_params_gb76b_g_ -r rgb/image:=/stereo_camera/left/image_rect_color -r depth/image:=/stereo_camera/right/image_rect -r rgb/camera_info:=/stereo_camera/left/camera_info_throttle -r rgbd_image:=/rgbd_image'].
[rtabmap-12] [INFO] [1734471010.231079233] [rtabmap]: rtabmap: Database version = "0.21.6".
[rtabmap-12] [INFO] [1734471010.231117378] [rtabmap]: rtabmap: SLAM mode (Mem/IncrementalMemory=true)
[rtabmap-12] [INFO] [1734471010.255042483] [rtabmap]: Setup callbacks
[rtabmap-12] [WARN] [1734471010.255167739] [rtabmap]: rtabmap: Parameters subscribe_stereo and subscribe_rgb cannot be true at the same time. Parameter subscribe_rgb is set to false.
[rtabmap-12] [INFO] [1734471010.255457989] [rtabmap]: rtabmap: subscribe_depth = false
[rtabmap-12] [INFO] [1734471010.255482830] [rtabmap]: rtabmap: subscribe_rgb = false
[rtabmap-12] [INFO] [1734471010.255498914] [rtabmap]: rtabmap: subscribe_stereo = true
[rtabmap-12] [INFO] [1734471010.255514465] [rtabmap]: rtabmap: subscribe_rgbd = false (rgbd_cameras=1)
[rtabmap-12] [INFO] [1734471010.255535033] [rtabmap]: rtabmap: subscribe_sensor_data = false
[rtabmap-12] [INFO] [1734471010.255551063] [rtabmap]: rtabmap: subscribe_odom_info = false
[rtabmap-12] [INFO] [1734471010.255565242] [rtabmap]: rtabmap: subscribe_user_data = false
[rtabmap-12] [INFO] [1734471010.255578856] [rtabmap]: rtabmap: subscribe_scan = false
[rtabmap-12] [INFO] [1734471010.255602135] [rtabmap]: rtabmap: subscribe_scan_cloud = false
[rtabmap-12] [INFO] [1734471010.255616115] [rtabmap]: rtabmap: subscribe_scan_descriptor = false
[rtabmap-12] [INFO] [1734471010.255630515] [rtabmap]: rtabmap: topic_queue_size = 10
[rtabmap-12] [INFO] [1734471010.255645749] [rtabmap]: rtabmap: sync_queue_size  = 10
[rtabmap-12] [INFO] [1734471010.255659768] [rtabmap]: rtabmap: qos_image       = 0
[rtabmap-12] [INFO] [1734471010.255674540] [rtabmap]: rtabmap: qos_camera_info = 0
[rtabmap-12] [INFO] [1734471010.255688541] [rtabmap]: rtabmap: qos_scan        = 0
[rtabmap-12] [INFO] [1734471010.255702311] [rtabmap]: rtabmap: qos_odom        = 0
[rtabmap-12] [INFO] [1734471010.255716007] [rtabmap]: rtabmap: qos_user_data   = 0
[rtabmap-12] [INFO] [1734471010.255729881] [rtabmap]: rtabmap: approx_sync     = true
[rtabmap-12] [INFO] [1734471010.255803105] [rtabmap]: Setup stereo callback
[rtabmap-12] [INFO] [1734471010.261428871] [rtabmap]: 
[rtabmap-12] rtabmap subscribed to (approx sync):
[rtabmap-12]    /stereo_odometry \
[rtabmap-12]    /stereo_camera/left/image_rect_color \
[rtabmap-12]    /stereo_camera/right/image_rect \
[rtabmap-12]    /stereo_camera/left/camera_info_throttle \
[rtabmap-12]    /stereo_camera/right/camera_info_throttle
[stereo_odometry-11] [WARN] [1734471015.176003131] [stereo_odometry]: stereo_odometry: Did not receive data since 5 seconds! Make sure the input topics are published ("$ rostopic hz my_topic") and the timestamps in their header are set. 
[stereo_odometry-11] stereo_odometry subscribed to (approx sync, topic_queue_size=10, sync_queue_size=5):
[stereo_odometry-11]    /stereo_camera/left/image_rect_color \
[stereo_odometry-11]    /stereo_camera/right/image_rect \
[stereo_odometry-11]    /stereo_camera/left/camera_info_throttle \
[stereo_odometry-11]    /stereo_camera/right/camera_info_throttle
[rtabmap-12] [WARN] [1734471015.263559194] [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-12] rtabmap subscribed to (approx sync):
[rtabmap-12]    /stereo_odometry \
[rtabmap-12]    /stereo_camera/left/image_rect_color \
[rtabmap-12]    /stereo_camera/right/image_rect \
[rtabmap-12]    /stereo_camera/left/camera_info_throttle \
[rtabmap-12]    /stereo_camera/right/camera_info_throttle
[stereo_odometry-11] [WARN] [1734471020.176470929] [stereo_odometry]: stereo_odometry: Did not receive data since 5 seconds! Make sure the input topics are published ("$ rostopic hz my_topic") and the timestamps in their header are set.
ros2 topic hz /camera/left/image
average rate: 1.459
	min: 0.674s max: 0.708s std dev: 0.01587s window: 3
average rate: 1.032
	min: 0.674s max: 2.095s std dev: 0.56321s window: 5
average rate: 1.119
	min: 0.674s max: 2.095s std dev: 0.49093s window: 7
average rate: 1.180
	min: 0.674s max: 2.095s std dev: 0.44128s window: 9
average rate: 1.222
	min: 0.674s max: 2.095s std dev: 0.40393s window: 11
average rate: 1.254
	min: 0.666s max: 2.095s std dev: 0.37485s window: 13
average rate: 1.278
	min: 0.666s max: 2.095s std dev: 0.35116s window: 15
average rate: 1.295
	min: 0.666s max: 2.095s std dev: 0.33097s window: 17
average rate: 1.307
	min: 0.666s max: 2.095s std dev: 0.31390s window: 19
average rate: 1.200
	min: 0.666s max: 2.123s std dev: 0.42567s window: 20
average rate: 1.219
	min: 0.666s max: 2.123s std dev: 0.40792s window: 22
average rate: 1.152
	min: 0.666s max: 2.123s std dev: 0.46758s window: 24
average rate: 1.171
	min: 0.666s max: 2.123s std dev: 0.45180s window: 26

parastoobakhtiarii avatar Dec 17 '24 22:12 parastoobakhtiarii

I would suggest to record camera data directly into a ros bag, because you need the camera_info, /tf, /tf_static topics. You are setting Identity TF between all sensors, which looks wrong. depthai ros wrapper should already give you /tf and /tf_static, and the camera_info topics.

Frame rate of 1 Hz is too low. At least 10 Hz is required unless you are moving very slowly and the frames are perfectly already synchronized.

matlabbe avatar Dec 22 '24 20:12 matlabbe