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

[ROS 2] RPLiDAR A1 auto standby not working properly #137

Open
jarkenau opened this issue Oct 5, 2023 · 0 comments
Open

[ROS 2] RPLiDAR A1 auto standby not working properly #137

jarkenau opened this issue Oct 5, 2023 · 0 comments

Comments

@jarkenau
Copy link

jarkenau commented Oct 5, 2023

To my understanding, the code responsible for the auto standby assumes that the motor has been started (e.g a node subscribing to the /scan topic) before it can be stopped. This is because is_scanning must be true before the motor can be automatically stopped.

else if (scan_pub->get_subscription_count() == 0) {
if (is_scanning) {
this->stop();

is_scanning is only set in the start() method
is_scanning = true;

which is only called if auto_standby is disabled or /scan has more than one subscriber
if (scan_pub->get_subscription_count() > 0 && !is_scanning) {
this->start();

if (!auto_standby && !this->start()) {

A possible solution is to simply skip the check when having no subscribers. Due to the LIDAR starting spinning as soon as it gets power.

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