My apologies for the confusion earlier. I had some reservations, so I decided to test the Pixhawk 2.4.8 on a rover using the copter firmware, and surprisingly, it worked!
Encouraged by this, I then tested the Pixhawk 6X with the rover firmware, only to encounter the same issue:
Therefore, it appears that the issue does not stem from the Pixhawk hardware version but rather from the differences in the software between the rover and copter firmware.
Firstly, I will investigate whether there is a difference between the Telem2 ports in the rover and copter firmware. Secondly, I will examine the software architecture to understand how the “rover task” and “copter task” access lidar data within the AP_Proximity_RPLidarA2 files.
One of the largest differences between Copter and Rover is that the Rover firmware only runs at 50hz by default while Copter runs at 400hz. It may help to set SCHED_LOOP_RATE to 400 on the Rover.
This may not be enough though because that will increase the main estimation and control loops but it might not increase the speed of everything.
You were right!!
I changed the SCHED_LOOP_RATE value from 50Hz to 400Hz, but that wasn’t enough. So, I also modified the rover.cpp file by changing: #if HAL_PROXIMITY_ENABLED SCHED_TASK_CLASS(AP_Proximity, &rover.g2.proximity, update, 50, 200, 27),
to #if HAL_PROXIMITY_ENABLED SCHED_TASK_CLASS(AP_Proximity, &rover.g2.proximity, update, 200, 50, 36),.
These two changes made the RPLIDARC1 work with the rover firmware.
Now, there surely is a reason why the scheduling values are not the same between the Rover and Copter firmware. And i’m not sure modify scheduling values will resolve the problem because changing scheduling values like this must impact the soft and should create bug elsewhere. Anyway, thanks for your help
Hello, thanks for all the work you guys do. I was glad to see that support was possibly available for RPLidar C1 in copter 4.5. Just wondering if the changes discussed above made it to v4.5.5 (or do I need to compile my own code with the suggested changes)? EDIT: I can see the changes were all added to the latest release. Not sure why I’m still having issues, if anyone can provide any insight, I’d appreciate it, errors detailed below:
I’m currently seeing the message: ‘RPLidar C1 hw:18 fw:1.1’ but then the repeated message: PreArm: PRX1:Not Connected’. The Lidar is spinning up, but I don’t seem to be able to access the range finder window (as shown by the screenshots in previous messages by others).
I found my error, below are the correct settings to enable the LiDAR. (I associated Serial2 with PRX2, and so I didn’t set PRX1 correctly). I still haven’t figured how to pull up that range finder display window that people posted above. (Update: How-to listed below.)
I tried the RPLidar C1 and the Okdo LD06, with the settings shown below. But the quadcopter seems to be unstable when I have the feature enabled (PRX1: set to 5 or 16). When I disable it (PRX1: 0) I regain control of my drone. I’m testing in a large courtyard so there are no obstacle within 3 m all the way around. Not sure if maybe some of the settings are conflicting with each other. Both units seem to be operating ok.
Hello everyone,
I’m using ArduRover with a Pixhawk 2.4.8, and a RPLIDAR C1. I’m having notable issues when trying to use ACRO mode. there seems to be a software issue that when the LiDar is working, ACRO mode is inputting random parameters on throttle (Visualized via PID tuning). When ACRO mode behaves properly, the LiDar is working, but the Pixhawk is recieving incorrect data as per shown in this post. This can be tuned via SCHED_LOOP_RATE, we can make work ACRO mode or the LiDar, but not both.
This issue seems to be similar as the one mentioned by @leadwellworks .
We’ve tuned the A2 library to make it work, by changing the parameters shown in &rover.g2.proximity. I was wondering if anyone has had this issue also, or if it is known by @rmackay9 , as I haven’t found any fix online, or any mentions about the issue at all.