SLAM and navigation with rtabmap_ros + kinectv2

asked 2017-10-04 02:40:51 -0500

slam nav gravatar image

updated 2017-10-04 02:56:00 -0500

Does anyone has any experience building a ROS system that could do SLAM and navigation task concurrently?

  • Goal: 3D + 2D SLAM(visualize in same gui) + Auto-navigation
  • Hardware:
    • robot: turtlebot2
    • sensor: kinectv2

I found this page. Chapter "2.2 Kinect + Odometry + Fake 2D laser from Kinect" seems similar to my requirement, but it lacks some details.

My current progress is I successfully convert kinectv2 data to fake laser scan and feed into rtabmap.

I wonder that:

  1. How can I show the 2D map build by rtabmap_ros?
  2. How to combine 2D and 3D map into same GUI space?

Node graph

Launch file

    <!-- start sensor-->            
    <include file="$(find kinect2_bridge)/launch/kinect2_bridge.launch">
        <arg name="base_name"         value="kinect2"/>
        <arg name="sensor"            value=""/>
        <arg name="publish_tf"        value="true"/>
        <arg name="base_name_tf"      value="kinect2"/>
        <arg name="fps_limit"         value="-1.0"/>
        <arg name="calib_path"        value="$(find kinect2_bridge)/data/"/>
        <arg name="use_png"           value="false"/>
        <arg name="jpeg_quality"      value="90"/>
        <arg name="png_level"         value="1"/>
        <arg name="depth_method"      value="default"/>
        <arg name="depth_device"      value="-1"/>
        <arg name="reg_method"        value="default"/>
        <arg name="reg_device"        value="-1"/>
        <arg name="max_depth"         value="12.0"/>
        <arg name="min_depth"         value="0.1"/>
        <arg name="queue_size"        value="5"/>
        <arg name="bilateral_filter"  value="true"/>
        <arg name="edge_aware_filter" value="true"/>
        <arg name="worker_threads"    value="4"/>
  <!-- Kinect cloud to laser scan -->
    <node pkg="depthimage_to_laserscan" type="depthimage_to_laserscan" name="depthimage_to_laserscan">
      <remap from="image"     to="/kinect2/qhd/image_depth_rect"/>
      <remap from="camera_info" to="/kinect2/qhd/camera_info"/>
      <remap from="scan" to="/scan"/>
      <param name="range_max" type="double" value="4"/>
  <!-- SLAM -->
  <group ns="rtabmap">
    <node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" output="screen" args="--delete_db_on_start">
          <param name="frame_id" type="string" value="base_footprint"/>

          <param name="subscribe_depth" type="bool" value="true"/>
          <param name="subscribe_scan" type="bool" value="true"/>

          <remap from="odom" to="/base_controller/odom"/>
          <remap from="scan" to="/scan"/>

          <remap from="rgb/image" to="/kinect2/qhd/image_color_rect"/>
          <remap from="depth/image" to="/kinect2/qhd/image_depth_rect"/>
          <remap from="rgb/camera_info" to="/kinect2/qhd/camera_info"/>

          <param name="queue_size" type="int" value="10"/>

          <!-- RTAB-Map's parameters -->
          <param name="RGBD/ProximityBySpace"     type="string" value="false"/>
          <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="Optimizer/Slam2D"          type="string" value="true"/>
          <param name="Reg/Strategy"              type="string" value="1"/> <!-- 1=ICP -->
          <param name="Reg/Force3DoF"             type="string" value="true"/>
          <param name="Vis/MaxDepth"              type="string" value="4.0"/>
          <param name="Vis/MinInliers"            type="string" value="5"/>
          <param name="Vis/InlierDistance"        type="string" value="0.05"/>
          <param name="Rtabmap/TimeThr"           type="string" value="700"/>
          <param name="Mem/RehearsalSimilarity"   type="string" value="0.45"/>
          <param name="Icp/CorrespondenceRatio"   type="string" value="0.5"/>
          <!--start rviz view -->
    <node name="rviz" pkg="rviz" type="rviz" args="-d $(find turtle_nav_liu)/rviz/kinect2_depthimage_to_laserscan_view.rviz" />
edit retag flag offensive close merge delete


Which version of rtabmap are you using? Kinetic binaries?

matlabbe gravatar image matlabbe  ( 2017-10-04 10:07:37 -0500 )edit