ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
5

AMCL + Laser Scan Matcher Crashing

asked 2013-11-07 01:59:26 -0500

updated 2014-01-28 17:18:28 -0500

ngrennan gravatar image

Greetings, I am using AMCL for localisation purposes, along with the lase scan matcher in order to use the robot's Hokuyo for odometry. When I run the LSM alone or with Hector mapping the results are satisfying, which means that I get real and precise odometry and localisation.

What I want is to load a map made with the above method and use AMCL to localise. So I need to have the local scan matcher working along with AMCL and the map server. The problem is that when AMCL begins its /amcl_pose topic will explode with impossible values such as :

header: 
  seq: 59
  stamp: 
    secs: 1383831717
    nsecs: 913606750
  frame_id: map
pose: 
  pose: 
    position: 
      x: -6544630.80033
      y: 3216474.76088
      z: 0.0
    orientation: 
      x: 0.0
      y: 0.0
      z: 0.702181212802
      w: 0.711998275552
  covariance: [35307899258837.086, 3493650456763.3486, 0.0, 0.0, 0.0, 0.0, 3493650456763.3496, 26413591121546.38, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 9.113657631539715]

, and promptly crash.

The transforms provided can be seen in the following launch files: Firstly, the lase scan matcher launch file :

<launch>
    <!-- <node pkg="tf" type="static_transform_publisher" name="world_odom" args="0.10 0 0 0.0 0.0 0.0 /world /map 40"/> -->
    <node pkg="tf" type="static_transform_publisher" name="map_odom" args="0.10 0 0 0.0 0.0 0.0 /map /odom 100" />
    <node pkg="tf" type="static_transform_publisher" name="odom_bl" args="0.10 0 0 0.0 0.0 0.0 /odom /base_link 100" />
    <node pkg="tf" type="static_transform_publisher" name="bl_laser" args="0.0 0 0 0.0 0.0 0.0 /base_link /laser 100" />
    <node name="map_server" pkg="map_server" type="map_server" args="/home/****/test.yaml"/>
    <node pkg="laser_scan_matcher" type="laser_scan_matcher_node" name="laser_scan_matcher_node" output="screen">
        <!-- <param name="fixed_frame" value = "odom"/> -->
        <param name="base_frame" value = "/base_link"/>
        <param name="fixed_frame" value = "map"/>
        <param name="use_cloud_input" value="false"/>
        <param name="publish_tf" value="true"/>
        <param name="publish_odom" value="true"/>
        <param name="use_odom" value="false"/>
        <param name="use_imu" value="false"/>
        <param name="use_alpha_beta" value="true"/>
        <param name="max_iterations" value="10"/>
    </node>
    <node pkg="hokuyo_node" type="hokuyo_node" name="hokuyo_node"> 
        <param name="intensity" type="bool" value="true"/>
    </node>

</launch>

And secondly the AMCL launch file :

<launch>
<!--- Run AMCL -->
 <include file="/home/******/navigation-hydro-devel/amcl/examples/amcl_diff.launch" /> 

  <node pkg="sek_drive" type="drive_base" respawn="true" name="sek_drive" output="screen">
    <rosparam file="$(find sek_drive)/launch/costmap_common_params.yaml" command="load" ns="global_costmap" />
    <rosparam file="$(find sek_drive)/launch/costmap_common_params.yaml" command="load" ns="local_costmap" />
    <rosparam file="$(find sek_drive)/launch/local_costmap_params.yaml" command="load" />
    <rosparam file="$(find sek_drive)/launch/global_costmap_params.yaml" command="load" />
    <rosparam file="$(find sek_drive)/launch/base_local_planner_params.yaml" command="load" />
  </node>
</launch>

What I notice is that the odometry provided by LSM has always all-zero covariance. Could that be a problem ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
5

answered 2013-11-07 02:54:50 -0500

Ben_S gravatar image
  1. Remove the static transforms from map -> odom and odom -> base_link. You want them dynamic from amcl and the laser_scan_matcher and not static.
  2. fixed_frame for the laser_scan_matcher has to be set to /odom and not map, since the node is responsible for your odom -> base_link transform and not the localization within your map.
edit flag offensive delete link more

Comments

That seems to have did the trick ! Thank you !

AndreasLydakis gravatar image AndreasLydakis  ( 2013-11-07 20:55:12 -0500 )edit

WAIT WAT? sry i m new to ros i have the same issue but i dun understand the solution...pls give hlp mi more...

rui gravatar image rui  ( 2018-11-16 01:24:46 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2013-11-07 01:59:26 -0500

Seen: 2,694 times

Last updated: Nov 07 '13