gz-sim
gz-sim copied to clipboard
Consolidate entity creation.
🎉 New feature
Summary
I'm slowly splitting up #1669. This PR breaks out the consolidation of entity creation into a separate PR. The LevelManager had entity creation logic, which mimicked (mostly) the functionality in SdfEntityCreator.
The SdfEntityCreator now contains the logic to create entities, and the level manager's logic has been removed. The SimulationRunner loads the level manager, plugins, and calls SdfEntityCreator::CreateEntities
.
Notes
- Requires a new release of SDF13 (https://github.com/gazebosim/sdformat/pull/1436).
- The
LogicalAudioSensorPlugin
andPosePublisher
systems usedtopicFromScopedName
withfalse
for the_excludeWorld
parameter. Prior to this PR, this result was a model scoped name (/mode/blah). This was because the model wasn't attached to the world when the plugin'sConfigure
function was called. With this PR, the model is now properly attached. In order to maintain the expected behavior, I've changed thefalse
totrue
when using thetopicFromScopedName
function. - The
Wind
plugin was loaded by the LevelManager. I've propagated this to SdfEntityCreator. I don't think this should effect simulation behavior.
Test it
The tests should pass.
Checklist
- [x] Signed all commits for DCO
- [x] Added tests
- [ ] Added example and/or tutorial
- [x] Updated documentation (as needed)
- [ ] Updated migration guide (as needed)
- [ ] Consider updating Python bindings (if the library has them)
- [x]
codecheck
passed (See contributing) - [x] 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.