Add urdf file extension case to mj_parse.
fixes #3004 PiperOrigin-RevId: 855249634 Change-Id: I6c21d0ada4fe482059f64e96d413796f5c1c66ce
This commit is contained in:
committed by
Copybara-Service
parent
013268c283
commit
7e45bbb51c
@@ -72,7 +72,9 @@ mjSpec* mj_parse(const char* filename, const char* content_type,
|
||||
|
||||
// early exit for existing XML workflow
|
||||
auto filepath = mujoco::user::FilePath(filename);
|
||||
if (filepath.Ext() == ".xml" || (content_type && std::strcmp(content_type, "text/xml") == 0)) {
|
||||
if (filepath.Ext() == ".xml" ||
|
||||
filepath.Ext() == ".urdf" ||
|
||||
(content_type && std::strcmp(content_type, "text/xml") == 0)) {
|
||||
return mj_parseXML(filename, vfs, error, error_sz);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user