I have been using the PX4Flow over I2C. Sometimes the PX4Flow will output a ground distance of 0 mm, most of the time this occurs when the actual distance is less than 300 mm (which seems to be the minimum ground distance the PX4Flow will output). The documentation says a negative ground distance should be output when the distance is unknown, but I have only observed non-negative ground distance values. So does 0 mm mean an unknown distance? And can anyone confirm my observations represent normal operation of the sensor?
We are experiencing the same problem with our PX4Flow (with ultrasound sensor option). In our case ground distance is always 0. We have tried to visualize the data with QGroundControl and with ROS, with the sensor directly connected to our PC via USB. When the sensor is attached directly to the Pixhawk via I2C the problem persists.
I just want to share with you all that we solved our problem with messages not publishing the ground distance.
Our px4flow was not ready for sonar since it was not pre-soldered so we followed instructions in this post:
We soldered TTL jumper in the sonar and on the px4flow board we soldered central pad to 5V to power the sonar.
All as shown in the images of that post.