Merge pull request #1330 from Balint-H:fix/unity-joint-limits
PiperOrigin-RevId: 598603093 Change-Id: I441631e33e812988694f8eed48c719c6bab86148
This commit is contained in:
@@ -164,7 +164,15 @@ namespace Mujoco {
|
||||
RefFriction.FromMjcf(mjcf, "solreffriction");
|
||||
ImpFriction.FromMjcf(mjcf, "solimpfriction");
|
||||
FrictionLoss = mjcf.GetFloatAttribute("frictionloss", 0.0f);
|
||||
Limited = mjcf.GetBoolAttribute("limited", false);
|
||||
|
||||
bool defaultLimited = false;
|
||||
if ((mjcf.OwnerDocument.GetElementsByTagName("compiler") [0]["compiler"])
|
||||
?.GetBoolAttribute("autolimits", true) ??
|
||||
true) {
|
||||
defaultLimited = mjcf.HasAttribute("range");
|
||||
}
|
||||
|
||||
Limited = mjcf.GetBoolAttribute("limited", defaultLimited);
|
||||
Margin = mjcf.GetFloatAttribute("margin", defaultValue: 0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user