ArticulatedObjects: Enable support for secondary json config files.#1458
Merged
jturner65 merged 7 commits intofacebookresearch:masterfrom Aug 30, 2021
Merged
ArticulatedObjects: Enable support for secondary json config files.#1458jturner65 merged 7 commits intofacebookresearch:masterfrom
jturner65 merged 7 commits intofacebookresearch:masterfrom
Conversation
Skylion007
reviewed
Aug 30, 2021
| // merge articulated object's user-defined attributes, if any exist in scene | ||
| // instance. | ||
| existingArticulatedObjects_.at(aObjID)->setUserAttributes( | ||
| existingArticulatedObjects_.at(aObjID)->mergeUserAttributes( |
Contributor
There was a problem hiding this comment.
Nit: calling at(aObjId) is not free. The reference should really be cached between these calls, don't you think?
Contributor
Author
There was a problem hiding this comment.
Every little bit helps, yeah
Skylion007
approved these changes
Aug 30, 2021
| return false; | ||
| } | ||
| } | ||
| if (urdfModel->m_links.size() == 0) { |
Contributor
There was a problem hiding this comment.
Suggested change
| if (urdfModel->m_links.size() == 0) { | |
| if (urdfModel->m_links.empty()) { |
aclegg3
approved these changes
Aug 30, 2021
Contributor
aclegg3
left a comment
There was a problem hiding this comment.
Looks great, thanks for cleaning up. 👍
This file contains hidden or 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
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.
Motivation and Context
This PR introduces support of Json config files for URDF-based ArticulatedObject models in the URDFParser, which will hold default user-defined attributes (Such as bounding boxes for placements) that apply to all instances of articulated objects built from these models. This PR also removed extraneous markers from error messages that did not match the format of our current message logging in the URDFParser.
To be compatible with this functionality, the json config file holding the user_defined attributes must meet these criteria :
How Has This Been Tested
Locally c++ and python tests.
Types of changes
Checklist