rtab map does not display anything

Posted by mwolf on
URL: http://official-rtab-map-forum.206.s1.nabble.com/rtab-map-does-not-display-anything-tp3541.html

Hi Mathieu,
I followed your tutorial to bring up RTAB-Map on a computer connected to a mobile robot with ASUS Xtion + Odometry + laser (clearpath husky).

I have launched the camera with the opennni2.launch file. The laser is launched via the urg_laser.launch file. This works and I can display the laserscan as well as the images in rviz.

But I am failing to get Rtabmap to work. I am doing the following:

1. export ROS_MASTER_URI of the robot
2. start rtabmap and rtabmap viz on the computer via this launch file:

<launch>

    <!-- Visualization mode -->
    <arg name="rviz" default="false" />
    <arg name="rtabmapviz" default="true" />

    <!-- RTAB-Map -->
    <group ns="rtabmap">
        <node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" output="screen" args="--delete_db_on_start">

          <param name="queue_size" type="int" value="50"/>
            <!-- Fixed frame on the robot -->
            <param name="frame_id" type="string" value="base_link"/>

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

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

            <!-- Depth information from sensors -->
            <param name="subscribe_depth" type="bool" value="true"/>

            <remap from="camera/rgb/image" to="/camera/rgb/image_rect_color"/>
            <remap from="camera/depth/image" to="/camera/depth_registered/image_raw"/>
            <remap from="camera/rgb/camera_info" to="/camera/rgb/camera_info"/>

        </node>

        <!-- Visualisation RTAB-Map -->
        <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" type="bool" value="true"/>

            <remap from="camera/rgb/image" to="/camera/rgb/image_rect_color"/>
            <remap from="camera/depth/image" to="/camera/depth_registered/image_raw"/>
            <remap from="camera/rgb/camera_info" to="/camera/rgb/camera_info"/>

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

        </node>

    </group>

</launch>

This brings up rtab-map displaing nothing:


Console:
[ INFO] [1501497138.858241498]: 
/rtabmap/rtabmapviz subscribed to:
   /rtabmap/rgb/image/compressed,
   /rtabmap/depth/image/compressedDepth,
   /rtabmap/rgb/camera_info,
   /rtabmap/odom,
   /base_scan,
   /rtabmap/odom_info

I have checked that the input is published via:
$ rostopic hz /base_controller/odom
$ rostopic hz /camera/rgb/image_rect_color
$ rostopic hz /camera/depth_registered/image_raw
$ rostopic hz /camera/rgb/camera_info
$ rostopic hz /camera/rgb/camera_info
$ rostopic hz /scan

"rosrun tf view_frames creates following pdf":

frames.pdf

Also the /map node does not show up when I start the launch file. This is also the case, if I start rtabmap on the robot itself and only the visualization on the computer. However this brings up the following warning from rtabmap:

[ WARN] [1501496314.304435045]: /rtabmap/rtabmap: Did not receive data since 5 seconds! Make sure the input topics are published ("$ rostopic hz my_topic") and the timestamps in their header are set. If topics are coming from different computers, make sure the clocks of the computers are synchronized ("ntpdate"). If topics are not published at the same rate, you could increase "queue_size" parameter (current=50).
/rtabmap/rtabmap subscribed to (approx sync):
   /rtabmap/odom,
   /rtabmap/rgb/image,
   /rtabmap/depth/image,
   /rtabmap/rgb/camera_info,
   /base_scan

All these topics are published and I dont know what I am missing...

Do you know what I am doing wrong?

Thanks in advance!