Slamtec / rplidar_sdk

Open source SDK for Slamtec RPLIDAR series products
BSD 2-Clause "Simplified" License
428 stars 261 forks source link

Timing between scans is not consistent #97

Open sms-00 opened 1 year ago

sms-00 commented 1 year ago

I am currently using the A1 RPLIDAR unit.

I am running the SDK version 2.0 from GitHub. It appears to be working well except for one small issue with inconsistent time.

I am running the Ultra_simple routine on my Raspberry Pi 4. I have modified the ultra_simple routine to only show the time between scans and commented out the printf showing the values. No other changes. I have noticed that the timing is not consistent between scans. Every 4th or 5th scan, it takes 250ms to receive a new scan rather than the typical 125miliscond. Why am I seeing this issue?

Times below are in milliseconds: 117 127 134 144 235 - why so long? 132 144 111 125 128 262 - why so long? 140 120 117 137 135 123 255- why so long? Example code.txt

Thanks for your support!

WubinXia commented 1 year ago

There may be thread contention issues causing the data cache to be scanned, please try to improve the priority of the corresponding thread