So I was setting up my ardurover, and was looking for the minimum distance that my rover would stay from an obstacle, now according to the wiki, OA_MARGIN_MAX is the parameter that defines this, however when looking at the documentation OA_MARGIN_MAX is “object avoidance will ignore objects more than this many meters from vehicle” , but this doesnt make sense to me now, where is the parameter to set how far my drone will stay away from obstacles? why is this here and then we have the lookahead parameter that indicates how far the drone will look for obstacles?
I am currently in the process of updating Path Planning documentation. I must admit the parameter’s are a little confusing, although we try and make it as simple as possible.
OA_MARGIN_MAX -> Vehicle will maintain minimum this much distance(margin) from fence/obstacle. Changing this will change how close the vehicle can get to the obstacle.
OA_LOOKAHEAD or OA_BR_LOOKAHEAD (depending on which version of Rover you are using ) -> Basically tells the software how far ahead it should look at for obstacles. In very vague terms, the vehicle will try and project its location to OA_LOOKAHEAD distance ahead of it in several directions, and see if can find a clear path (with OA_MARGIN_MAX distance away from all obstacles)
Hence both these param’s are very different. Normally I suggest just changing OA_MARGIN_MAX as per your needs
I hope I didnt confuse you too much.
Thank you! You did not confuse me, OA_MARGIN_MAX then its the parameter that indicates how far the drone will stay from obstacles which is much better description that the one in the wiki!. I will test this when weather is better for testing! I wanted to see if I could mantain OA_MARGIN_MAX to a lower value since 5 meters default caused a situation where my drone would basically go in the oposite direction of the obstacle since it was surrounded by obstacles at 4 meters (walls) . Thanks.