Open jjehl opened 7 years ago
You need to call stop()
after iter_scans()
. Ideally it should be done automatically when iterator is not used any more. One way to solve it which I knew was to use with ... as
, but I didn't like it much.
However after looking into this problem a bit more, it seems it can be solved elegantly by using "try finally" inside the iterator.
if stop() is always needed, it could better to integrate the function in the iter_scans(). To make your code robust, it should support the eventuality that the users do things that you don't want. I have also problem after a reset() command because my A2 send a response message.
Anyway I work on improvements and I'll send you a first pull request this afternoon, we 'll be able to discuss on this base.
hello, I got the same error while using the iter_measurments() in a for loop. this for loop is used in a thread which is running with two others threads.
HI When you got RPLidarException, you'd better to reconnect. If it does not exceed max retry, make it to connect again. In my case, it works.
After a iter_scans functions raise an Incorrect descriptor starting bytes.
Probably synchronization issue with the protocol