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

Why amcl is not working?

asked 2012-04-19 03:39:59 -0600

Torres gravatar image

updated 2012-04-19 04:47:13 -0600

Hi, I am trying to implement amcl on rviz using nxt and kinect.

However, it just can't localize itself. I have used rviz 2D pose estimate to select the initial location of the robot as shown below (but no particle cloud is shown after I release my mouse click button -> rviz highlighted the particle cloud in yellow)

image description

The navigation stack is working perfectly, it can plan the required navigation path and move to the desired destination, as shown in the pictures below:

image description

image description

The rxgraph is shown below (amcl did received all the 4 needed subscribed topics which are /scan, /tf, /map and /initialpose reference) :

image description

Clearer Image for rxgraph

The tf_frames is shown below (I can't detect any error with the tf_frames as well ,hmm...):

image description

The yaml files:

costmap_common_params.yaml:

obstacle_range: 2.5

raytrace_range: 3.0

footprint: [[0.305, 0.278], [0.04, 0.193], [-0.04, 0.193], [-0.282, 0.178], [-0.282, -0.178], [-0.04, -0.193], [0.04, -0.193], [0.305, -0.278]]

inflation_radius: 0.55

observation_sources: laser_scan_sensor

laser_scan_sensor: {sensor_frame: openni_depth_frame, data_type: LaserScan, topic: scan, marking: false, clearing: true}

global_costmap_params.yaml:

  global_costmap:

  global_frame: /map

  robot_base_frame: base_footprint

  update_frequency: 5.0

  static_map: true

local_costmap_params.yaml:

  local_costmap:

  global_frame: odom_combined

  robot_base_frame: base_footprint

  update_frequency: 5.0

  publish_frequency: 2.0

  static_map: false

  rolling_window: true

  width: 6.0

  height: 6.0

  resolution: 0.05

base_local_planner_params.yaml:

TrajectoryPlannerROS:

  max_vel_x: 0.45

  min_vel_x: 0.1

  max_rotational_vel: 1.0

  min_in_place_rotational_vel: 0.4

  acc_lim_th: 3.2

  acc_lim_x: 2.5

  acc_lim_y: 2.5

  holonomic_robot: False

The launch files:

amcl_diff_with_map_hwk.launch:

<launch>

<node pkg="amcl" type="amcl" name="amcl" output="screen">

  <param name="use_map_topic " value="true"/>

  <!-- 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.8"/>

  <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="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"/>

</node>

</launch>

move_base.launch:

<launch>

  <master auto="start"/>

  <!-- Run the map server -->

  <node name="map_server" pkg="map_server" type="map_server" args="$(find not_good)/Maps/map.pgm 0.05"/>

  <!-- tf /map to /odom_combined -->

  <node pkg="tf" type="static_transform_publisher" name="map_to_odom_combined" args="100 100 0 0 ...
(more)
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
4

answered 2012-04-19 15:29:10 -0600

Eric Perko gravatar image

updated 2012-04-24 05:31:03 -0600

If your odometry frame is odom_combined, you should change the odom_frame_id AMCL parameter to odom_combined. I see you have it set to odom.

edit flag offensive delete link more

Comments

Thanks Eric Perko. =)

Torres gravatar image Torres  ( 2012-04-23 22:20:15 -0600 )edit

Thanks Eric Perko =) Could you please have a look at this post as well thanks http://answers.ros.org/question/33319/rosrun-vs-roslaunch

Torres gravatar image Torres  ( 2012-05-04 21:26:58 -0600 )edit
2

answered 2012-04-19 15:05:48 -0600

weiin gravatar image

Take a look at this

AMCL provides the transform from /map to /odom_combined so you do not need the static_transform_publisher node running

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-04-19 03:39:59 -0600

Seen: 5,546 times

Last updated: Apr 24 '12