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

Intensity data not being published fix #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

richardw347
Copy link

This PR fixes an issue we've had with the reliability of publishing intensity data. The problem is the is_intensity_supported() function. We've had a few different cases where this function fails for sensors that do support intensity data:

  • If the sensor is reconnecting is_measurement_started_ can sometimes already be set to true so the intensity check won't even be attempted
  • The actual urg_get_distance_intensity can sometimes fail (due to network issues etc)

As the driver only tries this test once it's possible for you to end up with no intensity data being published on a sensor that does support it. We're using the intensity data for mission critical functions on our robot so it's really important it's always present.

I've added this fix which will retry the is_intensity_supported() check a few times (using the error_count and error_limit so it does a fixed number of attempts). We've found this a reliable method to ensure we always have intensity data from our sensors.

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

Successfully merging this pull request may close these issues.

1 participant