0
$\begingroup$

Rosanswers logo

Hi,

I am doing 3D mapping with Kinect 360 camera using RTABMAP. Mapping starts well and then I start getting this two errors:

  1. "[ WARN] (2020-07-22 14:50:09.654) Rtabmap.cpp:2144::process() Rejected loop closure 93 -> 173: Too large rotation detected! (pitch=0.000000, yaw=0.000000) max is -1.628242"

  2. [ WARN] (2020-07-22 14:57:33.872) Rtabmap.cpp:2144::process() Rejected loop closure 57 -> 99: Not enough inliers after bundle adjustment 0/20 (matches=70) between 57 and 99

They occur in between lots of successful readings. For moving a robot I use:

rostopic pub -1 cmd_vel geometry_msgs/Twist '[0.1, 0, 0]' '[0, 0, 0]'

and for rotation I use:

rostopic pub -1 cmd_vel geometry_msgs/Twist '[0, 0, 0]' '[0, 0, 0.1]'

I am using Pioneer 3-AT with ROS Melodic.

Here is my Gazebo world: https://imgur.com/a/B1bPeDE Here are my map when it is still correct: https://imgur.com/a/4Iqg4Tg, and when error occurs: https://imgur.com/a/vv7x60W

Here is my rtabmap.launch file:

<launch>
<param name="/use_sim_time" value="true"/>
<node pkg="nodelet" type="nodelet" name="rgbd_sync" args="standalone rtabmap_ros/rgbd_sync" output="screen">
      <remap from="rgb/image"        to="/camera/rgb/image_raw"/>
      <remap from="depth/image"      to="/camera/depth/image_raw"/>
      <remap from="rgb/camera_info"  to="/camera/rgb/camera_info"/>
      <remap from="rgbd_image"       to="rgbd_image"/> <!-- output -->
      <!-- Should be true for not synchronized camera topics 
       (e.g., false for kinectv2, zed, realsense, true for xtion, kinect360)-->
      <param name="approx_sync"       value="true"/> 
    <param name="queue_size"  type="int"  value="10"/>
    </node>

<!-- Odometry -->
<node pkg="rtabmap_ros" type="rgbd_odometry" name="rgbd_odometry" output="screen">
    <!--param name="subscribe_rgbd" type="bool"   value="true"/-->
    <remap from="rgb/image"       to="/camera/rgb/image_raw"/>
    <remap from="depth/image"     to="/camera/depth/image_raw"/>
    <remap from="rgb/camera_info" to="/camera/rgb/camera_info"/>
    <param name="frame_id"       type="string" value="base_link"/>
    <remap from="rgbd_image" to="rgbd_image"/>
    <param name="publish_tf"  type="bool"   value="false"/>
    <param name="queue_size"  type="int"  value="10"/>
</node>
  <param name="map_frame" value="map"/>
  <param name="odom_frame" value="odom"/>
  <param name="base_link_frame" value="base_link"/>
  <param name="world_frame" value="map"/>

  <param name="odom0" value="odom"/>
  <param name="pose0" value="rtabmap/localization_pose"/> 

  <!-- The order of the values is x, y, z, roll, pitch, yaw, vx, vy, vz, vroll, vpitch, vyaw, ax, ay, az. -->
  <rosparam param="odom0_config">[true, true, false,
                                  false, false, true,
                                  false, false, false,
                                  false, false, false,
                                  false, false, false]</rosparam>

  <rosparam param="pose0_config">[
                                 true,   true,  false,
                                 false,  false, true,
                                 false,  false, false,
                                 false,  false, false,
                                 false,  false, false] </rosparam>  
  
  <param name="odom0_differential" value="true"/>
  <param name="pose0_differential" value="false"/>

  <param name="odom0_relative" value="true"/>
  <param name="pose0_relative" value="false"/>

  <param name="odom0_queue_size" value="5"/>
  <param name="pose0_queue_size" value="2"/> 
<node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" output="screen" args="--delete_db_on_start">
    <param name="frame_id"        type="string" value="map"/>
    <param name="subscribe_depth" type="bool"   value="false"/>
    <param name="subscribe_rgbd"  type="bool"   value="true"/>

    <remap from="odom"       to="odom"/>
    <remap from="rgbd_image" to="rgbd_image"/>

    <param name="queue_size"  type="int"  value="500"/>
    <param name="approx_sync" type="bool" value="false"/>

    <!-- RTAB-Map's parameters -->
    <param name="RGBD/AngularUpdate"        type="string" value="0.01"/>
    <param name="RGBD/LinearUpdate"         type="string" value="0.01"/>
    <param name="RGBD/OptimizeFromGraphEnd" type="string" value="false"/>
    <param name="RGBD/OptimizeMaxError" type="int" value="0"/>
    <!--param name="Grid/FromDepth" type="string" value="false"/-->
    <param name="sensor_model/hit" value="1" />
    <param name="sensor_model/miss" value="0" />
    <param name="Reg/Force3DoF" value="true"/> <!-- 2D mode -->
    <!--param name="publish_tf"  type="bool"   value="false"/-->
    <param name="sensor_model/max_range" value="5.0" />
    <param name="latch" value="false" />
</node>

Did someone have this problem or does someone know how to fix it? Thanks in advance.

Best regards.


Originally posted by leodomitrovic on ROS Answers with karma: 33 on 2020-07-22

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Those are warnings, and they mean the loop closure has been rejected because the returned transform was wrong or because there were not enough inliers. Your environment seems to have a lot of repetitive textures, this could generate those kind of rejections. You can ignore hem unless real loop closures are not found or rejected.


Originally posted by matlabbe with karma: 6409 on 2020-08-21

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by leodomitrovic on 2020-08-22:
Ok. Thank you for your answer.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.