This enumerates to INFRARED according to Mavlink distance sensor specification and causes errors when using MAVROS to publish distance_sensor messages.
I think the enumerator should be 1 for ULTRASOUND enumeration. Setting sensor_type = 1 allows MAVROS to convert the distance_sensor message correctly.
Line 103 of tools/ping1d_mavlink_driver.py:
sensor_type = 2
This enumerates to INFRARED according to Mavlink distance sensor specification and causes errors when using MAVROS to publish distance_sensor messages.
I think the enumerator should be 1 for ULTRASOUND enumeration. Setting
sensor_type = 1
allows MAVROS to convert the distance_sensor message correctly.