As mentioned, I purchased Rplidar C1 for multi-rotor obstacle avoidance function, using Pixhawk 6X flight control
I started with Copter4.4 firmware, and after following the documentation Settings, I found that the radar did not start properly, and MissionPlanner reported an error: PRX1: No Data. I was sure that the radar I was using was fine, because it worked properly when I connected it to the official application. When I use the official app to send the start command to make it work, and then connect to the flight control can read the data normally
Then I saw the Rplidar update for Copter 4.5 in Realease Note. In fact, after updating the firmware to 4.5-beta, flight control did start the radar normally, and I could feel a slight vibration when the radar was rotating. But at this point it seems that I can’t read and retrieve the data properly, and I can’t see any red lines in the Promixity UI of MissionPlanner,and errors such as Proximity 263 deg, 0.03m (want > 0.6m) are reported.
I tried to compare the two firmware codes on Github, but did not fully understand them. I felt that the code in the AP_Proximity_RPLidarA2.cpp file for reading data seemed to be the same logic, so it confused me, but I did not have the ability to solve this problem
Below are some of the parameters I used
- SERIAL5_BAUD = 460800 (Because of C1 datasheet)
- SERIAL5_PROTOCOL = 11 (Lidar360)
- PRX1_TYPE = 5 (RPLidarA2)
- BRD_SER5_RTSCTS = 0 (According to document)