Obstacle avoidance in Auto mode (mission)

Hey, I’m using 5 Lidars for obstacle avoidance,
4 TFLuna (front, back, right, left)
1 benewake TF03 (down).

Everything works perfectly in loiter mode and the other flight modes. But when I’m sending it on a mission it won’t work.

Am I missing a param that would make it work?

Hello
According to WIKI
https://ardupilot.org/copter/docs/common-simple-object-avoidance.html#simple-object-avoidance-algorithms

Horizontal object avoidance works in AltHold and Loiter modes. Upward object avoidance works in LOITER, ALTHOLD modes only.

So for AUTO , you need to work with advanced avoidance like Bendy Ruler

1 Like

I’m trying to make the drone stop when it recognizes an object to avoid in AUTO mode (Guided, Mission).

The BendyRuler and the DIJKSTRA Obstacle Avoidance algorithms are both not an option, since they are finding paths for the drone to go around or above said object.

You could make a lua script so if anything is detected just switch to loiter mode to get the behavour you want.

You could use a modified version of my depth avoid script to do it, you want essentially the same behavour, stop before it gets into trouble.

Im only checking rangefinder:distance_cm_orient(25) for under the boat but you can add more orientations.