Skip to content
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

Proper way to reconnect to the lidar after a crash. #86

Open
unrealwill opened this issue Sep 19, 2022 · 0 comments
Open

Proper way to reconnect to the lidar after a crash. #86

unrealwill opened this issue Sep 19, 2022 · 0 comments

Comments

@unrealwill
Copy link

I'm using RPLidar A1 with v1.12.0 sdk.

When my program crash leaving the lidar spinning (in an undefined state), the next time I relaunch my program it fails to connect to the Lidar and hangs.
But if I relaunch it a second time, it works again.

It can be replicated with
./simple_grabber /dev/ttyUSB0 115200
then stopping it with ctrl+c

relaunching then hangs :
./simple_grabber /dev/ttyUSB0 115200

But relaunching a second time works again.
./simple_grabber /dev/ttyUSB0 115200

Is there a way to catch this behavior with code so that it never hangs while connecting ?

Thanks

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

No branches or pull requests

1 participant