Rtabmap visual odometry getting lost too often using d435i

I need some help with tuning rtabmap parameters regarding visual odometry (or maybe its something else, I am not really sure at this point). My ultimate goal is to use grid_map produced by rtabmap for 2d navigation stack. And I stuck on problem that visual odometry getting lost too often. And if for mapping its not that big of a problem (after some more circle around space I generally can get somewhat accurate map), for localization process and for navigation it is really a problem, cause robot lost its location on map and cannot went to desired goal. I tried various solution regarding this issue (like setting "Odom/Strategy" to 1, setting 2d optimization options to true, set lower camera resolution and higher framerate). I also tried to use odometry from robot wheels, but its not reliable. I am currently using d435i camera (librealsense v2.43 compiled from source, linux kernel 5.4.0-58-generic, ros-realsense latest version also complied from source), rtabmap complied from source (cause for some reason it didn't worked initially on Ubuntu 20.04). Or maybe its just problem with my environment - its somewhat narrow office space with single straight hallway, so while moving robot I cannot really make a full circle for loop closure detection (but then, why odometry getting lost when I just slowly spinning around on place, that is totally not expected behavior for me).

robot_bare.launch (robot controls, sensors and transformations):

<launch>
<include file="$(find odrv_ros)/launch/ros_test.launch"/> <node name="rplidarNode" pkg="rplidar_ros" type="rplidarNode" output="log"> <param name="serial_port" type="string" value="/dev/RPLIDAR"/> <param name="serial_baudrate" type="int" value="256000"/> <param name="frame_id" type="string" value="rplidar_laser"/> <param name="inverted" type="bool" value="false"/> <param name="angle_compensate" type="bool" value="false"/> </node> <node pkg="laser_filters" type="scan_to_scan_filter_chain" name="rplidar_laser_filter" output="log"> <rosparam command="load" file="$(find odrive_robot)/src/rplidar_laser_filter_params.yaml" />
<remap from="scan" to="rplidar_scan" />
<remap from="scan_filtered" to="rplidar_scan_filtered" />
</node>

<include file="$(find odrive_robot)/src/chip_robotics_imu.launch"/> <node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.1 0.0 0.0 3.14 0.0 3.14 base_link rplidar_laser 100" required="true" output="log"/> <node pkg="tf" type="static_transform_publisher" name="base_to_imu" args="-0.25 0.0 0.0 0.0 3.14 0.0 base_link imu_link 100" required="true" output="log"/> <node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="0.0 0.0 0.0 0.0 0,0 0.0 base_link camera_link 100" required="true" output="log"/> <node pkg="robot_localization" type="ekf_localization_node" name="ukf_odom" clear_params="true" output="log"> <rosparam command="load" file="$(find odrive_robot)/src/ekf_params.yaml" />
</node >

<include file="\$(find realsense2_camera)/launch/rs_camera.launch">
<arg name="output"              value="log"/>
<arg name="align_depth" value="true"/>
<arg name="linear_accel_cov" value="1.0"/>
<arg name="unite_imu_method" value="linear_interpolation"/>
<arg name="initial_reset" value="true"/>
<arg name="enable_pointcloud" value="true"/>
<arg name="enable_sync ...
edit retag close merge delete

Sort by » oldest newest most voted

You can also try icp_odometry with the rplidar, in particular with wheel odometry as guess.

For visual odometry, if you are using rtabmap prior to 0.20.9, add --GFTT/MinDistance 7 --Vis/CorGuessWinSize 40 parameters. For D435 camera, to get the best visual odometry, use the IR left and right images with stereo_odometry instead of rgbd_odometry. IR cameras have larger field of view and almost no motion blur, thus a lot more robut visual odometry. See stereo realsense example here: http://wiki.ros.org/rtabmap_ros/Tutor...

more

I'm having the same installation on PC ROS noetic. My last step is to lock rtabmap to the realsense witch is on my robot (Jetson nano - Ros melodic).

I can use the images, depthclouds and the topics of rtapmap come up in RVIZ. only when selecting them i loose the image. So i think this is a small step. i'll be sure to follow and get back to it when more experienced.

more