ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

zed camera with rtabmap, mapping problems and warning.

asked 2022-05-30 05:53:50 -0500

tenst gravatar image

updated 2022-06-01 17:40:11 -0500

hi, I'm having some problems with mapping. I'm using a zed2i camera with rtabmap. my current problems are that the map is drifting/not aligning, i assume this means that I have a problem with the odometry.

Currently all I'm doing to run the mapping is to run two commands. first i run

roslaunch zed_wrapper zed2i.launch

This is to launch the zed nodes so that I can get the camera data. this works mostly fine but give one warning

[/zed2i/zed_node] -- [ WARN] [1653900202.462366462]: area_memory_db_path [/home/sp00tn1k-robot/.ros/zed_area_memory.area] doesn't exist or is unreachable.

This warning could be the reason that I'm having problems but i can't find how to fix this. so any help here would be good. The second command I use is one that runs my own launch file. The file is based on this tutorial and contains the following code.

 <group ns="rtabmap">
   <node pkg="nodelet" type="nodelet" name="rgbd_sync" args="standalone rtabmap_ros/rgbd_sync" output="screen">
     <remap from="rgb/image"       to="/zed2i/zed_node/rgb/image_rect_color"/>
     <remap from="depth/image"     to="/zed2i/zed_node/depth/depth_registered"/>
     <remap from="rgb/camera_info" to="/zed2i/zed_node/rgb/camera_info"/>
     <remap from="rgbd_image"      to="rgbd_image"/> <!-- output -->
     <!-- Should be true for not synchronized camera topics 
          (e.g., false for kinectv2, zed, realsense, true for xtion, kinect360)-->
     <param name="approx_sync"       value="true"/> 
   <node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" output="screen" args="--delete_db_on_start">
         <param name="frame_id" type="string" value="base_link"/>
         <param name="subscribe_depth" type="bool" value="false"/>
         <param name="subscribe_rgbd" type="bool" value="true"/>
         <remap from="odom" to="/zed2i/zed_node/odom"/>
         <remap from="rgbd_image" to="rgbd_image"/>
         <param name="queue_size" type="int" value="10"/>
         <!-- RTAB-Map's parameters -->
         <param name="RGBD/AngularUpdate"        type="string" value="0.01"/>
         <param name="RGBD/LinearUpdate"         type="string" value="0.01"/>
         <param name="RGBD/OptimizeFromGraphEnd" type="string" value="false"/>

this also only gives one warning: "[/rtabmap/rtabmap] -- [ WARN] [1653902277.702002576]: rtabmap: Parameters subscribe_rgb and subscribe_rgbd cannot be true at the same time. Parameter subscribe_rgb is set to false.`` This warning seems to be one that would not result in any problems so I'm currently ignoring this one.

The mapping works fairly well for short mapping sessions but for longer ones it will eventually start to drift and warnings like this will be printed.

[ WARN] (2022-05-30 11:38:53.484) Rtabmap.cpp:3430::process() Rejecting all added loop closures (3, first is 1118 <-> 1015) in this iteration because a wrong loop closure has been detected after graph optimization, resulting in a maximum graph error ratio of 6.637969 (edge 94->1118, type=2, abs error=0.203504 m, stddev=0.030658). The maximum error ratio parameter "RGBD/OptimizeMaxError" is 3.000000 of std deviation.
[ WARN] (2022-05-30 11:38:53.484) Rtabmap.cpp:3454::process() Rejecting all added loop closures (3, first ...
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2022-10-09 16:19:00 -0500

matlabbe gravatar image

If those loop closures are correct, you can increase RGBD/OptimizeMaxError parameter to accept them.

edit flag offensive delete link more

Question Tools


Asked: 2022-05-30 05:53:50 -0500

Seen: 374 times

Last updated: Oct 09 '22