ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

RVIZ shows odom frame fixed to map frame when running rtabmap

asked 2018-08-02 12:41:23 -0500

asabet gravatar image

updated 2018-08-02 14:52:13 -0500

I've set the map frame as the fixed frame in RVIZ, and this is what it looks like when running rtabmap https://imgur.com/a/U5fJLLP . This is what my partial tf-tree looks like https://imgur.com/a/1s2PnV8 . This is my launch file for rtabmap:

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

   <param name="use_sim_time" type="bool" value="false"/>    <!-- Visual SLAM: args: "delete_db_on_start" and "udebug" -->  <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 unless="$(arg stereo_sync)" name="subscribe_stereo" type="bool" value="true"/>
      <param name="subscribe_depth"  type="bool" value="false"/>
      <param name="subscribe_rgbd"      type="bool" value="$(arg stereo_sync)"/>

      <remap from="left/image_rect"   to="/camera/left/image_rect_color"/>
      <remap from="right/image_rect"  to="/camera/right/image_rect"/>
      <remap from="left/camera_info"  to="/camera/left/camera_info"/>
      <remap from="right/camera_info" to="/camera/right/camera_info"/>
      <remap from="rgbd_image"        to="/camera/rgbd_image"/>

      <remap from="odom" to="/odometry/filtered"/>
      <param name="queue_size" type="int" value="30"/>
      <param name="map_negative_poses_ignored" type="bool" value="true"/>

      <!-- RTAB-Map's parameters -->
      <param name="Rtabmap/TimeThr"                   type="string" value="700"/>
      <param name="Grid/DepthDecimation"            type="string" value="4"/>
      <param name="Grid/FlatObstacleDetected"       type="string" value="true"/>
      <param name="Kp/MaxDepth"                       type="string" value="0"/>
      <param name="Kp/DetectorStrategy"             type="string" value="6"/>
      <param name="Vis/EstimationType"                type="string" value="1"/>   <!-- 0=3D->3D, 1=3D->2D (PnP) -->
      <param name="Vis/MaxDepth"                      type="string" value="0"/>
      <param name="RGBD/CreateOccupancyGrid"        type="string" value="true"/>
      <param name="approx_sync"                       type="bool" value="true"/>    </node> </launch>
edit retag flag offensive close merge delete

Comments

Can you please copy and paste your launch file again, using the 101010 button instead of the "? The " button is for quoting and thus doesn't handle code snippets well.

jayess gravatar image jayess  ( 2018-08-02 13:05:22 -0500 )edit

Done. Thoughts?

asabet gravatar image asabet  ( 2018-08-02 14:52:45 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
4

answered 2018-08-03 14:44:05 -0500

matlabbe gravatar image

It is normal, unless there is a loop closure, /odom and /map frames will be one over the other (meaning that odometry drift has not been corrected yet). See REP 105. When a reloclization/loop closure happens, the odometry corection will be seen between /map and /odom.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-08-02 12:41:23 -0500

Seen: 522 times

Last updated: Aug 03 '18