ArduPilot / ArduPilot/ardupilot
AP_Proximity_Rangefinder: Repoorting out of range data as obstacles
- Dominant language
- C++
- Stars
- 15.9k
- Forks
- 21.4k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 119
Description
## Bug report
### My configuration
I'm using rangefinder connected to CANNode as a proximity sensor.
CubeOrange parameters:
PRX1_TYPE=4 (Rangefinder)
RNGFND1_TYPE=24 (DroneCAN)
```mermaid
graph LR
FC[CubeOrange] <-->|CAN| CANNode[MatekL431
AP_Periph]<-->|Serial|RF[Lightware LW20/C]
```
When the range finder detects an object, it reports it as an obstacle (normal).
Then when the range finder lost the object, it reports it as "OutOfRange" (RFND.stat = 2 or 3). But the proximity sensor keeps reporting the last seen obstacle.

**Version**
Copter-4.5.7
**Platform**
[ ] All
[ ] AntennaTracker
[X] Copter
[ ] Plane
[ ] Rover
[ ] Submarine
**Hardware type**
CubeOrange
MatekL431 (AP_Periph-1.7.0 MatekL431-Rangefinder)
Lightware LW20/C
**Logs**
[DataFlash log](https://drive.google.com/file/d/169wHvt_wpShQbWbweMFhHThZ1-PgS1lK/view?usp=sharing)
Contributor guide
Research direction
Start with the proximity-sensor handling and the RFND.stat values reported by the rangefinder, then use the linked DataFlash log to follow the transition from a detected object to OutOfRange. Done means the previously reported obstacle is cleared when the rangefinder loses the object, without changing normal obstacle reporting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100