-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid response checksum when attempting to adjust sample rate #120
Comments
Please try upgrading your firmware to the latest ( |
Hmmm. Alright. So the program is hanging sometime after printing "Stopping data capture...". Can you debug the program (or even just add some additional print statements) to tell which call is hanging... ie: on I believe all necessary blocks were added to libsweep, but can you try adding pauses between the different libsweep function calls just in case. This really shouldn't be necessary, but I'm interested to see if it affects the behavior. Try placing an unnecessarily large pause (25-50ms) after any library method such as |
Sorry for the delay, I've been busy with work but finally got to run some more tests tonight. The first set of tests I ran had a very long pause of 2000 milliseconds after I call device->stop_scanning(), see below: SweepLidar.cpp
This change seems to have had a general positive effect, I ran the lidarSetSampleRateUnitTest() seen in Main.cpp above ~30 times and all runs besides two were successful. I never got the "Invalid response checksum" error that I was seeing before, but with the above changes I still had two runs which got hung up in the stop_scanning() function, see console output below:
I also performed tests with 50ms pauses after device->start_scanning() and device->stop_scanning() calls, see below:
This seems to have had a neutral or potentially negative effect, with failures around 1/6 time I run the test function. This includes "Invalid response checksum" errors:
And now sometimes hangs when starting scanning, which I don't think I saw before:
My application is currently single-threaded by the way. Seems like the library may be prematurely exiting the start_scanning() or stop_scanning() functions before they are truly stable/complete. |
Have you ever seen the LED on the face of the device flash red? Can you use the Visualizer desktop application to note the |
Hello,
I'm creating a C++ class that uses the libsweep low level API and also includes some additional error checking and functionality like automatically disabling scanning before attempting to set a new sample rate. I have a unit test that does things like set sample rates, sets sample rates while scanning, and stops scanning. Sometimes my unit tests run as expected and pass, other times it hangs or I get a "Invalid response checksum" error.
Here's the code i'm working with:
SweepLidar.hpp
SweepLidar.cpp
main.cpp
Around 80% of the time, the tests successfully runs with the following output:
Around 20% of the time, the unit test will fail by either hanging when attempting to stop the in-progress scan to adjust the sample rate, or fail by throwing an "Invalid response checksum" error also when attempting to stop an in-progress scan to adjust the sample rate:
sweep firmware version
v1.4
libsweep version + affected bindings
v1.2.3
operating system
Raspbian
Platform/Hardware Setup
USB connection to Raspberry Pi 3B
Description:
The text was updated successfully, but these errors were encountered: