Ask Your Question
1

No map data for rtabmap_ros [closed]

asked 2015-06-04 19:27:58 -0500

Tanmay gravatar image

updated 2015-06-25 19:47:12 -0500

Hello,

I'm running Ubuntu 12.04, Ros Hydro, I have rtabmap_ros compiled from source (as per instructions). I am using a stereo camera with (I think) the Stereo B configuration. I have modified the demo_stereo_outdoor.launch file accordingly, by removing the node republishing, remapping to stereo_camera namespace, and set use_sim_time to false. The rtabmap node is running when I launch this file. I also changed base_footprint to base_link.

I also set up a tf broadcaster between base_link frame and camera, and set it to a constant value (0 translation), since I am holding the camera. Now the issue is that all my rtabmap/cloud_map, rtabmap/map rtabmap/path ... (blah blah blah) topics are empty when I echo them. In rviz, my camera frame is moving around with respect to the map frame, but I cannot view the map, the path, or any clouds (optimized or not).

I think the issue could be arising from the following - 1) rviz file could be incorrectly set up since it is the one being used for the demo stereo outdoor. 2) tf tree / frame ID's could be incorrect. This is surprising, since my tf tree is - map --> odom --> base_link --> camera, which seems correct to me.

Also, another glitch that is occurring (but should not make a difference), is that I am supplying the camera frame id, which is an optical frame, but pointcloud frames are defined with a different orientation.

1) Any suggestions on how to solve the mapping issue? 2) Can anyone confirm what frame I am expected to supply to the node?

Here is my rqt_graph: image description

Here is my tf tree:

image description

Thanks!

[UPDATE]

Hi Mathieu,

Sorry to bother you, my RTAB is now giving me this graph output after setting up my approximate stereo camera pair. I modified the approx params as you mentioned. I added a queue size to the rtabmap, rtabmap optimizer, and rtabmap assembler nodes. Notice how the odometry still seems to be working - I get the position of the camera too. However, I can only view /camera/points2 cloud, not the rtabmap/mapData topics or assembled clouds, etc.

Any suggestions?

I just updated the rqt_graph by adding topics to the display - here it is. It seems to be connected correctly as far as I can tell, but still no output.

Here is my launch file just in case.

<launch>

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


<group ns="/camera"> <node pkg="rtabmap_ros" type="stereo_odometry" name="stereo_odometry" output="screen">

     <remap from="left/image_rect"       to="left/image_rect"/>
     <remap from="right/image_rect"      to="right/image_rect"/>
     <remap from="left/camera_info"      to="left/camera_info"/>
     <remap from="right/camera_info"     to="right/camera_info"/>

     <!-- <remap from="left/image_rect"       to="/camera/left/image_rect"/>
     <remap from="right/image_rect"      to="/camera/right/image_rect"/>
     <remap from="left/camera_info"      to="/camera/left/camera_info"/>
     <remap from="right/camera_info"     to="/camera/right/camera_info"/> -->
     <remap from="odom"                  to="/stereo_odometer/odometry"/>

     <param name="frame_id" type="string" value="base_link"/>
     <param name="odom_frame_id" type="string" value="odom"/>

     <param name="queue_size" type="int ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Tanmay
close date 2015-06-21 17:48:21.342082

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-06-07 21:01:04 -0500

matlabbe gravatar image

updated 2015-06-25 08:44:58 -0500

1) In your rqt_graph, the left image and camera info are not shown, are they correctly connected to stereo_img_proc, stereo_odometry and rtabmap? If you are holding your camera, you may do something like a mix of test_stereo_odometry.launch and demo_stereo_outdoor.launch as the Stereo B configuration:

<launch>
<arg name="pi/2" value="1.5707963267948966" />
<arg name="optical_rotate" value="0 0 0 -$(arg pi/2) 0 -$(arg pi/2)" />
<node pkg="tf" type="static_transform_publisher" name="camera_base_link"
    args="$(arg optical_rotate) base_link stereo_camera 100" />  

<!-- Run the ROS package stereo_image_proc -->
<group ns="/stereo_camera" >
    <node pkg="stereo_image_proc" type="stereo_image_proc" name="stereo_image_proc"/>

    <!-- Odometry -->
    <node pkg="rtabmap_ros" type="stereo_odometry" name="stereo_odometry" output="screen">
        <remap from="left/image_rect"       to="left/image_rect"/>
        <remap from="right/image_rect"      to="right/image_rect"/>
        <remap from="left/camera_info"      to="left/camera_info"/>
        <remap from="right/camera_info"     to="right/camera_info"/>

        <param name="frame_id" type="string" value="base_link"/>
        <param name="odom_frame_id" type="string" value="odom"/>
        <param name="approx_sync" type="bool" value="false"/>
        <param name="queue_size" type="int" value="5"/>

        <param name="Odom/InlierDistance" type="string" value="0.1"/>
        <param name="Odom/MinInliers" type="string" value="10"/>
        <param name="Odom/RoiRatios" type="string" value="0.03 0.03 0.04 0.04"/>
        <param name="Odom/MaxDepth" type="string" value="10"/>

        <param name="GFTT/MaxCorners" type="string" value="500"/>
        <param name="GFTT/MinDistance" type="string" value="5"/>
    </node>     
