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

SerialCommS300: more than one packet is buffered, measurements are potentially stale! #10

Open
mertmzk opened this issue Jan 16, 2019 · 3 comments

Comments

@mertmzk
Copy link

mertmzk commented Jan 16, 2019

Hi

When I kill the node using "killall -9 rosmaster" and restart the node it gives above warning and does not read from lidar. I have to reboot the computer to get it working again.

Any suggestion to solve the problem.

Thanks

Mert

@bohlender
Copy link
Owner

Hey Mert,

unfortunately I'm working at a different place now, and don't have access to a S300 anymore. As a result I cannot debug your issue but merely give an educated guess on where to start digging ¯\_(ツ)_/¯

The warning you're getting comes from here and suggests that restarting the node after a hard termination (SIGKILL) does not re-initialise the serial I/O properly - the buffer is still full/in use. It might suffice to replace the current flushing of the device byioctl(fd, TCFLSH, 2);, however there's no way for me to try.

If you manage to identify the issue, I'd be happy to merge your fix.

@mertmzk
Copy link
Author

mertmzk commented Jan 17, 2019

Hi Bohlender,

Thanks for your quick response. I have tried what you suggested but it didnt worked either.

I found a way around to it; just killing the node using "rosnode kill laser" does not produce the warning on the next run.

Thanks

@bohlender
Copy link
Owner

I'm glad to hear that using rosnode kill laser is a workaround. However I'll keep the issue open - it would be nice if someone were to fix it to work as expected even in the case of hard termination.

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

No branches or pull requests

2 participants