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

Where to buy


  • 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)

DataFlash logging

The distance to the nearest object in 8 quadrants around the vehicle is recorded in the DataFlash log’s PRX messages.

Real-time distances can be seen in the Mission Planner’s proximity viewer which can be opened by moving to the MP’s Flight Data screen, press Ctrl-F and push the Proximity button.