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

driver: add enabled reconfigure param #243

Merged
merged 1 commit into from
May 21, 2019

Conversation

dandedrick
Copy link
Contributor

This will allow polling to be disabled when the device has been disabled
in some way. Specifically this is interesting when the rpm is set to 0
when not is use. This also adds a mask value for the time_offset so that
it won't be touched if it wasn't reconfigured.

This will allow polling to be disabled when the device has been disabled
in some way. Specifically this is interesting when the rpm is set to 0
when not is use. This also adds a mask value for the time_offset so that
it won't be touched if it wasn't reconfigured.
@JWhitleyWork
Copy link
Contributor

@dandedrick - I'm not a fan of defaulting the time_offset to 1. Can you find a way to do this with a default of 0?

@dandedrick
Copy link
Contributor Author

dandedrick commented May 20, 2019

That's not the default value that's the level value. The default comes after the description and is still set to 0.0. See here: http://wiki.ros.org/dynamic_reconfigure/Tutorials/HowToWriteYourFirstCfgFile . The order of parameters is as follows:

  • name - a string which specifies the name under which this parameter should be stored

  • paramtype - defines the type of value stored, and can be any of int_t, double_t, str_t, or bool_t

  • level - A bitmask which will later be passed to the dynamic reconfigure callback. When the callback is called all of the level values for parameters that have been changed are ORed together and the resulting value is passed to the callback.

  • description - string which describes the parameter

  • default - specifies the default value

  • min - specifies the min value (optional and does not apply to strings and bools)

  • max - specifies the max value (optional and does not apply to strings and bools)|

@JWhitleyWork
Copy link
Contributor

I'm still not quite understanding the use-case for this. You say when the device is disabled in some way - when would you disable the device but still want the driver to run?

@dandedrick
Copy link
Contributor Author

In order to keep from having to constantly stop and restart the driver. In order to save power and wear on the device when it's not actively needed it can have the rpm set to 0 and just quickly be disabled without having to stop the service. Then when it's needed the rpm can be set back to the desired value and the service be continued, rather than going through all the overhead of restarting the service.

@JWhitleyWork JWhitleyWork merged commit fb53a02 into ros-drivers:master May 21, 2019
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.

None yet

2 participants