PX4Rangefinder update quaternion
Solved Problem
Rangefinder library sets orientation but not the quaternion array in the distance_sensor struct. Useful for future collision prevention implementations with 2d rangefinders instead of relying on the obstacle distance array.
Solution
Create a separate method to update the quaternion (to not break backwards compatibility). Reconcile the timestamp of the quaternion update with the actual sample timestamp and compare, if it is a fresh quaternion update include it in the sample update
Changelog Entry
For release notes:
Feature: create method to update quaternion for PX4 Rangefinders
Alternatives
Claudio's implementation: https://github.com/PX4/PX4-Autopilot/commits/SF45-Rangefinder_approach/ Use obstacle distance.
Test coverage
Pixhawk 6c + vl53l1x
Context
Thanks! Waiting for CI!
The new function is not implemented anywhere?
The new function is not implemented anywhere?
Just added the ST LiDAR as an example. A better use case would be the sf45 which Claudio already implemented on his feature branch
This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:
https://discuss.px4.io/t/px4-dev-call-dec-17-2025-team-sync-and-community-q-a/48141/1