RTABmap breaks my TF

asked 2019-04-02 06:25:47 -0500

EdwardNur gravatar image

I am doing a remote mapping and I cannot set the TF right. When I set the launch file like this:

 <arg name="frame_id"                default="camera_link"/>     <!-- Fixed frame id, you may set "base_link" or "base_footprint" if they are published -->
  <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="20"/>
  <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"/>
  <arg name="odom_frame_id"           default=""/>

RTABmap makes a TF from Map to camera_link and if I instead place "base_footprint", which is my fixed base, RTABmap also breaks the tree by providing TF from odom to camera_link.

How can I ensure that it does not break the tree? My tf looks like this:

image description

edit retag flag offensive close merge delete

Comments

Which nodes do you start? the frame_id parameter should be base_footprint. For odom to camera_link TF, maybe a visual odometry node is also started, remove that node. If you are using rtabmap.launch, set visual_odometry to false.

matlabbe gravatar image matlabbe  ( 2019-04-03 18:15:53 -0500 )edit