-
Notifications
You must be signed in to change notification settings - Fork 26
Add an abstract base to generated parameters structures. #37
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
base: develop
Are you sure you want to change the base?
Conversation
aea32e3 to
9956bf1
Compare
|
Force pushed after a cleaning of this branch history. |
|
Since all tests are declared in the same rostest, they all share the same environment, thus the same param server. |
9956bf1 to
1561f33
Compare
|
Rebased on |
Summary
Parametersobjects.fromParamServerComes in replacement to #35 .
Details
Please consider the following example :
This PR does not change the default behavior while allowing one to use a unique
rosparam_handler::ParameterPtrin a base class and instantiate it to a different parameter type. All functions remain available through the base pointer.The main drawback here is that to access the actual members of the instantiated object one has to cast the pointer to the appropriate type (either statically or dynamically).
See helper functions :
All former tests are passing and a I added one for this new scheme.
Their is also a test-case demonstrating how to test
dynamic_reconfigurecallback withrosparam_handler.This PR also turns
*Parametersinto copyable objects :Please consider this PR as Work In Progress until I add some more tutorial to rosparam_handler_tutorial.