ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org
Ask Your Question
0

2d pose estimation in navigation with amcl

asked 2016-03-24 13:28:47 -0500

papaclaudia gravatar image

updated 2016-03-24 13:29:24 -0500

Hi! I launch these files:

$ roscore
$ roslaunch frontier_exploration robot.launch
$ roslaunch modeling display.launch model:="modeling/urdf/myrobot.urdf"
$ roslaunch frontier_exploration move_base_staticmap.launch
$ roslaunch frontier_exploration global_map.launch

in robot.launch I have the commands to start the lidar and tf transformations (scanmatcher -> base_link -> neato_laser); in move_base_staticmap.launch I have this:

<launch>
<!-- Run the map server -->
<node name="map_server" pkg="map_server" type="map_server" args="$(find robot_setup_tf)/mymaps/map.yaml" output="screen"/>
<include file="$(find frontier_exploration)/launch/amcl_diff.launch">
</include>

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

</launch>

Is it normal that I have to give the 2d pose estimate in rviz and it is not automatically done by amcl? Because if I move the laser, the points move but the robot model remains stationary in the map? Can I use hector_slam instead of amcl_diff.launch? If I can do, what I have to replace this file? Please if you have at least one answer to all these questions, you give me a big help! Thank you! :)

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-03-28 04:58:33 -0500

Is it normal that I have to give the 2d pose estimate in rviz and it is not automatically done by amcl?

When? At the very beginning, AMCL needs to initialize its filter. This is done with a initialPose message given by the user, e.g. with RVIZ. If you don't provide an initialization, if I remember correctly, the particle set is initialized at pose-zero, I mean, the origin of your map or odom frame (which should coincide/have-the-same-pose at the beginning).

Because if I move the laser, the points move but the robot model remains stationary in the map?

This is not a problem with the lasers, AMCL asks to TF "if the robot has moved" to "update the filter". If you don't provide a transform (usually from base_frame to odom) AMCL will not update anything.

As every filter, AMCL has two main steps, Prediction (called UpdateAction inside the AMCL code, i.e. the motion model) and Measure incorporation (UpdateSensor inside AMCL, one of the two sensor models, i.e. Likelihood Field Model or the Beam Model). The first one is done using TF, so your system needs to provide that motion estimate. Then, the predicted estimate (according to the motion model) will be corrected/improved using the sensor readings, i.e. the laser scan and the known map.

So, to answer to your question: if the points move but the robot model remains stationary in the map you have some problems with TF, or you are not providing a motion estimate :-)

bye!

edit flag offensive delete link more

Comments

Thank you!

papaclaudia gravatar imagepapaclaudia ( 2016-03-29 11:11:24 -0500 )edit
0

answered 2016-03-27 21:01:42 -0500

DavidN gravatar image

updated 2016-03-27 21:02:23 -0500

  1. If you give the (correct) pose estimation in rviz, you increase the chance that amcl will localize accurately robot actual location.
  2. The robot location only updates if the particles have converged. If particles are still spreading, there is no guarantee that robot location will be updated.
  3. AMCL gives the tf between map and odom, it gives estimated position of robot with reference to a known map. Hector slam, on the hand, doesnt use any known map; in navigation, hector slam is normally used to keep give tf from odom to baselink. So you cant simply replace amcl by hector slam for the purpose of robot localization.
edit flag offensive delete link more

Comments

Regarding the #2, i'm not sure about that. I worked a lot with an old version of AMCL and the particle set should be mostly updated at every laser-received (of course if some motion has been detected with TF), even if the particle set is widespread in multiple clusters

Augusto Luis Ballardini gravatar imageAugusto Luis Ballardini ( 2016-03-28 04:37:57 -0500 )edit

Thank you!

papaclaudia gravatar imagepapaclaudia ( 2016-03-29 11:11:13 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-03-24 13:28:47 -0500

Seen: 1,079 times

Last updated: Mar 28 '16