Obstacle Avoidance using ping2 sonar altimeter and echosounder

Hi @sharath04,

This thread may be worth a read - it’s about the obstacle avoidance functionality built into the ArduPilot autopilot codebase.

Beyond that, our Ping Sonar has multiple software library interfaces available (see the Technical Details), so it’s possible to directly query the sensor with your own code. If you’re also using code to control the vehicle (e.g. controlling it via a script that outputs MAVLink commands) then if the sonar provides a distance estimate your script considers to be “too close” it could then change the movement commands it’s sending to the vehicle.