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