0
$\begingroup$

Rosanswers logo

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 http://i1214.photobucket.com/albums/cc484/torresho/April2012/amcl_2D_pose_estimate_not_working-1.png

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 http://i1214.photobucket.com/albums/cc484/torresho/April2012/navigationpath.png

image description http://i1214.photobucket.com/albums/cc484/torresho/April2012/navigationtodestination.png

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

image description http://i1214.photobucket.com/albums/cc484/torresho/April2012/amcl_rxgraph_map_topic_connected_but_cannot_localize.png

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 http://i1214.photobucket.com/albums/cc484/torresho/April2012/tfview_framesResult.png

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 0 0 /map /odom_combined 100"/>

  <!--- Run AMCL -->

  <include file="$(find not_good)/amcl_diff_with_map_hwk.launch" />

  <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">

  <rosparam file="$(find not_good)/costmap_common_params.yaml" command="load" ns="global_costmap" />

  <rosparam file="$(find not_good)/costmap_common_params.yaml" command="load" ns="local_costmap" />

  <rosparam file="$(find not_good)/local_costmap_params.yaml" command="load" />

  <rosparam file="$(find not_good)/global_costmap_params.yaml" command="load" />

  <rosparam file="$(find not_good)/base_local_planner_params.yaml" command="load" />

</node>

</launch>

***Question :Why AMCL is still not working at all? Hmm...


Originally posted by Torres on ROS Answers with karma: 112 on 2012-04-19

Post score: 2

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Eric Perko with karma: 8406 on 2012-04-19

This answer was ACCEPTED on the original site

Post score: 4


Original comments

Comment by Torres on 2012-04-23:
Thanks Eric Perko. =)

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

$\endgroup$
0
$\begingroup$

Rosanswers logo

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


Originally posted by weiin with karma: 2268 on 2012-04-19

This answer was NOT ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.