Re: rtab map does not display anything

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

Hi,

As Blupon said, there is a problem with topic remapping. Based on your actual topics, the remapping should look like something like this:
<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="odom" to="/base_controller/odom"/>
            <remap from="scan" to="/scan"/>

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

            <remap from="rgb/image" to="/camera/rgb/image_rect_color "/>
            <remap from="depth/image" to="/camera/depth_registered/image_raw"/>
            <remap from="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="rgb/image" to="/camera/rgb/image_rect_color "/>
            <remap from="depth/image" to="/camera/depth_registered/image_raw"/>
            <remap from="rgb/camera_info" to="/camera/rgb/camera_info"/>

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

        </node>

    </group>

</launch>

cheers,
Mathieu