help with Rtabmap_ros Odometry

asked 2020-11-21 09:55:53 -0500

MisticFury gravatar image

updated 2020-11-21 09:58:14 -0500

im doing remote mapping with a drone and im having the issue where rtabmap keeps losing the drone. does anyone know any good parameter settings that will help make sure the odom doesn't get lost, the drone sometimes tends to do quick movements and in those quick movements is when it loses itself. so in a way i guess i just need the odom to process faster.

my depth comes in at 9 fps and my rgb comes in at 13fps, both fairly stable. im also feeding it an imu and a gps_fix.

this is my current launch file and parameters

  <!-- Parameters -->
  <param name="Rtabmap/DetectionRate"             type="string"   value="0"/>
  <param name="RGBD/OptimizeFromGraphEnd"         type="string"   value="true"/>
  <param name="RGBD/LoopClosureReextractFeatures" type="string"   value="true"/>

  <!-- maximum features map size, default 2000 -->
  <param name="OdomF2M/MaxSize" type="string" value="1000"/>

  <!-- maximum features extracted by image, default 1000 -->
  <param name="Vis/MaxFeatures" type="string" value="600"/>

  <!-- Reduce Point Cloud Noises -->
  <param name="cloud_noise_filtering_radius" value="0.1"/>
  <param name="cloud_noise_filtering_min_neighbors" value="2"/>

  <!-- Choose between depth and stereo, set both to false to do only scan -->      
  <arg name="stereo"                    default="false"/>
  <arg     if="$(arg stereo)" name="depth"  default="false"/>
  <arg unless="$(arg stereo)" name="depth"  default="true"/>

  <!-- Choose visualization -->
  <arg name="rtabmapviz"              default="false" /> 
  <arg name="rviz"                    default="true" />

  <!-- Localization-only mode -->
  <arg name="localization"            default="false"/>

  <!-- sim time for convenience, if playing a rosbag -->
  <arg name="use_sim_time"            default="false"/>
  <param if="$(arg use_sim_time)" name="use_sim_time" value="true"/>

  <!-- Corresponding config files -->
  <arg name="cfg"                     default="" /> <!-- To change RTAB-Map's parameters, set the path of config file (*.ini) generated by the standalone app -->
  <arg name="gui_cfg"                 default="~/.ros/rtabmap_gui.ini" />
  <arg name="rviz_cfg"                default="$(find rtabmap_ros)/launch/config/rgbd.rviz" />

  <arg name="frame_id"                default="camera_link"/>     <!-- Fixed frame id, you may set "base_link" or "base_footprint" if they are published -->
  <arg name="odom_frame_id"           default=""/>                <!-- If set, TF is used to get odometry instead of the topic -->
  <arg name="map_frame_id"            default="map"/>
  <arg name="ground_truth_frame_id"   default=""/>     <!-- e.g., "world" -->
  <arg name="ground_truth_base_frame_id" default=""/>  <!-- e.g., "tracker", a fake frame matching the frame "frame_id" (but on different TF tree) -->
  <arg name="namespace"               default="rtabmap"/>
  <arg name="database_path"           default="~/.ros/rtabmap.db"/>
  <arg name="queue_size"              default="10"/>
  <arg name="wait_for_transform"      default="0.2"/>
  <arg name="args"                    default="--delete_db_on_start"/>              <!-- delete_db_on_start, udebug -->
  <arg name="rtabmap_args"            default="$(arg args)"/>   <!-- deprecated, use "args" argument -->
  <arg name="launch_prefix"           default=""/>              <!-- for debugging purpose, it fills launch-prefix tag of the nodes -->
  <arg name="output"                  default="screen"/>        <!-- Control node output (screen or log) -->
  <arg name="publish_tf_map"          default="true"/>

  <!-- if timestamps of the input topics are synchronized using approximate ...
edit retag flag offensive close merge delete


I think you might be able to choose the algorithm that is being used eg. GFTT, SURF, SIFT, FAST, ORB... to achieve better performance, as some algorithms are better at tracking points with fast/blurry movements than others. In any case, @matlabbe will know better in terms of algorithms and parameters to tweak so hopefully he sees this.

jorgemia gravatar image jorgemia  ( 2020-11-23 09:27:52 -0500 )edit

but how do i chage the algoritm and which one is best for fast movement?

MisticFury gravatar image MisticFury  ( 2020-11-24 09:21:31 -0500 )edit