-
Notifications
You must be signed in to change notification settings - Fork 41
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] Fix joint construction errors due to link name duplication or BodyNodes moving to other skeletons #220
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>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
azeey
changed the title
Fix joint construction errors due to link name duplication or BodyNodes moving to other skeletons
[dartsim] Fix joint construction errors due to link name duplication or BodyNodes moving to other skeletons
Mar 4, 2021
adlarkin
reviewed
Mar 10, 2021
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
This was referenced Mar 17, 2021
Merged
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
adlarkin
approved these changes
Mar 19, 2021
Thanks for the review! |
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.
🦟 Bug fix
Summary
This started out as a fix for link name collision error when two links in different models have the same name. b54cd35. However, I also found that when creating joints between links in different models, DART actually moves the BodyNode associated with the child link of the joint from its skeleton to the skeleton of the parent BodyNode. After the BodyNode has been moved,
SDFFeatures::FindBodyNode
was unable to find the child link because it looked for it in the original skeleton.For example,
When
joint1
is created, the linkparent_model::nested_model2::nested_link2
is moved from it's original skeleton,parent_model::nested_model2
toparent_model::nested_model1
. When it's time to createjoint2
, it will look for it's parent linknested_link2
in the skeletonparent_model::nested_model2
, but it will not be found.This PR adds a new map that tracks BodyNodes by their fully qualified name. I encountered the errors when testing with ign-gazebo, so I have added an alternative
LoadWorld
function inSDFFeatures_TEST.cc
that loads an SDFormat world in a piecemeal manner like ign-gazebo.PS: A simpler test would be to load the example world above and check if all the joints have been created. However, since the joints themselves move to a new skeleton, we need more changes in the code for
parentModel->GetJointCount()
to return the correct number. I'll create a separate issue for that.Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge