Problem with subscribe_laserScan [closed]

asked 2016-03-15 22:32:13 -0600

jrebello gravatar image

Hi, I tried following this tutorial [ ] to setup rtabmap on my clearpath husky robot. The launch file is pasted below:

<!-- rtabmap arguments -->
<arg name="rtabmap_args" default="delete_db_on_start" /> 
<arg name="visual_odometry" default="false" />  
<arg name="rgb_topic" default="/camera/rgb/image_rect_color" />
<arg name="frame_id" default="base_link" />
<arg name="scan_topic" default="/scan" />
<arg name="depth_registered_topic" default="/camera/depth_registered/image_raw" />
<arg name="camera_info_topic" default="/camera/rgb/camera_info" />

<!-- rtabmapviz arguments -->
<arg name="rtabmapviz" default="false" /> 
<arg name="rtabmapviz_cfg" default="-d $(find rtabmap_ros)/launch/config/rgbd_gui.ini" />

<!-- rviz arguments -->
<arg name="rviz" default="false" />
<arg name="rviz_cfg" default="-d $(find coffeebot)/launch/config/cbrc.rviz" />

<!-- Use this for localizing in an established database -->
<!-- <arg name="database_path" default="~/.ros/rtabmap.db" /> -->

<!-- ######## Initialize Nodes ######## -->
<!-- Launch husky base -->
<include file="$(find husky_base)/launch/base.launch" />

<!-- Start static transform publishers to attach the laser and kinect to the husky -->
<node pkg="tf" type="static_transform_publisher" 
    name="kinect_tf_publisher" args="-0.5 0 0.8 0 0 0 /user_rail_link /camera_link 100" />
<node pkg="tf" type="static_transform_publisher" 
    name="laser_tf_publisher" args="-0.5 0 0.5 0 0 3.14 /user_rail_link /laser 40" />

<!-- Start Kinect sensor -->
<include file="$(find freenect_launch)/launch/freenect.launch">
    <arg name="depth_registration" value="true" />

<!-- Start laser scanner -->
<node name="hokuyo" pkg="hokuyo_node" type="hokuyo_node" respawn="false" output="screen" >
    <param name="calibrate_time" type="bool" value="true" />
    <param name="port" type="string" value="/dev/ttyACM0" />

<!-- Start rtabmap and vizualization -->
<group ns="rtabmap">        
    <!-- remaps for rtabmap nodes -->
    <remap from="rgb/image"       to="$(arg rgb_topic)" />
    <remap from="depth/image"     to="$(arg depth_registered_topic)" />
    <remap from="rgb/camera_info" to="$(arg camera_info_topic)" />

    <!-- start the rtabmap node -->
    <node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" output="screen" args="--delete_db_on_start">
        <!-- rtabmap parameters ( -->
        <param name="frame_id" type="string" value="$(arg frame_id)" />
        <param name="subscribe_depth" type="bool" value="true" />
        <param name="subscribe_laserScan" type="bool" value="true" />

        <param name="RGBD/PoseScanMatching" type="string" value="true"/>
        <param name="RGBD/LocalLoopDetectionSpace" type="string" value="true"/>
        <param name="LccIcp/Type" type="string" value="2"/>     <!-- 2=ICP 2D -->
        <param name="LccBow/MinInliers" type="string" value="5"/>
        <param name="LccBow/InlierDistance" type="string" value="0.1"/>
        <param name="RGBD/AngularUpdate" type="string" value="0.01"/>
        <param name="RGBD/LinearUpdate" type="string" value="0.01"/>
        <param name="Rtabmap/TimeThr" type="string" value="700"/>
        <param name="Mem/RehearsalSimilarity" type="string" value="0.45"/>
        <param name="RGBD/OptimizeFromGraphEnd" type="string" value="true"/>

        <remap from="odom" to="$(arg odom_topic)" />
        <remap from="scan" to="/scan" />

    <!-- Visualization rtabmapviz -->
    <node if="$(arg rtabmapviz)" pkg="rtabmap_ros" type="rtabmapviz" name="rtabmapviz" args="$(arg rtabmapviz_cfg)" output="screen">
        <param name="subscribe_depth" type="bool" value="true"/>
        <param name="subscribe_laserScan" type="bool" value="$(arg use_laser_scanner)"/>
        <param name="subscribe_odom_info" type="bool" value="$(arg visual_odometry)"/>
        <param name="frame_id" type="string" value="$(arg frame_id)"/>
        <param name="wait_for_transform_duration" type="double" value="0.1"/>

        <!--<remap from="scan"            to="$(arg scan_topic)"/>-->
        <remap unless="$(arg visual_odometry)" from="odom"  to="$(arg odom_topic)"/>

<!-- Start rviz and associated rtabmap nodelets ( -->
<group ns="rviz">
    <!-- Visualization RVIZ -->
    <node if="$(arg rviz ...
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by jrebello
close date 2016-03-17 21:58:37.685869


Can you add the TF tree in your question when the laser is used? using $ rosrun tf view_frames. Also which node is publishing this error (you can use rqt_console for convenience)?

matlabbe gravatar image matlabbe  ( 2016-03-16 13:14:10 -0600 )edit

I managed to solve it by reinstalling rtabmap and rtabmap_ros from source. I think the project is being actively developed so there might have been a problem from the developers side that got fixed.

jrebello gravatar image jrebello  ( 2016-03-17 21:58:20 -0600 )edit