Handle invalid joint type in URDF conversion. Fixes #317.
PiperOrigin-RevId: 454798685 Change-Id: Ic29a3756e78f8714ed8acc70b10e115c3df46561
This commit is contained in:
committed by
Copybara-Service
parent
8dda269c8a
commit
0e1918782a
@@ -307,6 +307,9 @@ void mjXURDF::Joint(XMLElement* joint_elem) {
|
||||
// get type and name
|
||||
ReadAttrTxt(joint_elem, "type", text, true);
|
||||
jointtype = FindKey(urJoint_map, urJoint_sz, text);
|
||||
if (jointtype < 0) {
|
||||
mjXError(joint_elem, "invalid joint type in URDF joint definition");
|
||||
}
|
||||
ReadAttrTxt(joint_elem, "name", jntname, true);
|
||||
|
||||
// get parent, check
|
||||
|
||||
Reference in New Issue
Block a user