rgbd_odometry(in rtabmap_ros) does not work

asked 2021-10-13 07:12:42 -0500

KOTEMEN gravatar image

updated 2021-10-14 06:11:44 -0500

I am trying to use rtabmap using rgbd_image with two realsenseD435i. My environment is as follows

  • ROS melodic
  • ubuntu 18.04
  • Desktop PC
  • Memory 64GB

In order to use two rgbdimage, I did the following steps to Build from source.

 - sudo apt install ros-melodic-rtabmap-ros  (done 1 year ago)
 - sudo apt remove ros-noetic-rtabmap ros-mellodic-rtabmap-ros (from below, done today)
 - cd ~
 - git clone https://github.com/introlab/rtabmap.git rtabmap
 - cd rtabmap/build
 - make ..
 - make
 - sudo make install
 - cd ~/catkin_ws
 - git clone https://github.com/introlab/rtabmap_ros.git src/rtabmap_ros
 - catkin build rtabmap_ros -j4 -DRTABMAP_SYNC_MULTI_RGBD=ON

"catkin build" was successful. However, when I launch rtabmap.launch with one D435i as a test, I get the following error regarding rgbd_odometry.

~~~~~~~~~~~~~~roslaunch~~~~~~~~~~~~~~~~~   
- roslaunch realsense2_camera rs_aligned_depth.launch 
- roslaunch rtabmap_ros rtabmap.launch rtabmap_args:="--delete_db_on_start" depth_topic:=/camera/aligned_depth_to_color/image_raw rgb_topic:=/camera/color/image_raw camera_info_topic:=/camera/color/camera_info
~~~~~~~~~~~~~~roslaunch~~~~~~~~~~~~~~~~~   


~~~~~~~~~~~~~~error~~~~~~~~~~~~~~~~~   

/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

[ INFO] [1634124659.584384224]: rtabmap 0.20.14 started...
[ INFO] [1634124659.592516302]: Odom: quality=0, std dev=99.995000m|99.995000rad, update time=0.007711s
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
[ INFO] [1634124659.644639885]: Odom: quality=249, std dev=0.017062m|0.051274rad, update time=0.050933s
[ INFO] [1634124659.666894133]: Odom: quality=304, std dev=0.014334m|0.048989rad, update time=0.021454s

[FATAL] (2021-10-13 20:30:59.689) MsgConversion.cpp:1517::odomInfoToROS() Condition (info.localBundleModels.size() == info.localBundlePoses.size()) not met!
terminate called after throwing an instance of 'UException'
  what():  [FATAL] (2021-10-13 20:30:59.689) MsgConversion.cpp:1517::odomInfoToROS() Condition (info.localBundleModels.size() == info.localBundlePoses.size()) not met!
[rtabmap/rgbd_odometry-1] process has died [pid 4742, exit code -6, cmd /home/srl-limb-ws2/catkin_ws/devel/lib/rtabmap_ros/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_relay odom:=odom imu:=/imu/data __name:=rgbd_odometry __log:=/home/srl-limb-ws2/.ros/log/f4dd6a6e-2c17-11ec-8462-7085c2dc3c5f/rtabmap-rgbd_odometry-1.log].
log file: /home/srl-limb-ws2/.ros/log/f4dd6a6e-2c17-11ec-8462-7085c2dc3c5f/rtabmap-rgbd_odometry-1*.log

~~~~~~~~~~~~~~error~~~~~~~~~~~~~~~~~

Could you give me some hints on how to solve this?

If I am missing some information, please point it out to me.

edit retag flag offensive close merge delete

Comments

You may comment this for now to make it work. I'll try to fix this as soon as possible.

matlabbe gravatar image matlabbe  ( 2021-10-13 09:01:19 -0500 )edit

I cannot reproduce the assert with two realsense cameras. Can you share the launch file you used?

matlabbe gravatar image matlabbe  ( 2021-10-13 20:46:10 -0500 )edit

With multi-camera, rostopic echo /rtabmap/odom_info/localBundlePoses and rostopic echo /rtabmap/odom_info/localBundleModels should be empty.

matlabbe gravatar image matlabbe  ( 2021-10-13 20:53:07 -0500 )edit

Hi matlabbe, Thanks for the advice.

When I commented out the part you pointed out, the number of errors was reduced. However, "[rtabmap/rgbd_odometry-1] process has died" did not disappear. After consulting the discussion on this link, I "sudo apt install" rtabmap (standalone) again and "sudo apt remove" it again.

Then rgbd_odometry worked properly, and I was able to run visual SLAM properly. This image's terrain map is unified cloud_map.

I think the reason is that when I first "sudo apt remove" rtabmap(standalone), the command was wrong. I had typed not "melodic" but "noetic".

Regarding your additional advice about multi-camera, the relevant topic has not been published in my case. Is that correct? I send you the launch file I'm using just in case. launch

KOTEMEN gravatar image KOTEMEN  ( 2021-10-14 06:57:57 -0500 )edit

You have <param name="subscribe_odom_info" type="bool" value="true"/> in the launch. Set it to false to avoid generating this topic. Is there another assert involved in the "process has died" error? Step A of this issue could give more info about the process has died if there is no assert shown. Also your launch doesn't contain rgbd_odometry stuff, so I cannot really test it.

matlabbe gravatar image matlabbe  ( 2021-10-14 07:12:50 -0500 )edit

Thank you for your advice.

When I set "subscribe_odom_info" to false, WARNING was reduced, thank you.

Also, from the beginning of this problem, the "process has died" error was only rgbd_odometry.

Well, my system is a bit complicated, it is a mobile manipulator with multiple arms. There are two types of cameras: one fixed to the base for Localization, and one fixed to the end of the arm for building a wide area map. "rgbd_odometry" is executed by the camera fixed to the base_link, and since "robot_localization" is used, "rgbd_odometry node" is described in a separate launch file.

The "rgbd_odometry node" is written in a separate launch file. Based on the result of the Localization of the base frame (/tf_tree_publisher/base_pose), Mapping is performed with multiple cameras in that attached launch file.

KOTEMEN gravatar image KOTEMEN  ( 2021-10-14 21:57:21 -0500 )edit