</group>

<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_link"/>
     <param name="subscribe_stereo" type="bool" value="true"/>
     <param name="subscribe_depth" type="bool" value="false"/>

     <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"/>
     <remap from="right/camera_info" to="/stereo_camera/right/camera_info"/>

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

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

     <!-- RTAB-Map's parameters -->
     <param name="Rtabmap/TimeThr" type="string" value="700"/>
     <param name="Rtabmap/DetectionRate" type="string" value="1"/>

     <param name="Kp/WordsPerImage" type="string" value="200"/>
     <param name="Kp/RoiRatios" type="string" value="0.03 0.03 0.04 0.04"/>
     <param name="Kp/DetectorStrategy" type="string" value="0"/>   <!-- use SURF -->
     <param name="Kp/NNStrategy" type="string" value="1"/>         <!-- kdTree -->

     <param name="SURF/HessianThreshold" type="string" value="1000"/>

     <param name="LccBow/MaxDepth" type="string" value="5"/>
     <param name="LccBow/MinInliers" type="string" value="10"/>
     <param name="LccBow/InlierDistance" type="string" value="0.02"/>

     <param name="LccReextract/Activated" type="string" value="true"/>
     <param name="LccReextract/MaxWords" type="string" value="500"/>
  </node>

  <!-- Visualisation RTAB-Map -->
  <node pkg="rtabmap_ros" type="rtabmapviz" name="rtabmapviz" args="-d $(find rtabmap_ros)/launch/config/rgbd_gui.ini" output="screen">
     <param name="subscribe_stereo" type="bool" value="true"/>
     <param name="subscribe_odom_info" type="bool" value="true"/>
     <param name="queue_size" type="int" value="10"/>
     <param name="frame_id" type="string" value="base_link"/>
     <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"/>
     <remap from="right/camera_info" to="/stereo_camera/right/camera_info"/>
     <remap from="odom_info" to="/stereo_camera/odom_info"/>
     <remap from="odom" to ...
(more)
edit flag offensive delete link more

Comments

Hi Mathieu,

My stereocamera is synchronized and working fine, no idea why the rqt_graph came out wrong. It turns out the issue wasn't with tf or rviz. There was an issue with the namespaces the nodes were called in and the remaps, for which I noticed you were resolving namespaces in Corewrapper.

Tanmay gravatar imageTanmay ( 2015-06-08 01:31:08 -0500 )edit

The private nodehandler namespace resolution was giving me some trouble - I explicitly changed it to the topic names and it got rtabmap working. This was before I saw your custom launch file (thanks for that!), I shall try the right group namespaces setup and get back to you -hopefully that works.

Tanmay gravatar imageTanmay ( 2015-06-08 01:32:53 -0500 )edit

Also, one thing I couldn't get my head around - why is it that left and right image topics are remapped to the rect_color and rect respectively? Is this a necessary feature? Thanks again!

Tanmay gravatar imageTanmay ( 2015-06-08 01:35:19 -0500 )edit
1

The right image doesn't have to be RGB because it is only used for disparity computation (only a Grayscale image is required). By using directly the grayscale image, no conversion is done in rtabmap nodes. It is the left image that gives color to generated point clouds of the 3D map.

matlabbe gravatar imagematlabbe ( 2015-06-08 09:08:13 -0500 )edit

I was under the impression both image topics required rect_color. If I understand right - you are only sending rect on the right image, to save on transmitting 1 channel instead of 3?

Tanmay gravatar imageTanmay ( 2015-06-08 20:47:00 -0500 )edit

Also, thanks for taking the trouble to customize the above launch file in so much detail. I really appreciate it!

Tanmay gravatar imageTanmay ( 2015-06-08 20:47:41 -0500 )edit

Yes, using 1 channel for the right image saves some transmitting time too.

matlabbe gravatar imagematlabbe ( 2015-06-08 23:44:31 -0500 )edit

Hi Mathieu, thanks for the inputs. I've updated a glitch I'm having in the question - with a screenshot of my rqt_graph and the terminal output rtab is giving me. Any suggestions?

Tanmay gravatar imageTanmay ( 2015-06-25 01:25:50 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-06-04 19:27:58 -0500

Seen: 2,006 times

Last updated: Jun 25 '15