-
Notifications
You must be signed in to change notification settings - Fork 40
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
dartsim: Add support for joints in worlds #501
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
azeey
changed the title
Add support for joints in worlds
dartsim: Add support for joints in worlds
Mar 30, 2023
Codecov Report
@@ Coverage Diff @@
## gz-physics6 #501 +/- ##
===============================================
+ Coverage 75.71% 76.16% +0.44%
===============================================
Files 142 142
Lines 7199 7251 +52
===============================================
+ Hits 5451 5523 +72
+ Misses 1748 1728 -20
|
9 tasks
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
marcoag
reviewed
May 4, 2023
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
marcoag
approved these changes
May 17, 2023
traversaro
pushed a commit
to traversaro/ign-physics
that referenced
this pull request
Jun 8, 2023
As of gazebosim/sdformat#1117, SDFormat supports joints under world (//world/joint in xpath). But in gz-physics, Entities such as joints are only available in a Model. To support world joints, instead of creating a new type of entity, we have chosen to implement a scheme where the world behaves like a model via the WorldModelFeature feature. Given a world, `w`, we can do `model = w->GetWorldModel()` to get the model proxy. We can then use any of the APIs supported by the features available in the physics engine, e.g., `model->GetJoint("j1")` where "j1" is a joint directly under <world> in the SDFormat. Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> Co-authored-by: Marco A. Gutierrez <marcogg@marcogg.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
🎉 New feature
Closes #457
Summary
As of gazebosim/sdformat#1117, SDFormat supports joints under world (
//world/joint
in xpath). But in gz-physics, Entities such as joints are only available in a Model. To support world joints, instead of creating a new type of entity, we have chosen to implement a scheme where the world behaves like a model via theWorldModelFeature
feature. Given a world,w
, we can domodel = w->GetWorldModel()
to get the model proxy. We can then use any of the APIs supported by the features available in the physics engine, e.g.,model->GetJoint("j1")
where "j1" is a joint directly under<world>
in the SDFormat.Some refactoring of
Base.hh
has already been split out into #500, so that should be merged first.Test it
Tests have been added to tests
test/common_test/joint_features.cc
andtest/common_test/world_features.cc
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.