motion-planning / rrt-algorithms

n-dimensional RRT, RRT* (RRT-Star)
MIT License
600 stars 173 forks source link

Safety Distance From Obstacle #28

Closed imamim closed 2 years ago

imamim commented 2 years ago

Hello, thanks for this work, that's a good :)

But I am wondering how can I modify the safe distance to be with obstacles?

SZanlongo commented 2 years ago

If I understand correctly, you are essentially looking for a "buffer" around the actual obstacles to have an additional margin of safety?

If so, the simplest solution would be to artificially inflate the obstacles by some safety margin. For example: subtract some margin X_buff, Y_buff from the upper-left corner of an obstacle, and add X_buff, Y_buff to the lower-right corner.

So if you originally had an obstacle defined by the two points [(0,0), (10,10)], and need a margin of 2, you would end up with points [(-2,-2), (12,12)].

imamim commented 2 years ago

Thank you. Yes, I was wondering if it is possible to interfere with the algorithm for a correct safety distance. But as you said, we can solve the problem with an intervention. Thanks again, have a nice day.