Add interface to allow systems to declare parameters#1431
Add interface to allow systems to declare parameters#1431scpeters merged 4 commits intoign-gazebo6from
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 <ivanpauno@ekumenlabs.com> Pass ecm as parameter to systems implementing the ConfigureParameters interface Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com> Fix parameter registry namespace Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com> Fixes after rebasing Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
f5d91b7 to
817d842
Compare
|
@scpeters I have rebased the PR.
Yes! |
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
|
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 <scpeters@openrobotics.org>
|
testing against prerelease of ignition-transport11 with #1789 |
|
Thanks Steve! I think this is ready for review. |
adityapande-1995
left a comment
There was a problem hiding this comment.
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 <ivanpauno@ekumenlabs.com>
Added one test in 0c8d710. |
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
There was a problem hiding this comment.
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 |
adityapande-1995
left a comment
There was a problem hiding this comment.
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. |
🎉 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_parametersservice: List available parameters names and types./world/<world_name>/get_parameterservice: Get the type and value of a parameter./world/<world_name>/set_parameterservice: 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:
fortresschecking 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_frontparameter:Expected output
Set the
systems.wheel_slip.trisphere_cycle1.wheel_frontparameter to a different value:Expected output
Get the
systems.wheel_slip.trisphere_cycle1.wheel_frontparameter again, its value should have changed:Expected output
Checklist
codecheckpassed (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-bymessages.