Codes probelm with detecting obstacles

Hi!
In this scenario ZAM_Over-1_1, apparently there is a rectangular obstacle in front of the goal (siehe Fig 1). But when i run it and print the number of obstacles in final lanet, it prints always “num_obstacles=0”.
And then i set some breakpoints and debug it on the Pycharm, i found that the return values of function “self.get_obstacles” are just the apex of the rectangle. And accidentally all of the 4 points is over the area of the final lanet a bit. In other words, the final lanet does not contain the 4 points of this obstacle. As a result, the function tells that there is no obstacle in the final lanet, which is totally wrong.
So can you just give me an idea, how i can improve this situation and penalize the path always in final lanet and make it to change the lanet?


Thx

Hi Vegetable,

In this case, you can additionally check whether the center point of the Rectangle is on the final lanelet (see CommonRoad API)