diff --git a/src/xml/xml_native_writer.cc b/src/xml/xml_native_writer.cc index 9f7245a4..59728467 100644 --- a/src/xml/xml_native_writer.cc +++ b/src/xml/xml_native_writer.cc @@ -690,7 +690,9 @@ void mjXWriter::Compiler(XMLElement* root) { if (!model->usethread) { WriteAttrTxt(section, "usethread", "false"); } - WriteAttrTxt(section, "exactmeshinertia", FindValue(bool_map, 2, model->exactmeshinertia)); + if (model->exactmeshinertia) { + WriteAttrTxt(section, "exactmeshinertia", "true"); + } }