Sonar obstacle avoidance parameters

I have been playing with the sonar avoidance options in steering mode and I had a question about two of the params.

One is the rotation time when an obstacle is spotted and the other is the rotation angle.
How do these work together? I would have expected one or another


Hi Arthur,

(from the rover documentation)

SONAR_TURN_TIME is the amount of time that the steering will deviate when the trigger distance is detected and SONAR_TURN_ANGLE is the angle, in degrees, the steering will make when the trigger distance is detected.

Usually it will turn for 1 second and with 25 degrees per default settings.
You will need both parameters for fine tuning your vehicle and to be able to steer just the right amount needed rather than drive in circles.


Ahh, I follow now.
I was testing it today while the rover was stationary, if I placed an obstacle in front it would rotate to clear the obstruction, in this situation it seemed to rotate on the spot based on the turn time field rather than angle.
I presume when it’s moving forward the two parameters work together.

Are you using acoustic or laser sonar?
During acoustic sonar testing for the 2013 Sparkfun AVC I found that the processing overhead to eliminate false returns and to process which way to turn to avoid an obstacle precluded the use of the acoustic sonar at speeds over 3 meters/sec.

I was testing with a sonar sensor as I had one handy but I haven’t decided what to go with yet.
I am quite tempted by the new time of flight sensors but need to workout whats suported by the older APM2.5 and PX4 boards I have.