Feature Request - Multiple Distance Sensors

I am working on a project that will utilize multiple distance sensors on a drone in arbitrary directions to aid in positioning. For example, when flying next to a building, the drone will stay a set distance away from the walls. I am currently looking into working on this and would appreciate some developer support. Specifically on the multiple instance messaging and flight task.

The distancesensor.msg uorb message needs to be updated to support multiple. Then each distance sensor driver needs to be updated to publishmulti. Same with the uavcan rangefinder subscriber.

Then a new parameter will need to be made that indicates which distance sensor is in which orientation.

Then a new flight task position mode will need to be made that uses the side facing distance sensors to center itself in a room. Handling the edge cases will be difficult.

This is slightly relevant.

The easiest way to do this without modifying the distance sensor drivers or message file is through mavlink offboard messages: obstacle distance rangefinders

The other limitation is that if you want some form of collision prevention, it can only be done currently via multicopter position control. If you need another flight mode, such as mission, obstacle avoidance might be worth a look but it has not been updated in a while: obstacle avoidance

However, both of these methods require offboard compute. You could modify a lot of the code like Alex mentioned, if you need FMU to manage the distance sensors

@dirksavage88
We were able to get collision avoidance with one sensor. But using obstacle_distance message, we get an error from QGC on collision avoidance. Do you know if there is development in collision avoidance in modes besides missions?

@Caleb_Rievley were you able to do this? If so, did you end up using a companion computer or were you able to create a new flight task position mode?

Thank you. I appreciate you for this.