RangeFinders Setup Overview¶
There are many different kinds of rangefinders: Lidar (using laser or infra-red light to measure distance), Sonar (using ultrasonic sound), and Radar (using microwave RF). Some are analog, producing pulses whose timing represent the distance to an object, others are digital sending data streams over serial to UARTs, or I2C, or even via UAVCAN.
RangeFinders (Sonar or Lidar) can be used for Object Avoidance in Copter-3.5 (and higher) in Loiter and AltHold modes and in Rover-3.5 (and higher). As well as altitude sensors for precision landing in Plane and Copter
Object Avoidance features are new and should be used with caution.
Up to 10 Rangefinders can be used in the system (1 thru A). Object Avoidance can use a single 360 degree Lidar, or up to 9 unidirectional rangefinders: 8 arranged in a circle covering 45 degree wide segments, plus an upward facing rangefinder. And a downward facing rangefinder used for low altitude height above ground measurements.
Connecting and Configuring the Rangefinder¶
- Follow the instructions for each type of rangefinder described in its linked page on Rangefinders (landing page).
- Set the RNGFNDx_ORIENT parameters (i.e. RNGFND1_ORIENT, RNGFND2_ORIENT, etc.) to specify the direction each range finder is pointing in.
..note:: Note that if the type of rangefinder is set or changed, a reboot will be required.
- For Copter and Rover, up to 8 rangefinders may placed around the vehicle to provide 360 degree coverage, or a single 360 degree Lidar. But only one forward facing rangefinder is required for Object Avoidance .
- Exclusion zones are provided for 360 degree Lidars, since these may have obstructions in their field of view. Exclusion zones are set via the PRX_IGN_ANGx and PRX_IGN_WIDx parameters, specifying a direction and width the frame obstruction presents and will be ignored. Up to 6 exclusion sectors can be specified.
- If a rangefinder is oriented facing up, then it will be used in the Simple Object Avoidance operation as an upwards sensing proximity sensor in Copter LOITER, ALTHOLD, and POSHOLD modes.
- If a rangefinder is oriented facing down, it will be used to for height above ground measurements when within its range for increased landing precision in Copter, and in Plane autolandings if RNGFND_LANDING is enabled. In Copter, when landing and within 10m of the ground according to the range finder, the vehicle will slow its descent to the LAND_SPEED (which defaults to 50cm/s). In Plane, see the “using a rangefinder” section of Automatic Landing
- If using a rangefinder for altitude measurements, be sure to read this page:
Only downward facing rangefinders are supported in Plane currently.