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

Add a flexible mechanism to combine user and default plugins #2497

Merged
merged 18 commits into from
Aug 29, 2024

Conversation

azeey
Copy link
Contributor

@azeey azeey commented Jul 26, 2024

🎉 New feature

Closes #796

Summary

Implementation based on #796 (comment)

TODO:

  • Cleanup
  • Tests

Test it

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

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.

🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸

@azeey azeey requested review from jennuine and mjcarroll as code owners July 26, 2024 00:51
@github-actions github-actions bot added the 🏛️ ionic Gazebo Ionic label Jul 26, 2024
@azeey azeey marked this pull request as draft July 26, 2024 00:55
Signed-off-by: Addisu Z. Taddese <[email protected]>
@azeey azeey added the beta Targeting beta release of upcoming collection label Jul 29, 2024
@azeey azeey added the Breaking change Breaks API, ABI or behavior. Must target unstable version. label Aug 20, 2024
@azeey azeey marked this pull request as ready for review August 28, 2024 21:55
@azeey azeey requested a review from mabelzhang as a code owner August 28, 2024 21:55
azeey added 2 commits August 28, 2024 16:56
Signed-off-by: Addisu Z. Taddese <[email protected]>
Signed-off-by: Addisu Z. Taddese <[email protected]>
@azeey
Copy link
Contributor Author

azeey commented Aug 28, 2024

@iche033 Based on your suggestion, I've simplified the various options available.

  • For Server plugins, I've removed all of the options and plugins are simply appended to the list. The user can then used the <gz:system_priority> to configure the order the plugins.
  • For GUI plugins, since the order of plugins is important but there is no mechanism similar to <gz:system_priority>, I've implemented the following behavior:
    • If the a plugin from the SDF also exists in the default configuration, the plugin from SDF will replace the one in the default configuration at the position/order of the plugin in the default configuration.
    • Otherwise, it's appended to the end

src/SimulationRunner.cc Outdated Show resolved Hide resolved
tutorials/gui_config.md Outdated Show resolved Hide resolved
examples/worlds/camera_sensor.sdf Outdated Show resolved Hide resolved
tutorials/gui_config.md Show resolved Hide resolved
tutorials/server_config.md Outdated Show resolved Hide resolved
Copy link
Contributor

@iche033 iche033 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good. Works as expected.

originally I was testing with separate <gz:policies> blocks for include_server_config_plugins and include_gui_default_plugins, and was wondering why one of them didn't have an effect. But then realized that only one <gz:policies> can be present in the sdf file. Nothing needs to be done on this, just noting down for reference.

@iche033
Copy link
Contributor

iche033 commented Aug 29, 2024

this test failure looks related:

/Users/jenkins/jenkins-agent/workspace/gz_sim-ci-pr_any-homebrew-amd64/gz-sim/src/Server_TEST.cc:514
Expected equality of these values:
  2u
    Which is: 2
  *server.SystemCount()
    Which is: 5
    ```

Signed-off-by: Ian Chen <[email protected]>
@iche033
Copy link
Contributor

iche033 commented Aug 29, 2024

this test failure looks related:

/Users/jenkins/jenkins-agent/workspace/gz_sim-ci-pr_any-homebrew-amd64/gz-sim/src/Server_TEST.cc:514
Expected equality of these values:
  2u
    Which is: 2
  *server.SystemCount()
    Which is: 5
    ```

my understanding is that an increase in no. of systems is expected due to behavior change. I increased the expected system count to fix the test, in the same way it was done to fix other Server tests.
a0c23f2

@azeey
Copy link
Contributor Author

azeey commented Aug 29, 2024

this test failure looks related:

/Users/jenkins/jenkins-agent/workspace/gz_sim-ci-pr_any-homebrew-amd64/gz-sim/src/Server_TEST.cc:514
Expected equality of these values:
  2u
    Which is: 2
  *server.SystemCount()
    Which is: 5
    ```

my understanding is that an increase in no. of systems is expected due to behavior change. I increased the expected system count to fix the test, in the same way it was done to fix other Server tests. a0c23f2

INTEGRATION_multiple_severs failed because we were loading the physics systems, but the test explicitly does not want it as indicated by TestWorldSansPhysics. My guess is that by including physics, it gets loaded twice and we run into #18

@iche033
Copy link
Contributor

iche033 commented Aug 29, 2024

gz_sim-ci-pr_any-noble-amd64 picked up many new warnings - looks like they are false positives from the new console log msgs. I'm going to merge this since all tests are passing but we should ticket an issue on this

@iche033 iche033 merged commit a893657 into gazebosim:main Aug 29, 2024
8 of 9 checks passed
@azeey azeey deleted the config_loading branch August 29, 2024 06:04
@iche033
Copy link
Contributor

iche033 commented Aug 29, 2024

gz_sim-ci-pr_any-noble-amd64 picked up many new warnings - looks like they are false positives from the new console log msgs. I'm going to merge this since all tests are passing but we should ticket an issue on this

#2555

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta Targeting beta release of upcoming collection Breaking change Breaks API, ABI or behavior. Must target unstable version. 🏛️ ionic Gazebo Ionic
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants