-
Notifications
You must be signed in to change notification settings - Fork 277
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
Add interface to allow systems to declare parameters #1431
Conversation
317f448
to
7b38dc7
Compare
I've made a prerelease of gz-transport11, so macOS and windows CI is unstable, but Ubuntu will need some extra work for CI to pass. I think this is ready for review |
Signed-off-by: Ivan Santiago Paunovic <[email protected]> Pass ecm as parameter to systems implementing the ConfigureParameters interface Signed-off-by: Ivan Santiago Paunovic <[email protected]> Fix parameter registry namespace Signed-off-by: Ivan Santiago Paunovic <[email protected]> Fixes after rebasing Signed-off-by: Ivan Santiago Paunovic <[email protected]>
f5d91b7
to
817d842
Compare
@scpeters I have rebased the PR.
Yes! |
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
I think there are still some linter issues here. |
Could you share in which job you are seeing the failures? |
For testing gazebosim/gz-sim#1431 Signed-off-by: Steve Peters <[email protected]>
testing against prerelease of ignition-transport11 with #1789 |
Thanks Steve! I think this is ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way you could add any tests for these ? Otherwise looks good.
This needs a (not-prerelease) transport11 release. Is there anything blocking that at this point? |
I think I can add some test, I will try to do that in the following days. |
just the principle of testing with prereleases before we lock in new APIs. I'll open a |
I forgot I had already done that with #1789. The Ubuntu CI is building fine but failing with some test failures |
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
Added one test in 0c8d710. |
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test looks good, but CI is failing with :
/github/workspace/include/ignition/gazebo/System.hh:28:10: fatal error: ignition/transport/parameters/Registry.hh: No such file or directory
#include <ignition/transport/parameters/Registry.hh>
Changes here look good to me, waiting for green CI.
I think this was working with the 11.3.0~pre1 prerelease, but it is not working with the 11.3.0 or 11.3.1 stable releases. Investigating... |
I think gazebosim/gz-transport#374 should fix it, though it will require another release |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A question for @ivanpauno , is this meant to be used by sensors (or their systems) ? Right now for the wheel slip plugin I can understand that there will be only a single system, but in future if some sensor wants to declare parameters, how should the system separate parameters between sensors ?
For e.g., camera 1 and camera 2 want to have different parameters in the rendering sensors system ? Maybe this is not the intended use case.
@osrf-jenkins run tests please |
Codecov Report
@@ Coverage Diff @@
## ign-gazebo6 #1431 +/- ##
===============================================
- Coverage 64.60% 64.59% -0.02%
===============================================
Files 321 321
Lines 26297 26312 +15
===============================================
+ Hits 16989 16995 +6
- Misses 9308 9317 +9
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
there's a few jobs with failing tests, but there are some clean CI jobs as well |
My idea is that the system is responsible of correct naming. gz-sim/src/systems/wheel_slip/WheelSlip.cc Lines 380 to 389 in c7ca5a3
e.g. for cameras it could be:
|
Thanks for the fix @scpeters !!!
I have taken a look to the failing jobs and they seem to have unrelated failures. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
🎉 New feature
Based on gazebosim/gz-transport#305.
Replacement of #1280.
Summary
This PR adds:
ISystemConfigureParameters
):ignition::transport::parameters::ParametersRegistry
(see Add parameters component gz-transport#305) with a namespace/world/<world_name>
that provides the following services:/world/<world_name>/list_parameters
service: List available parameters names and types./world/<world_name>/get_parameter
service: Get the type and value of a parameter./world/<world_name>/set_parameter
service: Set a parameter: parameter name, value and type need to be provided.Summary of what's needed to declare and use a parameter can be seen in the wheel slip demo branch: diff.
Test it
I haven't written automated tests yet, but there's a demo using parameters in the wheel slip plugin:
Steps to run the demo:
fortress
checking out the two branches specified above (I can provide PRs for another version if needed).List available parameters:
Expected output
Get the
systems.wheel_slip.trisphere_cycle1.wheel_front
parameter:Expected output
Set the
systems.wheel_slip.trisphere_cycle1.wheel_front
parameter to a different value:Expected output
Get the
systems.wheel_slip.trisphere_cycle1.wheel_front
parameter again, its value should have changed:Expected output
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.