RPLidar A2 360 degree lidar¶
The RPLidar A2 can be used for object avoidance in Copter-3.6 (and higher) and Rover-3.3 (and higher). This page describes how to connect it directly to your flight controller. See separate wiki pages on object avoidance for Copter and Rover for more details on how to setup the avoidance feature.
image courtesy of robotshop.com
- rotation rate: 10hz / 600 RPM
- sample rate: 4000 to 8000 samples/s
- range: 6m to 18m
- resolution: 0.9 degrees
- voltage/current requirement: 5V / 1.5A
Connecting and Configuring¶
The lidar should be mounted horizontally on the top or bottom of the vehicle with the black cable pointing towards the rear of the vehicle. Ensure the sensor’s view is not obstructed by any portion of the vehicle including GPS mast, vehicle legs etc.
The lidar can be connected to the flight controller’s serial input as shown above. If using a Pixhawk/Pixhawk2 Telem1 (aka Serial1) should be used because it is more capable of providing the required 1.5A.
- SERIAL1_PROTOCOL = “11” (“Lidar360”) if using Serial1
- SERIAL1_BAUD = “115” if using Serial1
- PRX_TYPE = “5”
- PRX_ORIENT = “0” if mounted on the top of the vehicle, “1” if mounted upside-down on the bottom of the vehicle.
It may be necessary to turn off flow control if using Telem1 (aka Serial1) or Telem2 (aka Serial2)
- BRD_SER1_RTSCTS = “0” if using Serial1
More details on using this sensor for object avoidance on Copter can be found here.