Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTABMAP republish doesn't accept camera input topic #1133

Closed
lempiy opened this issue Mar 9, 2024 · 5 comments
Closed

RTABMAP republish doesn't accept camera input topic #1133

lempiy opened this issue Mar 9, 2024 · 5 comments

Comments

@lempiy
Copy link

lempiy commented Mar 9, 2024

Hi.
I'm trying to make RTabmap + ORBSLAM3 working together. I managed to compile everything on ros noetic, including ORBSLAM3 lib, rtabmap with -DWITH_ORB_SLAM=ON and rtabmap_ros.

rtabmap --version
RTAB-Map:               0.21.4
PCL:                    1.10.0
With VTK:                7.1.1
OpenCV:                  4.2.0
With OpenCV xfeatures2d: false
With OpenCV nonfree:     false
With ORB OcTree:          true
With SuperPoint Torch:   false
With Python3:            false
With FastCV:             false
With OpenGV:             false
With Madgwick:            true
With PDAL:               false
With TORO:                true
With g2o:                false
With GTSAM:               true
With Vertigo:             true
With CVSBA:              false
With Ceres:              false
With OpenNI2:             true
With Freenect:           false
With Freenect2:          false
With K4W2:               false
With K4A:                false
With DC1394:              true
With FlyCapture2:        false
With ZED:                false
With ZED Open Capture:   false
With RealSense:          false
With RealSense SLAM:     false
With RealSense2:          true
With MYNT EYE S:         false
With DepthAI:            false
With libpointmatcher:     true
With CCCoreLib:          false
With Open3D:             false
With OctoMap:             true
With GridMap:             true
With cpu-tsdf:           false
With open chisel:        false
With Alice Vision:       false
With LOAM:               false
With FLOAM:              false
With FOVIS:              false
With Viso2:              false
With DVO:                false
With ORB_SLAM3:           true  <--- it's linked
With OKVIS:              false
With MSCKF_VIO:          false
With VINS-Fusion:        false
With OpenVINS:           false

I'm starting my ros launch config:
roslaunch realsense2_camera rs_rtabmap_d455.launch

<launch>
    <!-- 
          NOTICE: Installation of rtabmap is required for using this launch file:
                  For installation type:
                        apt-get install ros-kinetic-rtabmap-ros
    -->
    <arg name="device_type_camera1"       default="d4.5"/>	<!-- Note: using regular expression. match D435, D435i, D415... -->
    <arg name="serial_no_camera1"         default=""/>
    <arg name="camera1"                   default="d455"/>
    <arg name="clip_distance"             default="-2"/>
    <arg name="use_rviz"                  default="true"/>
    <arg name="use_rtabmapviz"            default="true"/>
    
    <include file="$(find realsense2_camera)/launch/rs_camera.launch">
              <arg name="enable_infra"        value="true"/>
              <arg name="enable_gyro"         value="true"/>
              <arg name="enable_accel"        value="true"/>
              <arg name="enable_pointcloud"   value="true"/>
              <arg name="align_depth"         value="true"/>
              <arg name="unite_imu_method"    value="copy"/>
    </include>

    <!-- Start IMU filter -->
    <node pkg="imu_filter_madgwick" type="imu_filter_node" name="imu_filter" output="screen">
        <param name="use_mag" value="false" />
        <param name="publish_tf" value="false" />
        <param name="world_frame" value="enu" />
        <remap from="/imu/data_raw" to="/camera/imu" />
        <remap from="/imu/data" to="/rtabmap/imu" />
    </node>
    
    <include file="$(find rtabmap_ros)/launch/rtabmap.launch">
            <arg name="rtabmap_args"       value="--delete_db_on_start"/>
            <arg name="rgbd_topic"         value="/camera/aligned_depth_to_color/image_raw"/>
            <arg name="subscribe_rgbd"     value="true"/>
            <arg name="frame_id"           value="camera_link"/>
            <arg name="rgb_topic"          value="/camera/color/image_raw"/>
            <arg name="camera_info_topic"  value="/camera/color/camera_info"/>
            <arg name="queue_size"         value="200"/>
            <arg name="wait_imu_to_init"   value="true" />
            <arg name="imu_topic"          value="/rtabmap/imu"/>
            <arg name="rviz"               value="$(arg use_rviz)"/>
            <arg name="rtabmapviz"         value="$(arg use_rtabmapviz)"/>
            <arg name="cfg"                value="$(find realsense2_camera)/launch/rtabmap.ini" />
   </include>
</launch>

Getting error

Client [/rtabmap/republish_rgbd_image] wants topic /camera/aligned_depth_to_color/image_raw to have datatype/md5sum [rtabmap_msgs/RGBDImage/affef6cc8804ffba98ce6ed6f1ca8942], but our version has [sensor_msgs/Image/060021388200f6f0f447d0fcd9c64743]. Dropping connection.

Why /rtabmap/republish_rgbd expects rtabmap_msgs/RGBDImage ?
Would be thankful for help.

@matlabbe
Copy link
Member

matlabbe commented Mar 9, 2024

I think you meant:

