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

amcl dont do the localization job and results in unmatching maps

asked 2016-06-29 07:15:32 -0500

bsk gravatar image

updated 2016-06-30 05:51:24 -0500

hello,

I'm using lms100 only, when i use gmapping+laser scan matcher and costmap at the same time it was ok, but then i tried the other option; static map(which i built via gmapping before), map_server and amcl (again with laser scan matcher for odometry) can't manage it. it looks like amcl didn't do its job.

i don't have a robot system so i don't know which amcl (diff or omni) should i choose or if that even affects the functionality of amcl.

in rviz, it looks like this.

image description

my launch file:

 <launch>
      <param name="/use_sim_time" value="false"/>
      <node pkg="tf" type="static_transform_publisher" name="base_link_to_laser" 
        args="0.0 0.0 0.0 0.0 0.0 0.0 /base_link /laser 40" />

      <node pkg="rviz" type="rviz" name="rviz" 
        args="-d $(find laser_scan_matcher)/demo.rviz"/>

     <node pkg="lms1xx" name="lms1xx" type="LMS1xx_node">
        <param name="host" value="169.254.10.200" />
     </node>

      <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="use_alpha_beta" value="true"/>
        <param name="max_iterations" value="10"/>
      </node>

       <node name="map_server" pkg="map_server" type="map_server" args="$(find bsk)/launch/maps/gcost2.yaml"/>

      <node pkg="amcl" type="amcl" name="amcl" output="screen" >
      <!-- Publish scans from best pose at a max of 10 Hz -->
      <param name="odom_model_type" value="diff"/>
      <param name="odom_alpha5" value="0.1"/>
      <param name="transform_tolerance" value="0.2" />
      <param name="gui_publish_rate" value="10.0"/>
      <param name="laser_max_beams" value="30"/>
      <param name="min_particles" value="500"/>
      <param name="max_particles" value="5000"/>
      <param name="kld_err" value="0.05"/>
      <param name="kld_z" value="0.99"/>
      <param name="odom_alpha1" value="0.2"/>
      <param name="odom_alpha2" value="0.2"/>

      <!-- translation std dev, m -->
      <param name="odom_alpha3" value="0.2"/>
      <param name="odom_alpha4" value="0.2"/>
      <param name="laser_z_hit" value="0.5"/>
      <param name="laser_z_short" value="0.05"/>
      <param name="laser_z_max" value="0.05"/>
      <param name="laser_z_rand" value="0.5"/>
      <param name="laser_sigma_hit" value="0.2"/>
      <param name="laser_lambda_short" value="0.1"/>
      <param name="laser_lambda_short" value="0.1"/>
      <param name="laser_model_type" value="likelihood_field"/>
      <!-- <param name="laser_model_type" value="beam"/> -->
      <param name="laser_likelihood_max_dist" value="2.0"/>
      <param name="update_min_d" value="0.2"/>
      <param name="update_min_a" value="0.5"/>
      <param name="odom_frame_id" value="odom"/>
      <param name="base_frame_id" type="str" value="base_link" />
      <param name="global_frame_id" type="str" value="map" />
      <param name="resample_interval" value="1"/>
      <param name="transform_tolerance" value="0.1"/>
      <param name="recovery_alpha_slow" value="0.0"/>
      <param name="recovery_alpha_fast" value="0.0"/>
      <param name="use_map_topic" value="true" />
      <param name="first_map_only" value="true" />
    </node>

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

costmap_common_params.yaml:

obstacle_range: 2.5
raytrace_range: 3.0
footprint: [[-0.325, -0.325], [-0.325, 0.325], [0.325, 0.325], [0 ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-06-30 04:24:27 -0500

asimay_y gravatar image

you should clean up your costmap''s yaml file of these warning, and then test amcl. the warning shows that you didn't config yaml file well.

edit flag offensive delete link more

Comments

but that /scan observation buffer has not been updated error was just pop up twice.I saw answer from David Lu said if that warning shows up just in beginning its ok and other warnings happened because i tried 2DPoseEstimate in rviz which didnt work cuz amcl i think. I updated question with yamls

bsk gravatar image bsk  ( 2016-06-30 04:36:03 -0500 )edit

I mean Trajectory Rollout planner is in planner yaml. modify it first.

asimay_y gravatar image asimay_y  ( 2016-06-30 05:10:27 -0500 )edit

and in laser_scan_matcher, <param name="fixed_frame" value = "odom"/> i don't think above is right. you can also change or remove: expected_update_rate: 0.4,

asimay_y gravatar image asimay_y  ( 2016-06-30 05:18:31 -0500 )edit

i removed expected rate and that warning is gone. main problem is still exist. why do you think odom isnt right? this configuration is ok with gmapping&costmap so i didnt change it.

bsk gravatar image bsk  ( 2016-06-30 05:49:28 -0500 )edit

i updated question with base_local_planner_params.yaml but since i dont have a robot, didnt modify just use the defaults. I dont need to use planner after move_base, just want to manage to see local and global costmaps succesfully with a given static map

bsk gravatar image bsk  ( 2016-06-30 05:54:09 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2016-06-29 07:15:32 -0500

Seen: 975 times

Last updated: Jun 30 '16