zed camera with rtabmap, mapping problems and warning.
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.
<launch>
<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>
<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"/>
</node>
</group>
</launch>
this also only gives one warning: "[/rtabmap/rtabmap] -- [ WARN] [1653902277.702002576]: rtabmap: Parameters subscribergb and subscribergbd 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 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 3.621698 (edge 1015->1118, type=1, abs error=5.716578 deg, stddev=0.027549). The maximum error ratio parameter "RGBD/OptimizeMaxError" is 3.000000 of std deviation.
[ WARN] (2022-05-30 11:38:53.484) Rtabmap.cpp:3464::process() Loop closure 1118->1015 rejected!
[ WARN] (2022-05-30 11:38:53.484) Rtabmap.cpp:3464::process() Loop closure 1118->94 rejected!
[ WARN] (2022-05-30 11:38:53.484) Rtabmap.cpp:3464::process() Loop closure 1118->303 rejected!
i also have another problem where my 2d occupancy grind will include the roof as a obstacle making almost all of the map black. part of this problem could be that my camera is really high up.
Asked by tenst on 2022-05-30 05:53:50 UTC
Answers
If those loop closures are correct, you can increase RGBD/OptimizeMaxError
parameter to accept them.
Asked by matlabbe on 2022-10-09 16:19:00 UTC
Comments