<arg name="depth_topic"       value="/camera/aligned_depth_to_color/image_raw"/>
<arg name="subscribe_rgbd"    value="false"/>

or

<arg name="depth_topic"       value="/camera/aligned_depth_to_color/image_raw"/>
<arg name="rgbd_sync"         value="true"/>

I think with D400 series, you could also set

<arg name="approx_sync"         value="false"/> <!-- if rgbd_sync is not set -->
<arg name="approx_rgbd_sync"    value="false"/> <!-- if rgbd_sync is set -->

@lempiy
Copy link
Author

lempiy commented Mar 10, 2024

Thank you for your rapid answer.
Fixing topic from rgbd -> depth resolved problem with datatypes.

But now I got rgbd_odometry crashing after ORB Voc loaded

Vocabulary loaded!

Initialization of Atlas from scratch 
Creation of new map with id: 0
Creation of new map with last KF id: 0
Seq. Name: 
[rtabmap/rgbd_odometry-6] process has died [pid 16803, exit code -11, cmd /home/anton/Projects/rtabmap_ros/devel/lib/rtabmap_odom/rgbd_odometry --delete_db_on_start rgb/image:=/camera/color/image_raw depth/image:=/camera/aligned_depth_to_color/image_raw rgb/camera_info:=/camera/color/camera_info rgbd_image:=rgbd_image odom:=odom imu:=/rtabmap/imu __name:=rgbd_odometry __log:=/home/anton/.ros/log/a48aaf0e-deee-11ee-9aed-4338ecc5a3fa/rtabmap-rgbd_odometry-6.log].
log file: /home/anton/.ros/log/a48aaf0e-deee-11ee-9aed-4338ecc5a3fa/rtabmap-rgbd_odometry-6*.log

This happens in both cases (<arg name="rgbd_sync" value="true"/> and <arg name="rgbd_sync" value="false"/>)

Maybe you have some suggestion how to get more debug information about a reason of the crash?
/home/anton/.ros/log/a48aaf0e-deee-11ee-9aed-4338ecc5a3fa/rtabmap-rgbd_odometry-6.log, appearently, doesn't exist after error.

Thanks.

@lempiy
Copy link
Author

lempiy commented Mar 10, 2024

Full log:

