bluerobotics / bluerobotics/BlueOS-Water-Linked-DVL

ArduSub timeouts when rangefinder value > 2.5m

Open
#44 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7
Forks
22
PR merge metrics
No merged PRs in 30d

Description

I have noticed that RFND.Dist values jump between something reasonable and 0 around when the ROV is > ~2.5m away from the seafloor.

When the ROV is close to the seafloor, the driver is sending DISTANCE_SENSOR messages at ~9Hz. Above ~2.5m the rate drops to ~4.5 Hz, so the gap between messages increases to ~220ms. This is easy to spot in the logs.

![image](https://github.com/user-attachments/assets/28f079a9-8684-414e-9a03-c5aadb91f2ca)

What is surprising is that the RNFD.Dist values show periodic 0 values when this happens, which AFAICT only happens if the 500ms timeout is hit.

https://github.com/ArduPilot/ardupilot/blob/ecd9694e47678384b083823c09899d4232c4cfa1/libraries/AP_RangeFinder/AP_RangeFinder_MAVLink.cpp#L79

Example RFND graph:

![image](https://github.com/user-attachments/assets/fbdb280b-b1b0-472b-9a53-a084563e0c8d)

If the DISTANCE_SENSOR messages are arriving every ~250ms, this should never happen. I suspect that some DISTANCE_SENSOR messages are delayed by up to ~250ms, so a 500ms gap appears every ~7.5s. I do not have enough data to pinpoint the source of this delay.

Am I off-track here? Have others seen this behavior?

* Device: A50
* These graphs are a run with from ArduSub 4.6 DEV but I see the same behavior on many other logs from ArduSub 4.5 beta 1

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the linked AP_RangeFinder_MAVLink.cpp timeout logic and compare its 500ms threshold with the attached RFND.Dist and message-rate graphs. Trace DISTANCE_SENSOR timing in the affected ArduSub logs to determine where the delay occurs; done means identifying the cause of the periodic zero values and confirming the behavior across the stated ArduSub versions.

Written by the indexing model from the issue text.

Assessment

Domain
embedded-iot, robotics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.