Ask Your Question
0

working with stereo camera and rtabmap for 3d mapping

asked 2018-09-04 18:57:08 -0600

Prof. xavier gravatar image

updated 2018-09-06 17:03:05 -0600

matlabbe gravatar image

So I am using rtabmap and a ZED stereo for this project based o, 3D mapping. I have the following launch file, I tried to play with with it but no mapping :

<launch>

<arg name="rviz" default="false" />
   <arg name="rtabmapviz" default="true" />
   <arg name="local_bundle" default="true" />
   <arg name="stereo_sync" default="false" />

   <param name="use_sim_time" type="bool" value="True"/>

   <!-- Just to uncompress images for stereo_image_rect -->
   <node name="republish_left"  type="republish" pkg="image_transport" args="compressed in:=/left/image_raw_color out:=/stereo_camera/left/image_raw_throttle_relay" />
   <node name="republish_right" type="republish" pkg="image_transport" args="compressed in:=/right/image_raw_color raw out:=/stereo_camera/right/image_raw_throttle_relay" />

   <!-- Run the ROS package stereo_image_proc for image rectification -->

      <node pkg="stereo_image_proc" type="stereo_image_proc" name="stereo_image_proc">
         <remap from="left/image_raw_color"          to="/stereo_camera/left/image_raw_throttle_relay"/>
         <remap from="left/camera_info"              to="/stereo_camera/left/camera_info_throttle"/>
         <remap from="right/image_raw_color"         to="/stereo_camera/right/image_raw_throttle_relay"/>
         <remap from="right/camera_info"             to="/stereo_camera/right/camera_info_throttle"/>
         <param name="disparity_range"               value="128"/>
      </node>

      <node if="$(arg stereo_sync)" pkg="nodelet" type="nodelet" name="stereo_sync" args="standalone rtabmap_ros/stereo_sync">
      <remap from="left/image_rect_color"   to="left/image_rect_color"/>
      <remap from="right/image_rect_color"   to="right/image_rect"/>
      <remap from="left/camera_info"   to="left/camera_info_throttle"/>
      <remap from="right/camera_info"   to="right/camera_info_throttle"/>
    </node>


   <group ns="rtabmap">   

      <!-- Stereo Odometry -->   
      <node pkg="rtabmap_ros" type="stereo_odometry" name="stereo_odometry" output="screen">
         <remap from="left/image_rect"       to="/stereo_camera/left/image_rect"/>
         <remap from="right/image_rect"      to="/stereo_camera/right/image_rect"/>
         <remap from="left/camera_info"      to="/stereo_camera/left/camera_info_throttle"/>
         <remap from="right/camera_info"     to="/stereo_camera/right/camera_info_throttle"/>
         <remap from="rgbd_image_raw"        to="/stereo_camera/rgbd_image"/>
         <remap from="odom"                  to="/stereo_odometry"/>

         <param name="subscribe_rgbd"  type="bool" value="$(arg stereo_sync)"/>
         <param name="frame_id"        type="string" value="zed_camera_center"/>
         <param name="odom_frame_id"   type="string" value="odom"/>

         <param name="Odom/Strategy"      type="string" value="0"/> <!-- 0=Frame-to-Map, 1=Frame=to=Frame -->
         <param name="Vis/EstimationType" type="string" value="1"/> <!-- 0=3D->3D 1=3D->2D (PnP) -->
         <param name="Vis/MaxDepth"       type="string" value="0"/>
         <param name="Odom/GuessMotion" type="string" value="true"/>
         <param name="Vis/MinInliers"     type="string" value="10"/>
         <param unless="$(arg local_bundle)" name="OdomF2M/BundleAdjustment" type="string" value="0"/>
         <param name="OdomF2M/MaxSize"    type="string" value="1000"/> 
         <param name="GFTT/MinDistance"   type="string" value="10"/>
         <param name="GFTT/QualityLevel"  type="string" value="0.00001"/> 
         <param name="GFTT/QualityLevel"  type="string" value="0.00001"/>
      </node>

      <!-- Visual SLAM: args: "delete_db_on_start" and "udebug" -->
      <node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" output="screen" args="--delete_db_on_start">
         <param name="frame_id"         type="string" value="zed_camera_center"/>
         <param unless="$(arg stereo_sync)" name="subscribe_stereo" type="bool" value="true"/>
         <param name="subscribe_depth"  type="bool" value="false"/>
         <param name="subscribe_rgbd"      type="bool" value="$(arg stereo_sync)"/>

         <remap from="left/image_rect"   to="/stereo_camera/left/image_rect_color"/>
         <remap from="right/image_rect"  to="/stereo_camera/right/image_rect"/>
         <remap from="left/camera_info"  to="/stereo_camera/left/camera_info_throttle"/>
         <remap from="right/camera_info" to="/stereo_camera/right/camera_info_throttle"/>
         <remap from="rgbd_image_raw"        to="/stereo_camera/rgbd_image"/>

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

         <param name="queue_size" type="int" value="30"/>
         <param name="map_negative_poses_ignored" type="bool" value="true"/>

         <!-- RTAB-Map's parameters -->
         <param name="Rtabmap/TimeThr"                   type="string" value="700"/>
         <param name="Grid/DepthDecimation"              type="string" value="4"/>
         <param name ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-09-06 17:15:12 -0600

matlabbe gravatar image

I suggest that you try this tutorial following zed related instructions to see a working example. You can also try this zed launch file to start both zed and rtabmap at the same time:

$ roslaunch zed_rtabmap_example zed_rtabmap.launch

cheers,
Mathieu

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

Stats

Asked: 2018-09-04 18:57:08 -0600

Seen: 219 times

Last updated: Sep 06 '18