[PX4 Source Code] Various Sensor data publishing methods: difference in Driver Implementation of Ultrasonic and Lidar sensors

Hi guys! My name is Junwoo HWANG. And I’m a PX4 volunteer, and developer(for fun!).

Today, while looking through some driver-side implementation of Sensor data publishing scheme, I learned that PX4 actually has 2 different ways of doing it, for example, in distance-sensor case: Lidar and Ultrasonic Sensor .

So I just wanted to share my findings and some thoughts on it. I was surprised to see that the ‘driver’ level implementations were so different. Because I always thought that drivers side would be dumb, but seems like PX4 has some variations!

I’m sure many developers would’ve known about this driver level difference, but I thought that it would be interesting to get some feedbacks from other developers, on ‘why’ the implementation has been separated between Ultrasonic and Lidar drivers.

Please note, this is not a suggestion or anything, but my writeup about this interesting fact that I learned, I like sharing these findings

Here’s a link for my post: LINK.

TL;DR : My conclusion was that whilst PX4 allocates RangeFinder module class for Lidar, it doesn’t for ultrasonic sensor, so it uses it’s own uORB’s orb_advert_t handle for publishing the data.