← All tools

Message & Error Explainer

What an ArduPilot message means and what to do about it

Українська

A proximity sensor is not sending distances

Stops itRangefinder, optical flow, camera, OSD and other devicesCopter only

What ArduPilot says:

A proximity sensor (a 360° lidar, or rangefinders that look sideways) is enabled with PRXn_TYPE, and ArduPilot gets no distances from it. “No Data”: the driver runs, but nothing valid came within its time limit (0.2 to 0.5 s, by sensor type). “Not Connected”: there is no driver for that sensor: a DroneCAN sensor that has not appeared on the bus, or a slot whose driver did not start while a later one did.

What to do, most likely first

  1. The lidar has no power or is not spinning: on USB alone it is usually off.

    CheckA spinning lidar is easy to see and hear. An RPLidar also announces itself: “RPLidar A2 hw=… fw=…”.

    FixConnect the battery (props off) and give the lidar a 5 V supply that can carry its motor.

  2. A serial lidar is on another UART than the one set to the lidar protocol, or TX and RX are swapped.

    CheckThe port the wires go to must have SERIALn_PROTOCOL 11 (Lidar360); the Board & Wiring Planner shows which pad is which UART.

    FixSet the lidar's port to SERIALn_PROTOCOL 11 with the lidar's baud rate, correct the wiring, reboot.

  3. PRXn_TYPE is 4 (RangeFinder), and no rangefinder that looks sideways or up is giving readings.

    CheckOnly rangefinders with RNGFNDn_ORIENT 0 to 7 (forward, right, back, left and between) or 24 (up) count; one that looks down (25) does not.

    FixSet the orientation of the sideways rangefinders, or fix the rangefinder that is silent.

  4. PRXn_TYPE is 2 (MAVLink) or 14 (DroneCAN), and the companion computer or CAN node is not sending.

    CheckMAVLink distances (DISTANCE_SENSOR or OBSTACLE_DISTANCE) must arrive at least every 0.5 s. A DroneCAN sensor is taken only when its address equals PRXn_ADDR.

    FixStart the sender; for DroneCAN, match PRXn_ADDR to the address the sensor reports.

  5. No proximity sensor is fitted: the parameter is left over.

    FixSet PRXn_TYPE to 0 and reboot.

A serial lidar with no port set to 11 gets no driver at all; if it is the only proximity sensor, nothing is reported and the copter flies without obstacle data. Check that the sensor shows distances in the ground station before relying on avoidance.

Parameters to look at

ParameterWhat it is
PRX1_TYPEProximity type
PRX2_TYPEProximity type
PRX1_ADDRBus address of sensor
RNGFND1_ORIENTRangefinder orientation
SERIAL1_PROTOCOLTelem1 protocol selection
SERIAL2_PROTOCOLTelemetry 2 protocol selection
SERIAL3_PROTOCOLSerial 3 (GPS) protocol selection
SERIAL4_PROTOCOLSerial4 protocol selection
The code that sends it

PRXN: Not Connected

libraries/AP_Proximity/AP_Proximity.cpp AP_Proximity::prearm_healthy() · Open in ArduPilot Copter-4.7.1

PRXN: No Data

libraries/AP_Proximity/AP_Proximity.cpp AP_Proximity::prearm_healthy() · Open in ArduPilot Copter-4.7.1

Written here for Copter 4.6. In the tool you choose your vehicle and version, see your own parameter values beside the ones named here, and drop a flight log to have every message in it explained.

Open it in the Message & Error Explainer