incorrect rtabmap parameters, loop closure problem
Hello! I am looking at some amazing rtabmap mappings such as
https://www.youtube.com/watch?v=Fvhxd...
https://www.youtube.com/watch?v=j8OYl...
and my mapping does not look good at all, I dont know why exactly, distance for mapping is too big or odometry is not enough good, there is a lot of shifts and inexactitudes.
here it is: https://yadi.sk/i/89HN-ixWRIJvvw (if there is no play button, try to reload page)
I am using only two cameras, d435 and t265 firmly attached to each other, and walking indoor with laptop in one hand and those cameras in other hand.
Can anyone take a glance on my rtabmap parameters and tell me what is definitely incorrect there?
<launch>
<arg name="use_zed" default="false" doc="Set to false when using Intel Realsense D435"/>
<arg name="localization" default="false" doc="Localization mode for navigation"/>
<arg name="database_path" default="rtabmap.db"/>
<arg name="rviz" default="false"/>
<arg name="rate" default="1.0"/>
<arg name="camera_frame" default="d400"/>
<arg if="$(arg localization)" name="rtabmap_args" default=""/>
<arg unless="$(arg localization)" name="rtabmap_args" default="--delete_db_on_start"/>
<arg if="$(arg localization)" name="rviz_config" default="$(find turtlebot3_slam_3d)/config/navigation.rviz"/>
<arg unless="$(arg localization)" name="rviz_config" default="$(find turtlebot3_slam_3d)/config/mapping.rviz"/>
<arg name="input_scan" default="/scan"/>
<arg name="input_odom" default="/t265/odom/sample"/>
<arg if="$(arg use_zed)" name="input_image" default="/stereo_camera/left/image_rect_color"/>
<arg unless="$(arg use_zed)" name="input_image" default="/d400/color/image_raw"/>
<arg if="$(arg use_zed)" name="input_depth" default="/stereo_camera/depth/depth_registered"/>
<arg unless="$(arg use_zed)" name="input_depth" default="/d400/aligned_depth_to_color/image_raw"/>
<arg if="$(arg use_zed)" name="input_camera_info" default="/stereo_camera/left/camera_info"/>
<arg unless="$(arg use_zed)" name="input_camera_info" default="/d400/color/camera_info"/>
<!-- RTAB=Map node -->
<group ns="rtabmap">
<node pkg="nodelet" type="nodelet" name="rgbd_sync" args="standalone rtabmap_ros/rgbd_sync" output="screen">
<remap from="rgb/image" to="/d400/color/image_raw"/>
<remap from="depth/image" to="/d400/aligned_depth_to_color/image_raw"/>
<remap from="rgb/camera_info" to="/d400/color/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="false"/>
</node>
<node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" output="screen" args="$(arg rtabmap_args)">
<param name="database_path" type="string" value="$(arg database_path)"/>
<param name="frame_id" type="string" value="t265_pose_frame"/>
<param name="subscribe_depth" type="bool" value="false"/>
<param name="subscribe_rgbd" type="bool" value="true"/>
<param name="subscribe_scan" type="bool" value="false"/>
<!-- Input topics -->
<remap from="scan" to="$(arg input_scan)"/>
<remap from="odom" to="$(arg input_odom)"/>
<remap from="rgb/image" to="$(arg input_image)"/>
<remap from="depth/image" to="$(arg input_depth)"/>
<remap from="rgb/camera_info" to="$(arg input_camera_info)"/>
<remap from="rgbd_image" to="rgbd_image"/>
<!-- Output topics -->
<remap from="grid_map" to="/map"/>
<param name ...
The D400 depth is not very accurate farther than 3-4 meters, I would set a maximum depth in MapCloud plugin in RVIZ. Why
t265odom_to_map
is used? Can you show the TF tree (rosrun tf view_frames
)?I have set maximum depth in RVIZ to 2 meters. How can I configure rtabmap to not build the map far than 2 meters?
t265 was because I forgot to set frame_id at first. Now I have removed that line and frames pdf is here.
Nothing actually changed, mapping in rviz does look well.
I changed frame_id from t265_pose_frame to t265_link.
And I have made new test with long run of big room: https://yadi.sk/i/w9Ci5sri45WPFA
What do you think, what is wrong in my configuration? and what can I do to improve mapping?
Can you share that database, it would be useful to debug where the drift is coming from (T265? or loop closures). What is the fixed transform between T265 and D435? To limit the range of the occupancy grid, set
Grid/RangeMax
to 2.you mean rtabmap.db file? I have it. I dont have bag file of that video because I haven't recorded it. I can make new passage and record bag file.
fixed transform between t265 and d435 is:
it's from rs_d400_and_t265.launch file
I have made new test! it looks far more better than previous.
https://yadi.sk/d/zIoELo4EGLUO6A
what do you think?