Ask Your Question

Why does RTABmap subscribing to my other TF?

asked 2019-04-05 04:07:37 -0600

EdwardNur gravatar image

I have noticed some problem. When I launch RTABmap, it subscribes to my noisy_odom TF and also subscribes to filtered_odom TF and I think it makes my map being messy and sometimes I get this warning:

Rtabmap.cpp:2072::process() Rejected loop closure 1 -> 177: Not enough inliers 0/5 (matches=1) between 1 and 177

Which I guess means that RTABmap also does the visual odom which I do not want as it messes my map (even though I did not start that node).

So here is my RQT_GRAPH: image description

And in SVG format:

My RTAB database if needed:

And finally this is how I launch my RTABmap (note that on my remote robot I launch rtabmap/stere_sync and it sends rgbd_image topic):

    <arg name="use_zed"         default="true"  doc="Set to false when using Intel Realsense D435"/>
    <arg name="localization"    default="false" doc="Localization mode for navigation"/>
    <arg name="database_path"   default="rtabmap.db"/>
    <arg name="rviz"            default="true"/>
    <arg name="rtabmapviz"      default="true" />
    <arg name="rate"            default="1.0"/>

    <arg name="gui_cfg"                 default="~/.ros/rtabmap_gui.ini" />

    <arg     if="$(arg localization)" name="rtabmap_args"  default=""/>
    <arg unless="$(arg localization)" name="rtabmap_args"  default="--delete_db_on_start"/>
    <arg     if="$(arg localization)" name="rviz_config"   default="$(find rtabmap_ros)/config/navigation.rviz"/>
    <arg unless="$(arg localization)" name="rviz_config"   default="$(find rtabmap_ros)/config/mapping.rviz"/>

    <arg name="input_odom"       default="/odom"/>
    <arg     if="$(arg use_zed)" name="input_image"        default="/stereo_camera/left/image_rect_color"/>
    <arg     if="$(arg use_zed)" name="input_depth"        default="/stereo_camera/depth/depth_registered"/>
    <arg     if="$(arg use_zed)" name="input_camera_info"  default="/stereo_camera/left/camera_info"/>

    <arg name="rgb_topic"               default="/rgb/image_rect_color" />
    <arg name="depth_topic"             default="/depth/depth_registered" />
    <arg name="camera_info_topic"       default="/rgb/camera_info" />
    <arg name="rgbd_topic"       default="/rgbd_image" />

    <!-- Rtabmap params -->
    <arg name="subscribe_rgbd" default="true"/>
    <arg name="stereo" default="false"/>
    <arg name="approx_sync" default="true"/>

    <!-- rgbd_sync params -->
    <arg name="compressed"              default="true"/>
    <arg name="rgb_image_transport"     default="compressed"/>
    <arg name="approx_rgbd_sync"        default="true"/>
    <arg name="rgbd_sync"               default="true"/>
    <!-- These arguments should not be modified directly, see referred topics without "_relay" suffix above -->
    <arg if="$(arg compressed)"     name="rgb_topic_relay"           default="$(arg rgb_topic)_relay"/>
    <arg unless="$(arg compressed)" name="rgb_topic_relay"           default="$(arg rgb_topic)"/>
    <arg if="$(arg compressed)"     name="depth_topic_relay"         default="$(arg depth_topic)_relay"/>
    <arg unless="$(arg compressed)" name="depth_topic_relay"         default="$(arg depth_topic)"/>
    <arg if="$(arg rgbd_sync)"      name="rgbd_topic_relay"          default="$(arg rgbd_topic)"/>
    <arg unless="$(arg rgbd_sync)"  name="rgbd_topic_relay"          default="$(arg rgbd_topic)_relay"/>

    <!-- launch rgbd_sync -->
    <node if="$(arg compressed)" name="republish_rgb" type="republish" pkg="image_transport" args="compressed in:=$(arg rgb_topic) raw out:=$(arg rgb_topic_relay)" />
    <node if="$(arg compressed)" name="republish_depth" type="republish" pkg="image_transport" args="compressedDepth in:=$(arg depth_topic) raw out:=$(arg depth_topic_relay)" />
    <node pkg="nodelet" type="nodelet" name="rgbd_sync" args="standalone rtabmap_ros/rgbd_sync" output="screen">
        <remap from="rgb/image"       to="$(arg rgb_topic_relay)"/>
        <remap from="depth/image"     to="$(arg depth_topic_relay)"/>
        <remap from="rgb/camera_info" to="$(arg camera_info_topic)"/>
        <remap from="rgbd_image"      to="$(arg rgbd_topic_relay)"/>
        <param name="approx_sync"     type="bool"   value="$(arg approx_rgbd_sync)"/>
        <param name="queue_size"      type="int"    value="100"/>
        <param name="depth_scale"     type="double" value="1 ...
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-04-09 22:25:59 -0600

matlabbe gravatar image

If you have already stereo_sync publishing rgbd_image topic on the robot, don't create another rgbd_sync on remote. It seems the cause of the mixing stereo and rgbd images in the database.

rtabmap is configured with input "/odom" for odometry. rtabmap should look up only one TF, what is the frame_id set in the /odom topic? Is there another node publishing also on the same topic /odom but with different TF? If so, it is maybe why you see rtabmap looking for two different frames.

TF between your base frame and camera frame doesn't look right, the camera seems looking down (the camera cloud's ground doesn't match the floor).


edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2019-04-05 04:07:37 -0600

Seen: 197 times

Last updated: Apr 09 '19