Version 2.1.2: Python bindings, OBJ assets support, bugfixes.

PiperOrigin-RevId: 434731612
Change-Id: I0cfda3e7a3d1c72036764986efc252ffa1b8c6b0
This commit is contained in:
Saran Tunyasuvunakool
2022-03-15 14:04:44 +00:00
parent 175d25cd9f
commit 3577e2cf8b
304 changed files with 23906 additions and 1013 deletions
+12 -12
View File
@@ -291,14 +291,14 @@ public struct MjOptionStruct {
}
public XmlElement ToMjcf(XmlElement mjcf) {
mjcf.SetAttribute("impratio", $"{ImpRatio}");
mjcf.SetAttribute("impratio", MjEngineTool.MakeLocaleInvariant($"{ImpRatio}"));
mjcf.SetAttribute("magnetic", $"{Magnetic.x} {Magnetic.y} {Magnetic.z}");
mjcf.SetAttribute("wind", $"{Wind.x} {Wind.y} {Wind.z}");
mjcf.SetAttribute("magnetic", MjEngineTool.MakeLocaleInvariant($"{Magnetic.x} {Magnetic.y} {Magnetic.z}"));
mjcf.SetAttribute("wind", MjEngineTool.MakeLocaleInvariant($"{Wind.x} {Wind.y} {Wind.z}"));
mjcf.SetAttribute("density", $"{Density}");
mjcf.SetAttribute("viscosity", $"{Viscosity}");
mjcf.SetAttribute("o_margin", $"{OverrideMargin}");
mjcf.SetAttribute("density", MjEngineTool.MakeLocaleInvariant($"{Density}"));
mjcf.SetAttribute("viscosity", MjEngineTool.MakeLocaleInvariant($"{Viscosity}"));
mjcf.SetAttribute("o_margin", MjEngineTool.MakeLocaleInvariant($"{OverrideMargin}"));
OverrideSolRef.ToMjcf(mjcf, "o_solref");
OverrideSolImp.ToMjcf(mjcf, "o_solimp");
@@ -309,12 +309,12 @@ public struct MjOptionStruct {
mjcf.SetAttribute("jacobian", Jacobian.ToString());
mjcf.SetAttribute("solver", Solver.ToString());
mjcf.SetAttribute("iterations", $"{Iterations}");
mjcf.SetAttribute("tolerance", $"{Tolerance}");
mjcf.SetAttribute("noslip_iterations", $"{NoSlipIterations}");
mjcf.SetAttribute("noslip_tolerance", $"{NoSlipTolerance}");
mjcf.SetAttribute("mpr_iterations", $"{MprIterations}");
mjcf.SetAttribute("mpr_tolerance", $"{MprTolerance}");
mjcf.SetAttribute("iterations", MjEngineTool.MakeLocaleInvariant($"{Iterations}"));
mjcf.SetAttribute("tolerance", MjEngineTool.MakeLocaleInvariant($"{Tolerance}"));
mjcf.SetAttribute("noslip_iterations", MjEngineTool.MakeLocaleInvariant($"{NoSlipIterations}"));
mjcf.SetAttribute("noslip_tolerance", MjEngineTool.MakeLocaleInvariant($"{NoSlipTolerance}"));
mjcf.SetAttribute("mpr_iterations", MjEngineTool.MakeLocaleInvariant($"{MprIterations}"));
mjcf.SetAttribute("mpr_tolerance", MjEngineTool.MakeLocaleInvariant($"{MprTolerance}"));
var flags = (XmlElement)mjcf.AppendChild(
mjcf.OwnerDocument.CreateElement("flag"));