Allow partial specification of polycoef attribute of equality constraints.

- Usually the user only wants to tweak `polycoef[1]`, after this change `"0 2"` is equivalent to `"0 2 0 0 0"`.
- Also improve documentation of this attribute.
- Tighten margins of documentation display equations.

PiperOrigin-RevId: 639720742
Change-Id: Ibafa0e093cebe1c1c75bf2e47ff3bd2ad7619414
This commit is contained in:
Yuval Tassa
2024-06-03 03:41:58 -07:00
committed by Copybara-Service
parent 14a3ce5ffa
commit 8fa0fea02d
4 changed files with 58 additions and 8 deletions
+2 -2
View File
@@ -1884,13 +1884,13 @@ void mjXReader::OneEquality(XMLElement* elem, mjsEquality* pequality) {
case mjEQ_JOINT:
ReadAttrTxt(elem, "joint1", name1, true);
ReadAttrTxt(elem, "joint2", name2);
ReadAttr(elem, "polycoef", 5, pequality->data, text);
ReadAttr(elem, "polycoef", 5, pequality->data, text, false, false);
break;
case mjEQ_TENDON:
ReadAttrTxt(elem, "tendon1", name1, true);
ReadAttrTxt(elem, "tendon2", name2);
ReadAttr(elem, "polycoef", 5, pequality->data, text);
ReadAttr(elem, "polycoef", 5, pequality->data, text, false, false);
break;
case mjEQ_FLEX: