Prepare multiple physics engines support #338
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current logic of the vendored
Physics
system allows loading the ign-physics plugin, among other options, by reading thePhysicsEnginePlugin
component. Until now, we just supported DART (the only available "real" physics engine) and we were relying on the fact that it loads it by default.This PR updates our logic to use the
PhysicsEnginePlugin
component. This is in preparation of the upcoming bullet plugin.Note that we do not currently support loading custom ignition physics plugin. This support would mean passing the OS-agnostic name of the plugin, and without introducing new methods, adding a new argument would break APIs (even though, only the ScenarIO Gazebo API, and not the ScenarIO core APIs).
Since there are no third-party plugins yet, let's leave this option to a future PR. If there's interest from downstream, adding a new method would be trivial.
gym-ignition/cpp/scenario/plugins/Physics/Physics.cc
Lines 492 to 521 in 9394833