We do not claim native support in either stack, and a driver that accepts the frame but misreads the distance field is worse than no driver. Native drivers work only when frame layout, baud rate and timing match one of the shipped protocols; check the driver source first (ArduPilot: https://ardupilot.org/copter/docs/common-rangefinder-landingpage.html, PX4: https://docs.px4.io/main/en/sensor/rangefinders). The LRF22VB streams 4-byte 5C lo hi chk frames at 460800 baud, and we do not claim it matches a shipped flight-stack driver, so do not report a successful bench test as "supported by PX4".
The pattern we recommend for a first integration is a companion computer:
- Read the module on a hardware UART (3.0-3.6 V supply, so power it from a 3.3 V rail, not from a 5 V pin), 460800 baud.
- Validate the frame: header 5C, checksum, and the out-of-range marker 20000.
- Convert millimetres to centimetres for MAVLink (the VB wire unit is millimetres, so divide by 10) and publish DISTANCE_SENSOR (message id 132) with min and max distance, current distance, orientation and your own covariance from logs.
# pymavlink sketch: raw is the 16-bit LRF22VB value in mm
def send(master, t_ms, raw):
if raw == 20000: # out of range marker
return
master.mav.distance_sensor_send(t_ms, 5, 2000, raw // 10,
0, 1, 25, 0) # laser, id 1, pitch 270 (down)
The module range is 0.05-20 m at 90 % reflectivity but only 0.05-10 m at 10 %, so set the flight stack's maximum from your real ground surface, not from the headline number, and remember the flight stack rejects values below its configured minimum. Frame rate can be set from 1 to 200 Hz (5A 0B 02 <divisor> <chk>; 10000 / (divisor + 1)). Do not share the UART with a second reader, bench-test with vibration and motors running, and record the raw log. The full checklist is in the flight-controller integration guide in the docs.
Sources:
ERDI Verified Answer — checked against the datasheet by ERDI Engineering.