0
$\begingroup$

Rosanswers logo

Hello All,

Using amcl as described in Ros By Example volume 1, section 8.5.2, I am confused. There are 2 maps in Rviz, one using topic /map, and showing the map I use, and one called Inflated Obstacles using topic /move_base/local_costmap/costmap. And it shows the inflated map include inflated data from the laser. Initially both maps are overlapping.

But if I do a "2D Pose Estimate", the inflated map moves with the setting of the pose. So if I only turn the robot 90 degrees, the inflated map also turns 90 degrees with respect to the other map. I can see that the laser data now is correct with respect to the robot, but not with respect to the inflated map. And navigation does not work.

I am confused, the only difference with the setup in the book is our own simple controller that does dead reckoning for odometry. And it works perfectly with move_base.

EDIT:

Initially both the global map and the (inflated) local (incl. laser) map are overlapping, as it should be. The robot is at some position. When setting the pose correctly, the laser is set to align with the global map. The inflated map now is completely wrong because it moved with the robot.

For example a wall in the local map now is standing in the middle of the room in the global map.

I would assume the because of the laser data the local map will be updated, but it isn't. And navigation through that part of the room is not possible. On a side note: If I stand in front of the laser for a moment, the obstable is often not disappearing altogether. Most of the time a remnant wil stay in the local map and can block the path.

Here some screenshots of rviz.

First the initial situation, then after setting the correct pose. The last one is while trying a goal in the "top" of the room, where you can see that it gets stuck because of the local costmap that is (incorrectly I think) in the way.

Initial situation

After setting pose

Getting stuck

Finally note that the laser does not has a complete free view, it cannot see to the back of the robot. The front of the robot is the black dot, which actually is the laser. Hopefully this helps


Originally posted by Sietse on ROS Answers with karma: 168 on 2016-02-23

Post score: 0


Original comments

Comment by ahendrix on 2016-02-25:
I don't really understand the situation you're describing. Can you add screenshots of rviz before and after setting the position of the robot?

Comment by Sietse on 2016-02-26:
See the edit above.

Comment by ahendrix on 2016-02-26:
It looks like your local costmap is including obstacles from the static map. Most users don't configure the local map that way.

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

The laser data and the inflated obstacle map are relative to the robot; not to the global map. This is why the laser data and the inflated obstacle map move when you update the position of the robot.

AMCL is a particle filter which tracks the position of the robot relative to the global map. "2D Pose Estimate" tells AMCL to reinitialize the position of the robot with the pose you give it. Updating the pose in AMCL only updates the robot's position with respect to the global map (the laser scans and inflated obstacles remain relative to the robot).

By giving the robot a pose that is offset from the real world, you're giving AMCL incorrect input, and making your robot "lost". AMCL may eventually (by random sampling) figure out the correct position of the robot, but until then it will be rather lost.


Originally posted by ahendrix with karma: 47576 on 2016-02-23

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by Sietse on 2016-02-25:
Thanks. I think I understand this. See my edit above.

$\endgroup$
0
$\begingroup$

Rosanswers logo

Arrrg!! Somehow at some point I did set the value of static_map to true in local_costmap_params.yaml, while it should be false.

Now it is working as advertised, thanks for the help.

I still have the problem that some remnants of temporary objects sometimes remain in the inflated map, but I probably leave that for a next question. I can however remove them using the clear_costmap service.


Originally posted by Sietse with karma: 168 on 2016-02-29

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

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