Add engine settings to mjmModel.

PiperOrigin-RevId: 608915453
Change-Id: Ic58566d7a9cdb57e25954caec69f595c8c9ee88a
This commit is contained in:
Alessio Quaglino
2024-02-21 02:24:53 -08:00
committed by Copybara-Service
parent a4a621f6e3
commit 7edacd39cd
8 changed files with 70 additions and 56 deletions
+6 -3
View File
@@ -97,11 +97,11 @@ void mjXURDF::Parse(
}
if ((section = FindSubElem(mjc, "option"))) {
mjXReader::Option(section, &model->option);
mjXReader::Option(section, &model->spec.option);
}
if ((section = FindSubElem(mjc, "size"))) {
mjXReader::Size(section, model);
mjXReader::Size(section, &model->spec);
}
}
@@ -109,7 +109,10 @@ void mjXURDF::Parse(
model->spec.degree = false;
// get model name
ReadAttrTxt(root, "name", model->modelname);
std::string modelname;
if (ReadAttrTxt(root, "name", modelname)) {
mjm_setString(model->spec.modelname, modelname.c_str());
}
// find and register all materials
MakeMaterials(root);