Robot z position relative to odom drifts over time

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Robot z position relative to odom drifts over time

bolt
Hi.

I am experiencing an issue where the z position of the base_footprint relative to the odom frame drifts quite a bit over time. I am currently using only rgbd_odometry for odometry on my robot, as my wheel encoders are not very accurate. The 2D/3D maps look excellent, and the x/y odometry seems pretty good too, but I just notice that after a short time the robot will either sink into the map or start to hover above it:



I am currently using the Kinect robot setup recommended here, and have also tried with Reg/Force3DoF set to true, but this did not help with the problem.

I was wondering what you think might be causing this, and any way to fix it?

Many thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Robot z position relative to odom drifts over time

matlabbe
Administrator
Hi,

The z drift could be the effect of real camera position not exactly the same as TF (camera is more or less tilted than in reality). When the z error is decreased as the best you can do, you can set "Reg/Force3DoF" to true to drop z, roll and pitch estimation from the computed odometry. This should be set for rgbd_odometry node and rtabmap node.

For ROS Indigo/Jade binaries (version 0.11.8), we should also set "Optimizer/Slam2D" to true for rtabmap node.

Based on your link you referred:
<launch>
  <group ns="rtabmap">

    <!-- Odometry -->
    <node pkg="rtabmap_ros" type="rgbd_odometry" name="rgbd_odometry" output="screen">
      <remap from="rgb/image"       to="/camera/rgb/image_rect_color"/>
      <remap from="depth/image"     to="/camera/depth_registered/image_raw"/>
      <remap from="rgb/camera_info" to="/camera/depth_registered/camera_info"/>

      <param name="frame_id" type="string" value="base_link"/>

      <param name="Reg/Force3DoF" type="string" value="true"/>              <!-- 2D SLAM -->
    </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="true"/>

          <remap from="odom" to="odom"/>
          <remap from="rgb/image" to="/camera/rgb/image_rect_color"/>
          <remap from="depth/image" to="/camera/depth_registered/image_raw"/>
          <remap from="rgb/camera_info" to="/camera/rgb/camera_info"/>

          <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="Rtabmap/TimeThr" type="string" value="700"/>
          <param name="Mem/RehearsalSimilarity" type="string" value="0.45"/>
          <param name="RGBD/OptimizeFromGraphEnd" type="string" value="true"/>

          <param name="Reg/Force3DoF" type="string" value="true"/>         <!-- 2D SLAM -->
          <param name="Optimizer/Slam2D" type="string" value="true"/>      <!-- 2D SLAM -->
    </node>
  </group>
</launch>

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: Robot z position relative to odom drifts over time

bolt
Thank you, this has fixed it :)  My error was that I had not set  "Reg/Force3DoF" to true in the rgbd_odometry node, only in the rtabmap node.