Pre arm error when no obstacles detected on the ground

hi @rmackay9 @rishabsingh3003
i running AC 4.3.x on V5+ Flight controller with benewake RDS01C CAN protocol RADAR for obstacles avoidance sensor.
my settings are below:
sensor connected on CAN 1 port.
CAN1_PROTOCOL = 11(Benewake CAN)
CAN1_BITRATE = 50K
CAN P1_DRIVER = 1

RNGFND1_TYPE = 34
RNGFND1_MIN_CM = 50
RNGFND1_MAX_CM = 1500( sensor can read up to 20m)
RNGFND1_RECEIVE_ID = 1852

PRX1_TYRE = 4

AVOID_MARGIN = 5
AVOID _ENABLE = 3
AVOID _BEHAVE = 1( stop)

i have tested sensor working well on the ground
when the drone kept on the field and there was no physical obstacles was there Infront of the sensor so obviously Proximity window does not show any obstacles but still i am very confident that sensor is working fine .but mission planner giving me the error that PREARM: PRX1 NO DATA .

when i placed obstacles by my self by stand the person Infront of the drone the prearm error goes away and i can able to arm the drone Normally.
here is the videos which showing clearly.

some times during flying also i keep getting Bad Proximity at the same time when i see the Proximity window there was no Obstacles and yes visually no obstacles.

similarly when getting data in the ground i keep getting message that PRX1 NO DATA even i am getting data from the sensor.


.why randomly am getting this messages.

please i have tried different firmware and obstacles sensor too but still similar issues.

@rmackay9 can you please have a look at this and help me.

@kalai1219 can I get a log for this?
By the way, some radars don’t output any signal in a static environment. Example: NRA24 by NanoRadar. We will need to investigate if that is the case for RDS01C by monitoring the raw CAN packets coming from the radar when you are getting that error.


Here is the CAN radar output when there are no obstacles infront of it.

@kalai1219 thanks. I think we need to setup some time when you can forward your mavlink telemetry to me and we would need to debug what’s happening.
This is looking something similar to what happens with the NRA24.

I have reported this to benewake OEM also they saying that this is ardupilot driver issue .i have raised issue regarding this on GitHub too Benewake RDS01C CAN Radar Prearm:PRX1 No Data when no obstacles · Issue #24120 · ArduPilot/ardupilot · GitHub

Please tell me what you need from my side to debug this issue.i am ready to help.

@rishabsingh3003

Any update this issue ?

@kalai1219 To fix this problem, firmware modifications are required.

Yes I know it there should be need firmware modifications but I don’t know how to do that. That’s the reason I just seeking help from @rmackay9 @rishabsingh3003

https://github.com/ArduPilot/ardupilot/issues/24120
check this.

You just need to comment out return statement.
libraries/AP_RangeFinder/AP_RangeFinder_Benewake_CAN.cpp
in AP_RangeFinder_Benewake_CAN::handle_frame_H30(AP_HAL::CANFrame &frame)

if (target1_cm == 0) {
    // no target gives 0
    //return false; **//Comment out this return statement**
}

i can understand but how to add this line and it shows read only file and after added this line i have to compile the code for CUAV X7+ FC for the complete firmware right.
i don’t know how to do these procedures.