Does laser and rgbd camera work in odometry estimation?

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

Does laser and rgbd camera work in odometry estimation?

TouchDeeper
Hello Mathieu,

I run the rtabmap with IMU, wheel odometry, laser and Kinect in Gazebo. I want to know in my launch file below, does laser and rgbd camera work in odometry estimation? I guess the laser and rgbd camera is just for mapping here, wheel odometry and IMU fused by ekf_localization estimate the odometry. However, the laser should achieve proximity detection. Could you please provide some advice? Thanks a lot.

The launch file is below:


<launch>
  <arg name="database_path"     default="rtabmap.db"/>
  <arg name="rgbd_odometry"     default="false"/>
  <arg name="rtabmapviz"        default="false"/>
  <arg name="localization"      default="false"/>
  <arg name="simulation"        default="false"/>
  <arg name="sw_registered"     default="false"/>
  <arg     if="$(arg localization)" name="args"  default=""/>
  <arg unless="$(arg localization)" name="args"  default="--delete_db_on_start"/>

  <arg     if="$(arg simulation)" name="rgb_topic"   default="/camera/rgb/image_raw"/>
  <arg unless="$(arg simulation)" name="rgb_topic"   default="/camera/rgb/image_rect_color"/>
  <arg     if="$(arg simulation)" name="depth_topic" default="/camera/depth/image_raw"/>
  <arg unless="$(arg simulation)" name="depth_topic" default="/camera/depth_registered/image_raw"/>
  <arg name="camera_info_topic" default="/camera/rgb/camera_info"/>
  
  <arg name="wait_for_transform"  default="0.2"/> 
  <!-- 
      robot_state_publisher's publishing frequency in "turtlebot_bringup/launch/includes/robot.launch.xml" 
      can be increase from 5 to 10 Hz to avoid some TF warnings.
  -->

  <!-- Navigation stuff (move_base) -->
  <include unless="$(arg simulation)" file="$(find betago_navigation)/launch/3dsensor.launch">
     <arg     if="$(arg sw_registered)" name="depth_registration" value="false"/>
     <arg unless="$(arg sw_registered)" name="depth_registration" value="true"/>
  </include>

<!--  Move base  -->
  <include file="$(find ridgeback_navigation)/launch/include/move_base.launch" />

  <!-- Mapping -->
    <group ns="rtabmap">

        <!-- Use RGBD synchronization -->
        <!-- Here is a general example using a standalone nodelet,
             but it is recommended to attach this nodelet to nodelet
             manager of the camera to avoid topic serialization -->
        <node pkg="nodelet" type="nodelet" name="rgbd_sync" args="standalone rtabmap_ros/rgbd_sync" output="screen">
            <remap from="rgb/image"       to="$(arg rgb_topic)"/>
            <remap from="depth/image"     to="$(arg depth_topic)"/>
            <remap from="rgb/camera_info" to="$(arg camera_info_topic)"/>
            <remap from="rgbd_image"      to="rgbd_image"/> <!-- output -->

            <!-- Should be true for not synchronized camera topics
                 (e.g., false for simulation, kinectv2, zed, realsense, true for xtion, kinect360)-->
            <param name="approx_sync"       value="false"/>
        </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="false"/>
            <param name="subscribe_rgbd" type="bool" value="true"/>
            <param name="subscribe_scan" type="bool" value="true"/>

            <remap from="odom" to="/odometry/filtered"/>
            <remap from="scan" to="/front/scan"/>
            <remap from="rgbd_image" to="rgbd_image"/>

            <param name="queue_size" type="int" value="15"/> <!--TODO how to set this value-->

            <!-- output -->
            <remap from="grid_map" to="/map"/>

            <!-- RTAB-Map's parameters -->
            <param name="RGBD/NeighborLinkRefining" type="string" value="true"/>
            <param name="RGBD/ProximityBySpace"     type="string" value="true"/>
            <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="Grid/FromDepth"            type="string" value="false"/> <!-- occupancy grid from lidar -->
            <param name="Reg/Force3DoF"             type="string" value="true"/>
            <param name="Reg/Strategy"              type="string" value="1"/> <!-- 1=ICP -->

            <!-- ICP parameters -->
            <param name="Icp/VoxelSize"                 type="string" value="0.05"/>
            <param name="Icp/MaxCorrespondenceDistance" type="string" value="0.1"/>
            <!-- localization mode -->
            <param     if="$(arg localization)" name="Mem/IncrementalMemory" type="string" value="false"/>
            <param unless="$(arg localization)" name="Mem/IncrementalMemory" type="string" value="true"/>
            <param name="Mem/InitWMWithAllNodes" type="string" value="$(arg localization)"/>
        </node>
        <!-- visualization with rtabmapviz -->
        <node if="$(arg rtabmapviz)" pkg="rtabmap_ros" type="rtabmapviz" name="rtabmapviz" args="-d $(find rtabmap_ros)/launch/config/rgbd_gui.ini" output="screen">
            <param name="subscribe_depth"             type="bool" value="true"/>
            <param name="subscribe_scan"              type="bool" value="true"/>
            <param name="frame_id"                    type="string" value="base_link"/>
            <param name="wait_for_transform_duration" type="double" value="$(arg wait_for_transform)"/>

            <remap from="rgb/image"       to="$(arg rgb_topic)"/>
            <remap from="depth/image"     to="$(arg depth_topic)"/>
            <remap from="rgb/camera_info" to="$(arg camera_info_topic)"/>
            <remap from="scan"            to="/front/scan"/>
        </node>
    </group>
</launch>


The rviz snapshot is:



The node graph is below, sorry, the picture needs to be this big to see clearly:

Reply | Threaded
Open this post in threaded view
|

Re: Does laser and rgbd camera work in odometry estimation?

matlabbe
Administrator
Hi,

it is pretty much what you say :)

You are using /odometry/filtered as odometry (which seems to be the output of your EKF). rtabmap node is subscribing to laser scan and RGBD/ProximityBySpace is enabled, so proximity detection with lidar is enabled.

EDIT: show the MapGraph in RVIZ, it will help to see proximity detections as yellow links.
Reply | Threaded
Open this post in threaded view
|

Re: Does laser and rgbd camera work in odometry estimation?

TouchDeeper
Hello Mathieu,

Thanks for your reply, I think I get it.