What’s the Most Stable Way to Integrate Obstacle Avoidance with ArduPilot on a Rover?

Hi all,
I’m building an autonomous rover based on ArduPilot with a Pixhawk 4, and I want to integrate basic obstacle avoidance using ultrasonic or LiDAR sensors. I’ve read a bit about using companion computers and scripting, but I’m still not sure if the best approach is directly through ArduPilot parameters or via MAVLink control from a Raspberry Pi. Is there a preferred method that offers low latency and reliability, especially for moderate-speed rovers? Bonus if you’ve done something similar and can share your sensor setup or tuning tips.

Here are some references I’ve been checking out:
https://www.theengineeringprojects.com/2021/09/introduction-to-lidar.html

PX4 is a firmware alternative to ArduPilot. It is mostly irrelevant to discussion here.

Pixhawk 4 is hardware that can run both PX4 and ArduPilot (among others).

Here’s the relevant place to start for ArduPilot obstacle avoidance for Rover:

1 Like