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

Will A* in AMCL direct robot into grey area on map

asked 2018-02-12 19:32:02 -0500

Ben12345 gravatar image

I would like to edit the map produced by a SLAM algorithm, to add in no go areas. These areas do not ave a physical barrier. Would greying them out be sufficient to prevent the A* algorithm used by AMCL from directing the robot into them?

If not, how would one accomplish this?

Also, can AMCL make use of .png maps, or does it have to be the default pgm?

Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2018-02-12 22:24:54 -0500

jayess gravatar image

updated 2018-02-13 04:02:21 -0500

I've manually edited maps using GIMP and had great success with keeping planners from making paths through unwanted areas. I used black instead of gray as that corresponds to "very" occupied. From the wiki:

When comparing to the threshold parameters, the occupancy probability of an image pixel is computed as follows: occ = (255 - color_avg) / 255.0, where color_avg is the 8-bit value that results from averaging over all channels, e.g. if the image is 24-bit color, a pixel with the color 0x0a0a0a has a probability of 0.96, which is very occupied. The color 0xeeeeee yields 0.07, which is very unoccupied.

As black is 0x000000 it should yield 100% (or very) occupied. Gray may not result in an area being considered occupied.


Edit:

According to the wiki that I linked to, you can use a PNG instead of PGM, but PNG is not supported on OS X.

As @Procópio stated in the comments

painting the map black will have the side-effect of degrading localization, as the real LIDAR measurements will not match those of the edited map.

edit flag offensive delete link more

Comments

Note that AMCL is not going to be planning any paths for you. It will localize your robot, but not generate any paths.

jayess gravatar image jayess  ( 2018-02-12 22:26:07 -0500 )edit
1

painting the map black will have the side-effect of degrading localization, as the real LIDAR measurements will not match those of the edited map.

Procópio gravatar image Procópio  ( 2018-02-13 03:44:19 -0500 )edit

@Procópio: good point

jayess gravatar image jayess  ( 2018-02-13 04:00:42 -0500 )edit

Yes, i said A* in AMCL. I agree with Procòpio, black denotes a physical barrier tat is not there in the real world and will affect the localisation. Surely the A* used would not direct the robot into unexplored territory?

Ben12345 gravatar image Ben12345  ( 2018-02-13 04:02:50 -0500 )edit

Please do not comment if you do not have anything constructive to add

?

jayess gravatar image jayess  ( 2018-02-13 04:06:00 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2018-02-12 19:32:02 -0500

Seen: 234 times

Last updated: Feb 13 '18