ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
(This is too long for a comment, so I had to put it into a new answer)
To elaborate on solution 1:
This really depends on how you want to define/detect the "impassable" areas. So the idea is to create a node which subscribes to the current laser scan readings, and then modifies it to suit your needs, e.g. "shorten" the beams on the sides of the robot to create a virtual wall and republish it under a new topic.
You would feed only the original laser scan to AMCL, so your localization is would not be affected at all. In the costmap configuration file you would then subscribe only to the modified laser scan data. The problem you might run into is that the robot then of course constantly thinks that there is an obstacle so it cannot drive through there, even though it might be the only path.
Thus, the tricky part would be to decide, when to modify the laser readings and when to leave them untouched, i.e. you would need an algorithm or lookup table that can decide if the region is unsafe or free to pass.
So to sum up, solution 2 is the quick and dirty, but also easy solution. If you have the map anyway and do not want the robot to drive through certain parts, close them with dotted lines in the static map. Otherwise, you need some kind of decision algorithm that you use to create the virtual walls for the laser scanner modification.