-
Notifications
You must be signed in to change notification settings - Fork 420
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
ArticulatedObjects: Enable support for secondary json config files. #1458
Conversation
src/esp/physics/PhysicsManager.cpp
Outdated
// instance. | ||
existingArticulatedObjects_.at(aObjID)->setUserAttributes( | ||
existingArticulatedObjects_.at(aObjID)->mergeUserAttributes( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: calling at(aObjId) is not free. The reference should really be cached between these calls, don't you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Every little bit helps, yeah
src/esp/io/URDFParser.cpp
Outdated
@@ -185,13 +240,13 @@ bool Parser::parseURDF(std::shared_ptr<Model>& urdfModel, | |||
urdfModel->m_links[link->m_name] = link; | |||
} | |||
} else { | |||
ESP_ERROR() << "E - failed to parse link. Aborting parse/load for" | |||
ESP_ERROR() << "Failed to parse link. Aborting parse/load for" | |||
<< filename; | |||
return false; | |||
} | |||
} | |||
if (urdfModel->m_links.size() == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (urdfModel->m_links.size() == 0) { | |
if (urdfModel->m_links.empty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks for cleaning up. 👍
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