... logging to /home/anton/.ros/log/b31ff276-def4-11ee-9aed-4338ecc5a3fa/roslaunch-anton-45029.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
�]2;/opt/ros/noetic/share/realsense2_camera/launch/rs_rtabmap_d455.launch�
�[1mstarted roslaunch server http://anton:44159/�[0m

SUMMARY
========

CLEAR PARAMETERS
 * /points_xyzrgb/
 * /rtabmap/rgbd_odometry/
 * /rtabmap/rgbd_sync/
 * /rtabmap/rtabmap/
 * /rtabmap/rtabmap_viz/

PARAMETERS
 * /camera/realsense2_camera/accel_fps: -1
 * /camera/realsense2_camera/accel_frame_id: camera_accel_frame
 * /camera/realsense2_camera/accel_optical_frame_id: camera_accel_opti...
 * /camera/realsense2_camera/align_depth: True
 * /camera/realsense2_camera/aligned_depth_to_color_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_fisheye1_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_fisheye2_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_fisheye_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_infra1_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_infra2_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/allow_no_texture_points: False
 * /camera/realsense2_camera/base_frame_id: camera_link
 * /camera/realsense2_camera/calib_odom_file: 
 * /camera/realsense2_camera/clip_distance: -2.0
 * /camera/realsense2_camera/color_fps: -1
 * /camera/realsense2_camera/color_frame_id: camera_color_frame
 * /camera/realsense2_camera/color_height: -1
 * /camera/realsense2_camera/color_optical_frame_id: camera_color_opti...
 * /camera/realsense2_camera/color_width: -1
 * /camera/realsense2_camera/confidence_fps: -1
 * /camera/realsense2_camera/confidence_height: -1
 * /camera/realsense2_camera/confidence_width: -1
 * /camera/realsense2_camera/depth_fps: -1
 * /camera/realsense2_camera/depth_frame_id: camera_depth_frame
 * /camera/realsense2_camera/depth_height: -1
 * /camera/realsense2_camera/depth_optical_frame_id: camera_depth_opti...
 * /camera/realsense2_camera/depth_width: -1
 * /camera/realsense2_camera/device_type: 
 * /camera/realsense2_camera/enable_accel: True
 * /camera/realsense2_camera/enable_color: True
 * /camera/realsense2_camera/enable_confidence: True
 * /camera/realsense2_camera/enable_depth: True
 * /camera/realsense2_camera/enable_fisheye1: False
 * /camera/realsense2_camera/enable_fisheye2: False
 * /camera/realsense2_camera/enable_fisheye: False
 * /camera/realsense2_camera/enable_gyro: True
 * /camera/realsense2_camera/enable_infra1: False
 * /camera/realsense2_camera/enable_infra2: False
 * /camera/realsense2_camera/enable_infra: True
 * /camera/realsense2_camera/enable_pointcloud: True
 * /camera/realsense2_camera/enable_pose: False
 * /camera/realsense2_camera/enable_sync: False
 * /camera/realsense2_camera/filters: 
 * /camera/realsense2_camera/fisheye1_frame_id: camera_fisheye1_f...
 * /camera/realsense2_camera/fisheye1_optical_frame_id: camera_fisheye1_o...
 * /camera/realsense2_camera/fisheye2_frame_id: camera_fisheye2_f...
 * /camera/realsense2_camera/fisheye2_optical_frame_id: camera_fisheye2_o...
 * /camera/realsense2_camera/fisheye_fps: -1
 * /camera/realsense2_camera/fisheye_frame_id: camera_fisheye_frame
 * /camera/realsense2_camera/fisheye_height: -1
 * /camera/realsense2_camera/fisheye_optical_frame_id: camera_fisheye_op...
 * /camera/realsense2_camera/fisheye_width: -1
 * /camera/realsense2_camera/gyro_fps: -1
 * /camera/realsense2_camera/gyro_frame_id: camera_gyro_frame
 * /camera/realsense2_camera/gyro_optical_frame_id: camera_gyro_optic...
 * /camera/realsense2_camera/imu_optical_frame_id: camera_imu_optica...
 * /camera/realsense2_camera/infra1_frame_id: camera_infra1_frame
 * /camera/realsense2_camera/infra1_optical_frame_id: camera_infra1_opt...
 * /camera/realsense2_camera/infra2_frame_id: camera_infra2_frame
 * /camera/realsense2_camera/infra2_optical_frame_id: camera_infra2_opt...
 * /camera/realsense2_camera/infra_fps: 30
 * /camera/realsense2_camera/infra_height: 480
 * /camera/realsense2_camera/infra_rgb: False
 * /camera/realsense2_camera/infra_width: 848
 * /camera/realsense2_camera/initial_reset: False
 * /camera/realsense2_camera/json_file_path: 
 * /camera/realsense2_camera/linear_accel_cov: 0.01
 * /camera/realsense2_camera/odom_frame_id: camera_odom_frame
 * /camera/realsense2_camera/ordered_pc: False
 * /camera/realsense2_camera/pointcloud_texture_index: 0
 * /camera/realsense2_camera/pointcloud_texture_stream: RS2_STREAM_COLOR
 * /camera/realsense2_camera/pose_frame_id: camera_pose_frame
 * /camera/realsense2_camera/pose_optical_frame_id: camera_pose_optic...
 * /camera/realsense2_camera/publish_odom_tf: True
 * /camera/realsense2_camera/publish_tf: True
 * /camera/realsense2_camera/reconnect_timeout: 6.0
 * /camera/realsense2_camera/rosbag_filename: 
 * /camera/realsense2_camera/serial_no: 
 * /camera/realsense2_camera/stereo_module/exposure/1: 7500
 * /camera/realsense2_camera/stereo_module/exposure/2: 1
 * /camera/realsense2_camera/stereo_module/gain/1: 16
 * /camera/realsense2_camera/stereo_module/gain/2: 16
 * /camera/realsense2_camera/tf_publish_rate: 0.0
 * /camera/realsense2_camera/topic_odom_in: odom_in
 * /camera/realsense2_camera/unite_imu_method: copy
 * /camera/realsense2_camera/usb_port_id: 
 * /camera/realsense2_camera/wait_for_device_timeout: -1.0
 * /imu_filter/publish_tf: False
 * /imu_filter/use_mag: False
 * /imu_filter/world_frame: enu
 * /points_xyzrgb/approx_sync: True
 * /points_xyzrgb/approx_sync_max_interval: 0.0
 * /points_xyzrgb/decimation: 4.0
 * /points_xyzrgb/voxel_size: 0.0
 * /rosdistro: noetic
 * /rosversion: 1.16.0
 * /rtabmap/rgbd_odometry/approx_sync: True
 * /rtabmap/rgbd_odometry/approx_sync_max_interval: 0.0
 * /rtabmap/rgbd_odometry/config_path: /opt/ros/noetic/s...
 * /rtabmap/rgbd_odometry/expected_update_rate: 0.0
 * /rtabmap/rgbd_odometry/frame_id: camera_link
 * /rtabmap/rgbd_odometry/ground_truth_base_frame_id: 
 * /rtabmap/rgbd_odometry/ground_truth_frame_id: 
 * /rtabmap/rgbd_odometry/guess_frame_id: 
 * /rtabmap/rgbd_odometry/guess_min_rotation: 0.0
 * /rtabmap/rgbd_odometry/guess_min_translation: 0.0
 * /rtabmap/rgbd_odometry/keep_color: False
 * /rtabmap/rgbd_odometry/max_update_rate: 0.0
 * /rtabmap/rgbd_odometry/odom_frame_id: odom
 * /rtabmap/rgbd_odometry/publish_tf: True
 * /rtabmap/rgbd_odometry/queue_size: 200
 * /rtabmap/rgbd_odometry/subscribe_rgbd: False
 * /rtabmap/rgbd_odometry/wait_for_transform_duration: 0.2
 * /rtabmap/rgbd_odometry/wait_imu_to_init: True
 * /rtabmap/rgbd_sync/approx_sync: False
 * /rtabmap/rgbd_sync/approx_sync_max_interval: 0.0
 * /rtabmap/rgbd_sync/decimation: 1.0
 * /rtabmap/rgbd_sync/depth_scale: 1.0
 * /rtabmap/rgbd_sync/queue_size: 200
 * /rtabmap/rtabmap/Mem/IncrementalMemory: true
 * /rtabmap/rtabmap/Mem/InitWMWithAllNodes: false
 * /rtabmap/rtabmap/approx_sync: True
 * /rtabmap/rtabmap/config_path: /opt/ros/noetic/s...
 * /rtabmap/rtabmap/database_path: ~/.ros/rtabmap.db
 * /rtabmap/rtabmap/frame_id: camera_link
 * /rtabmap/rtabmap/gen_depth: False
 * /rtabmap/rtabmap/gen_depth_decimation: 1
 * /rtabmap/rtabmap/gen_depth_fill_holes_error: 0.1
 * /rtabmap/rtabmap/gen_depth_fill_holes_size: 0
 * /rtabmap/rtabmap/gen_depth_fill_iterations: 1
 * /rtabmap/rtabmap/gen_scan: False
 * /rtabmap/rtabmap/ground_truth_base_frame_id: 
 * /rtabmap/rtabmap/ground_truth_frame_id: 
 * /rtabmap/rtabmap/initial_pose: 
 * /rtabmap/rtabmap/landmark_angular_variance: 9999.0
 * /rtabmap/rtabmap/landmark_linear_variance: 0.0001
 * /rtabmap/rtabmap/loc_thr: 0.0
 * /rtabmap/rtabmap/map_frame_id: map
 * /rtabmap/rtabmap/odom_frame_id: 
 * /rtabmap/rtabmap/odom_frame_id_init: 
 * /rtabmap/rtabmap/odom_sensor_sync: False
 * /rtabmap/rtabmap/odom_tf_angular_variance: 0.001
 * /rtabmap/rtabmap/odom_tf_linear_variance: 0.001
 * /rtabmap/rtabmap/publish_tf: True
 * /rtabmap/rtabmap/queue_size: 200
 * /rtabmap/rtabmap/scan_cloud_max_points: 0
 * /rtabmap/rtabmap/subscribe_depth: True
 * /rtabmap/rtabmap/subscribe_odom_info: True
 * /rtabmap/rtabmap/subscribe_rgb: True
 * /rtabmap/rtabmap/subscribe_rgbd: False
 * /rtabmap/rtabmap/subscribe_scan: False
 * /rtabmap/rtabmap/subscribe_scan_cloud: False
 * /rtabmap/rtabmap/subscribe_scan_descriptor: False
 * /rtabmap/rtabmap/subscribe_stereo: False
 * /rtabmap/rtabmap/subscribe_user_data: False
 * /rtabmap/rtabmap/wait_for_transform_duration: 0.2
 * /rtabmap/rtabmap_viz/approx_sync: True
 * /rtabmap/rtabmap_viz/frame_id: camera_link
 * /rtabmap/rtabmap_viz/odom_frame_id: 
 * /rtabmap/rtabmap_viz/queue_size: 200
 * /rtabmap/rtabmap_viz/subscribe_depth: True
 * /rtabmap/rtabmap_viz/subscribe_odom_info: True
 * /rtabmap/rtabmap_viz/subscribe_rgb: True
 * /rtabmap/rtabmap_viz/subscribe_rgbd: False
 * /rtabmap/rtabmap_viz/subscribe_scan: False
 * /rtabmap/rtabmap_viz/subscribe_scan_cloud: False
 * /rtabmap/rtabmap_viz/subscribe_scan_descriptor: False
 * /rtabmap/rtabmap_viz/subscribe_stereo: False
 * /rtabmap/rtabmap_viz/wait_for_transform_duration: 0.2

NODES
  /
    imu_filter (imu_filter_madgwick/imu_filter_node)
    points_xyzrgb (nodelet/nodelet)
    rviz (rviz/rviz)
  /camera/
    realsense2_camera (nodelet/nodelet)
    realsense2_camera_manager (nodelet/nodelet)
  /rtabmap/
    rgbd_odometry (rtabmap_odom/rgbd_odometry)
    rgbd_sync (nodelet/nodelet)
    rtabmap (rtabmap_slam/rtabmap)
    rtabmap_viz (rtabmap_viz/rtabmap_viz)
�[0m[ INFO] [1710085306.329369394]: Initializing nodelet with 4 worker threads.�[0m
�[0m[ INFO] [1710085306.750707652]: RealSense ROS v2.3.2�[0m
�[0m[ INFO] [1710085306.752588816]: Built with LibRealSense v2.50.0�[0m
�[0m[ INFO] [1710085306.752824842]: Running with LibRealSense v2.50.0�[0m
�[0m[ INFO] [1710085306.850955545]:  �[0m
 10/03 17:41:46,951 WARNING [140463160260352] (messenger-libusb.cpp:42) control_transfer returned error, index: 300, error: Success, number: 0
 10/03 17:41:47,003 WARNING [140463160260352] (messenger-libusb.cpp:42) control_transfer returned error, index: 300, error: Success, number: 0
�[0m[ INFO] [1710085307.154778373]: Device with serial number 151422252931 was found.
�[0m
�[0m[ INFO] [1710085307.155092993]: Device with physical ID 1-3-7 was found.�[0m
�[0m[ INFO] [1710085307.155287444]: Device with name Intel RealSense D455 was found.�[0m
�[0m[ INFO] [1710085307.156101910]: Device with port number 1-3 was found.�[0m
�[0m[ INFO] [1710085307.156374692]: Device USB type: 2.1�[0m
�[0m[ INFO] [1710085307.160889145]: getParameters...�[0m
�[0m[ INFO] [1710085307.343078624]: setupDevice...�[0m
�[0m[ INFO] [1710085307.343256409]: JSON file is not provided�[0m
�[0m[ INFO] [1710085307.343384908]: ROS Node Namespace: camera�[0m
�[0m[ INFO] [1710085307.343509857]: Device Name: Intel RealSense D455�[0m
�[0m[ INFO] [1710085307.343628970]: Device Serial No: 151422252931�[0m
�[0m[ INFO] [1710085307.343747673]: Device physical port: 1-3-7�[0m
�[0m[ INFO] [1710085307.343868324]: Device FW version: 05.15.01.00�[0m
�[0m[ INFO] [1710085307.343987718]: Device Product ID: 0x0B5C�[0m
�[0m[ INFO] [1710085307.344106777]: Enable PointCloud: On�[0m
�[0m[ INFO] [1710085307.344223760]: Align Depth: On�[0m
�[0m[ INFO] [1710085307.344337125]: Sync Mode: On�[0m
�[0m[ INFO] [1710085307.344506194]: Device Sensors: �[0m
�[0m[ INFO] [1710085307.565158034]: Stereo Module was found.�[0m
�[0m[ INFO] [1710085307.585575987]: RGB Camera was found.�[0m
�[0m[ INFO] [1710085307.586028973]: Motion Module was found.�[0m
�[0m[ INFO] [1710085307.586214300]: (Confidence, 0) sensor isn't supported by current device! -- Skipping...�[0m
�[0m[ INFO] [1710085307.587011333]: Add Filter: pointcloud�[0m
�[0m[ INFO] [1710085307.587979920]: num_filters: 2�[0m
�[0m[ INFO] [1710085307.588209757]: Setting Dynamic reconfig parameters.�[0m
 10/03 17:41:50,253 WARNING [140463160260352] (messenger-libusb.cpp:42) control_transfer returned error, index: 300, error: Resource temporarily unavailable, number: b
�[0m[ INFO] [1710085311.162456143]: Done Setting Dynamic reconfig parameters.�[0m
�[0m[ INFO] [1710085311.163595256]: depth stream is enabled - width: 640, height: 480, fps: 15, Format: Z16�[0m
�[0m[ INFO] [1710085311.164977218]: color stream is enabled - width: 640, height: 480, fps: 15, Format: RGB8�[0m
�[0m[ INFO] [1710085311.167598488]: gyro stream is enabled - fps: 200�[0m
�[0m[ INFO] [1710085311.167656526]: accel stream is enabled - fps: 100�[0m
�[0m[ INFO] [1710085311.167708806]: setupPublishers...�[0m
�[0m[ INFO] [1710085311.173100281]: Expected frequency for depth = 15.00000�[0m
�[0m[ INFO] [1710085311.240184234]: Expected frequency for color = 15.00000�[0m
�[0m[ INFO] [1710085311.307764200]: Expected frequency for aligned_depth_to_color = 15.00000�[0m
�[0m[ INFO] [1710085311.367375567]: Start publisher IMU�[0m
�[0m[ INFO] [1710085311.371521482]: setupStreams...�[0m
 10/03 17:41:51,724 WARNING [140463185438464] (ds5-motion.cpp:473) IMU Calibration is not available, default intrinsic and extrinsic will be used.
 10/03 17:41:51,881 WARNING [140463160260352] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
 10/03 17:41:51,931 WARNING [140463160260352] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
 10/03 17:41:51,983 WARNING [140463160260352] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
�[0m[ INFO] [1710085312.033967349]: SELECTED BASE:Depth, 0�[0m
�[0m[ INFO] [1710085312.076069502]: RealSense Node Is Up!�[0m
 10/03 17:41:52,242 WARNING [140463160260352] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
 10/03 17:41:52,294 WARNING [140463160260352] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
 10/03 17:41:52,345 WARNING [140463160260352] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
 10/03 17:41:52,402 WARNING [140463160260352] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
 10/03 17:41:52,452 WARNING [140463160260352] (messenger-libusb.cpp:42) control_transfer returned error, index: 300, error: Resource temporarily unavailable, number: b
�[0m[ INFO] [1710085307.652367597]: Initializing nodelet with 4 worker threads.�[0m
�[0m[ INFO] [1710085308.002416930]: Odometry: frame_id               = camera_link�[0m
�[0m[ INFO] [1710085308.002536097]: Odometry: odom_frame_id          = odom�[0m
�[0m[ INFO] [1710085308.002617587]: Odometry: publish_tf             = true�[0m
�[0m[ INFO] [1710085308.002683485]: Odometry: wait_for_transform     = true�[0m
�[0m[ INFO] [1710085308.002761877]: Odometry: wait_for_transform_duration  = 0.200000�[0m
�[0m[ INFO] [1710085308.002834885]: Odometry: log_to_rosout_level    = 4�[0m
�[0m[ INFO] [1710085308.002929446]: Odometry: initial_pose           = xyz=0.000000,0.000000,0.000000 rpy=0.000000,-0.000000,0.000000�[0m
�[0m[ INFO] [1710085308.002998391]: Odometry: ground_truth_frame_id  = �[0m
�[0m[ INFO] [1710085308.003067688]: Odometry: ground_truth_base_frame_id = �[0m
�[0m[ INFO] [1710085308.003134319]: Odometry: config_path            = /opt/ros/noetic/share/realsense2_camera/launch/rtabmap.ini�[0m
�[0m[ INFO] [1710085308.003199542]: Odometry: publish_null_when_lost = true�[0m
�[0m[ INFO] [1710085308.003264204]: Odometry: publish_compressed_sensor_data = false�[0m
�[0m[ INFO] [1710085308.003327867]: Odometry: guess_frame_id         = �[0m
�[0m[ INFO] [1710085308.003394401]: Odometry: guess_min_translation  = 0.000000�[0m
�[0m[ INFO] [1710085308.003463627]: Odometry: guess_min_rotation     = 0.000000�[0m
�[0m[ INFO] [1710085308.003528884]: Odometry: guess_min_time         = 0.000000�[0m
�[0m[ INFO] [1710085308.003593853]: Odometry: expected_update_rate   = 0.000000 Hz�[0m
�[0m[ INFO] [1710085308.003659571]: Odometry: max_update_rate        = 0.000000 Hz�[0m
�[0m[ INFO] [1710085308.003728452]: Odometry: min_update_rate        = 0.000000 Hz�[0m
�[0m[ INFO] [1710085308.003792930]: Odometry: wait_imu_to_init       = true�[0m
�[0m[ INFO] [1710085308.003857103]: Odometry: sensor_data_compression_format   = .jpg�[0m
�[0m[ INFO] [1710085308.003921194]: Odometry: sensor_data_parallel_compression = true�[0m
�[0m[ INFO] [1710085308.004015829]: Odometry: stereoParams_=0 visParams_=1 icpParams_=0�[0m
�[0m[ INFO] [1710085308.006359832]: Odometry: Loading parameters from /opt/ros/noetic/share/realsense2_camera/launch/rtabmap.ini�[0m
�[0m[ INFO] [1710085310.364604630]: odometry: Subscribing to IMU topic /rtabmap/imu�[0m
�[0m[ INFO] [1710085310.384439237]: RGBDOdometry: approx_sync    = true�[0m
�[0m[ INFO] [1710085310.384635462]: RGBDOdometry: approx_sync_max_interval = 0.000000�[0m
�[0m[ INFO] [1710085310.384777074]: RGBDOdometry: queue_size     = 200�[0m
�[0m[ INFO] [1710085310.384900090]: RGBDOdometry: subscribe_rgbd = false�[0m
�[0m[ INFO] [1710085310.385013463]: RGBDOdometry: rgbd_cameras   = 1�[0m
�[0m[ INFO] [1710085310.385135606]: RGBDOdometry: keep_color     = false�[0m
�[0m[ INFO] [1710085310.449368412]: 
/rtabmap/rgbd_odometry subscribed to (approx sync):
   /camera/color/image_raw \
   /camera/aligned_depth_to_color/image_raw \
   /camera/color/camera_info�[0m
�[33m[ WARN] (2024-03-10 17:41:52.518) Odometry.cpp:322::process() Updated initial pose from xyz=0.000000,0.000000,0.000000 rpy=0.000000,-0.000000,0.000000 to xyz=0.000000,0.000000,0.000000 rpy=1.436758,-1.531815,1.838973 with IMU orientation�[0m
�[0m[ INFO] [1710085312.540303981]: Odom: quality=0, std dev=0.000000m|0.000000rad, update time=0.017334s�[0m
�[33m[ WARN] (2024-03-10 17:41:52.543) OdometryORBSLAM3.cpp:119::init() Loading ORB Vocabulary: "/home/anton/Projects/ORB_SLAM3/Vocabulary/ORBvoc.txt". This could take a while...�[0m
�[33m[ WARN] (2024-03-10 17:41:52.544) OdometryORBSLAM3.cpp:199::init() Camera FPS estimated at 15 Hz. If this doesn't look good, set explicitly parameter OdomORBSLAM/Fps to expected frequency.�[0m

ORB-SLAM3 Copyright (C) 2017-2020 Carlos Campos, Richard Elvira, Juan J. Gómez, José M.M. Montiel and Juan D. Tardós, University of Zaragoza.
ORB-SLAM2 Copyright (C) 2014-2016 Raúl Mur-Artal, José M.M. Montiel and Juan D. Tardós, University of Zaragoza.
This program comes with ABSOLUTELY NO WARRANTY;
This is free software, and you are welcome to redistribute it
under certain conditions. See LICENSE.txt.

Input sensor was set to: RGB-D
Loading settings from ./rtabmap_orbslam.yaml
	-Loaded camera 1
	-Loaded image info
	-Loaded RGB-D calibration
	-Loaded ORB settings
	-Loaded viewer settings
	-Loaded Atlas settings
	-Loaded misc parameters
----------------------------------
SLAM settings: 
	-Camera 1 parameters (Pinhole): [ 386.677 386.224 326.055 240.465 ]
	-Camera 1 distortion parameters: [  0 0 0 0 0 ]
	-Original image size: [ 640 , 480 ]
	-Current image size: [ 640 , 480 ]
	-Sequence FPS: 15
	-RGB-D depth map factor: 1
	-Features per image: 1000
	-ORB scale factor: 2
	-ORB number of scales: 3
	-Initial FAST threshold: 20
	-Min FAST threshold: 7


Loading ORB Vocabulary. This could take a while...
�[0m[ INFO] [1710085307.563456111]: Starting node...�[0m
�[0m[ INFO] [1710085307.687472704]: Initializing nodelet with 4 worker threads.�[0m
�[0m[ INFO] [1710085308.266048791]: /rtabmap/rtabmap(maps): map_filter_radius          = 0.000000�[0m
�[0m[ INFO] [1710085308.266093038]: /rtabmap/rtabmap(maps): map_filter_angle           = 30.000000�[0m
�[0m[ INFO] [1710085308.266108356]: /rtabmap/rtabmap(maps): map_cleanup                = true�[0m
�[0m[ INFO] [1710085308.266121134]: /rtabmap/rtabmap(maps): map_always_update          = false�[0m
�[0m[ INFO] [1710085308.266132959]: /rtabmap/rtabmap(maps): map_empty_ray_tracing      = true�[0m
�[0m[ INFO] [1710085308.266145265]: /rtabmap/rtabmap(maps): cloud_output_voxelized     = true�[0m
�[0m[ INFO] [1710085308.266157193]: /rtabmap/rtabmap(maps): cloud_subtract_filtering   = false�[0m
�[0m[ INFO] [1710085308.266170416]: /rtabmap/rtabmap(maps): cloud_subtract_filtering_min_neighbors = 2�[0m
�[0m[ INFO] [1710085308.266844851]: /rtabmap/rtabmap(maps): octomap_tree_depth         = 16�[0m
�[0m[ INFO] [1710085308.386219514]: rtabmap: frame_id      = camera_link�[0m
�[0m[ INFO] [1710085308.386264986]: rtabmap: map_frame_id  = map�[0m
�[0m[ INFO] [1710085308.386291204]: rtabmap: log_to_rosout_level = 4�[0m
�[0m[ INFO] [1710085308.386314437]: rtabmap: initial_pose  = �[0m
�[0m[ INFO] [1710085308.386331176]: rtabmap: use_action_for_goal  = false�[0m
�[0m[ INFO] [1710085308.386356244]: rtabmap: tf_delay      = 0.050000�[0m
�[0m[ INFO] [1710085308.386373360]: rtabmap: tf_tolerance  = 0.100000�[0m
�[0m[ INFO] [1710085308.386393585]: rtabmap: odom_sensor_sync   = false�[0m
�[0m[ INFO] [1710085308.386409076]: rtabmap: pub_loc_pose_only_when_localizing = false�[0m
�[0m[ INFO] [1710085308.388762440]: rtabmap: gen_scan  = false�[0m
�[0m[ INFO] [1710085308.388806562]: rtabmap: gen_depth  = false�[0m
�[0m[ INFO] [1710085308.458479242]: Loading parameters from /opt/ros/noetic/share/realsense2_camera/launch/rtabmap.ini�[0m
�[0m[ INFO] [1710085309.174343607]: Setting RTAB-Map parameter "Mem/IncrementalMemory"="true"�[0m
�[0m[ INFO] [1710085309.175359634]: Setting RTAB-Map parameter "Mem/InitWMWithAllNodes"="false"�[0m
�[0m[ INFO] [1710085310.882508484]: RTAB-Map detection rate = 1.000000 Hz�[0m
�[0m[ INFO] [1710085310.883756330]: rtabmap: Deleted database "/home/anton/.ros/rtabmap.db" (--delete_db_on_start or -d are set).�[0m
�[0m[ INFO] [1710085310.883945791]: rtabmap: Using database from "/home/anton/.ros/rtabmap.db" (0 MB).�[0m
�[0m[ INFO] [1710085311.223257665]: rtabmap: Database version = "0.21.4".�[0m
�[0m[ INFO] [1710085311.223435797]: rtabmap: SLAM mode (Mem/IncrementalMemory=true)�[0m
�[0m[ INFO] [1710085311.332898361]: /rtabmap/rtabmap: subscribe_depth = true�[0m
�[0m[ INFO] [1710085311.333075734]: /rtabmap/rtabmap: subscribe_rgb = true�[0m
�[0m[ INFO] [1710085311.333243320]: /rtabmap/rtabmap: subscribe_stereo = false�[0m
�[0m[ INFO] [1710085311.333370205]: /rtabmap/rtabmap: subscribe_rgbd = false (rgbd_cameras=1)�[0m
�[0m[ INFO] [1710085311.333495025]: /rtabmap/rtabmap: subscribe_sensor_data = false�[0m
�[0m[ INFO] [1710085311.333617096]: /rtabmap/rtabmap: subscribe_odom_info = true�[0m
�[0m[ INFO] [1710085311.333740548]: /rtabmap/rtabmap: subscribe_user_data = false�[0m
�[0m[ INFO] [1710085311.333863538]: /rtabmap/rtabmap: subscribe_scan = false�[0m
�[0m[ INFO] [1710085311.333984290]: /rtabmap/rtabmap: subscribe_scan_cloud = false�[0m
�[0m[ INFO] [1710085311.334105429]: /rtabmap/rtabmap: subscribe_scan_descriptor = false�[0m
�[0m[ INFO] [1710085311.334228152]: /rtabmap/rtabmap: queue_size    = 200�[0m
�[0m[ INFO] [1710085311.334349148]: /rtabmap/rtabmap: approx_sync   = true�[0m
�[0m[ INFO] [1710085311.334747768]: Setup depth callback�[0m
�[0m[ INFO] [1710085311.394681373]: 
/rtabmap/rtabmap subscribed to (approx sync):
   /rtabmap/odom \
   /camera/color/image_raw \
   /camera/aligned_depth_to_color/image_raw \
   /camera/color/camera_info \
   /rtabmap/odom_info�[0m
�[0m[ INFO] [1710085311.798630807]: rtabmap 0.21.4 started...�[0m
�[31m[ERROR] (2024-03-10 17:41:52.578) Rtabmap.cpp:1348::p 10/03 17:41:52,620 WARNING [140463160260352] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
 10/03 17:41:52,777 WARNING [140463160260352] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
 10/03 17:41:52,827 WARNING [140463160260352] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
 10/03 17:41:52,981 WARNING [140463160260352] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
 10/03 17:41:53,162 WARNING [140463160260352] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
 10/03 17:41:53,220 WARNING [140463160260352] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
 10/03 17:41:53,783 WARNING [140463160260352] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
 10/03 17:41:53,834 WARNING [140463160260352] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
Vocabulary loaded!

[ WARN] [1710085314.467696708]: /rtabmap/rgbd_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. 
/rtabmap/rgbd_odometry subscribed to (approx sync):
   /camera/color/image_raw \
   /camera/aligned_depth_to_color/image_raw \
   /camera/color/camera_info
Initialization of Atlas from scratch 
Creation of new map with id: 0
Creation of new map with last KF id: 0
Seq. Name: 
[rtabmap/rgbd_odometry-6] process has died [pid 45072, exit code -11, cmd /home/anton/Projects/rtabmap_ros/devel/lib/rtabmap_odom/rgbd_odometry --delete_db_on_start rgb/image:=/camera/color/image_raw depth/image:=/camera/aligned_depth_to_color/image_raw rgb/camera_info:=/camera/color/camera_info rgbd_image:=rgbd_image odom:=odom imu:=/rtabmap/imu __name:=rgbd_odometry __log:=/home/anton/.ros/log/b31ff276-def4-11ee-9aed-4338ecc5a3fa/rtabmap-rgbd_odometry-6.log].
log file: /home/anton/.ros/log/b31ff276-def4-11ee-9aed-4338ecc5a3fa/rtabmap-rgbd_odometry-6*.log

 10/03 17:42:12,932 WARNING [140463160260352] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11

@matlabbe
Copy link
Member

matlabbe commented Mar 13, 2024

Which version of ORB_SLAM3 are you using? Make sure you built ORB_SLAM3 without -march=native (removed from these, these and these lines)

You can also add

<arg name="gdb"         value="true"/>

under rtabmap.launch include in your launch file to launch rtabmap nodes with gdb. When odometry node crashes, do bt (backtrace) to see where it crashed.

EDIT: You may also try building ORB_SLAM3 in Debug mode (and all its built dependencies), it seems to fix some crashing issues.

@lempiy
Copy link
Author

lempiy commented Mar 13, 2024

Which version of ORB_SLAM3

1.0 release built with 4.4 opencv. Same version used in my rtabmap and rtabmap_ros.

I didn't remove the -march=native param. Now I finally managed to make it work. Thank you.
I checked this patch at the bottom
https://gist.githubusercontent.com/matlabbe/f5cb281304a1305b2824a6ce19792e13/raw/f8bbc796edc29b9f815cbf3c99a0c3e13e23663d/orbslam3_v4_rtabmap_fix.patch
realizing that the main code troubes were fixed in ORB_SLAMs v1, but didn't pay attention to march gcc param.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants