How can I use RPLIDAR A1 with Pixhawk/Ardupilot?

Hello, all, and I apologize for the crosspost. This message is also posted on a rover sub-board, but I wasn’t sure about the best place to put it. I will delete whichever does not get a response.

I am working on creating a lawnmower rover. I have an RPLIDAR A1M8 because that’s what I can afford at the moment. I know about its limitations in sunlight, but am hoping it will work out at least for proof of concept. It’s wired and spinning, but I didn’t realize until after I had it set up that it’s not compatible with Mission Planner out of the box. I’ve also seen a few threads discussing a modified version of “AP_Proximity_RPLidarA2.cpp” that will allow the A1 to work, but I’m so new to all of this that I don’t know what to do with that information. If anyone is using an A1 successfully, I would really appreciate some direction on how to get it working. Thanks in advance!

OK, I’ve been working on this problem. I built a new version of the firmware to allow for the shorter “welcome message” from the rplidar a1, and I’ve powered the lidar separately from the Pixhawk. I’ve seen some evidence that I’m moving in the right direction, but now I have the problem that Mission Planner cannot connect to the Pixhawk (via USB or WiFi) if the lidar is powered up, or can either see telemetry data from the Pixhawk, or data from the lidar, but not both simultaneously. I have an ESP8266 connected to telem2 for telemetry, and the lidar connected to telem1. I followed setup instructions for the rplidar from the wiki page. Flow control settings don’t seem to make a difference. Any suggestions for how to make the lidar play nicely with the telemetry from the Pixhawk will be appreciated. Thanks!

One additional piece of information. If the LIDAR is powered independently (i.e., no shared ground), then it is never seen by Mission Planner. If I tie the LIDAR’s ground to that of the Pixhawk, I get the situation where I can either see LIDAR data but not telemetry or vice versa (and, Mission Planner will not connect if the LIDAR is powered up in that shared-ground situation).

1 Like

Hi

could you make it work??

Thanks!