Skip to content

Incorrect descriptor starting bytes #7

Open
jjehl opened this issue May 12, 2017 · 4 comments
Open

Incorrect descriptor starting bytes #7

jjehl opened this issue May 12, 2017 · 4 comments

Comments

@jjehl
Copy link

jjehl commented May 12, 2017

After a iter_scans functions raise an Incorrect descriptor starting bytes.

Probably synchronization issue with the protocol

@newpavlov
Copy link
Member

newpavlov commented May 13, 2017

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.

@jjehl
Copy link
Author

jjehl commented May 15, 2017

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.

@TeamMoscou
Copy link

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.

@Masatoshi
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants