Don't write limited and actuatorfrclimited attributes when "true" is not a valid value.

Saved XMLs are filled with
```
<joint type="free" limited="false" actuatorforcelimited="false"/>
```

but since these are hardcoded to "false" at compile time, there is no point in saving them to XML.

PiperOrigin-RevId: 776606516
Change-Id: Iac61c5126231f776077a8c265be732f9215fbfbb
This commit is contained in:
Yuval Tassa
2025-06-27 09:06:36 -07:00
committed by Copybara-Service
parent e80a62c6d5
commit c945247e7c
2 changed files with 9 additions and 3 deletions
+2
View File
@@ -2392,6 +2392,7 @@ int mjCJoint::Compile(void) {
if (type == mjJNT_FREE) {
limited = mjLIMITED_FALSE;
}
// otherwise if limited is auto, check consistency wrt auto-limits
else if (limited == mjLIMITED_AUTO) {
bool hasrange = !(range[0] == 0 && range[1] == 0);
@@ -2423,6 +2424,7 @@ int mjCJoint::Compile(void) {
if (type == mjJNT_FREE || type == mjJNT_BALL) {
actfrclimited = mjLIMITED_FALSE;
}
// otherwise if actfrclimited is auto, check consistency wrt auto-limits
else if (actfrclimited == mjLIMITED_AUTO) {
bool hasrange = !(actfrcrange[0] == 0 && actfrcrange[1] == 0);