Fix bugs in adhesion default parsing.
- `gain` was not inherited, either from `<adhesion gain>` default or from `<general gainprm>` default. - `dyntype` was not inherited from `<general dyntype>` default. - Reported by @vaxenburg. PiperOrigin-RevId: 480707156 Change-Id: I0160531d48186e7658952e72923ceb6cb034be9b
This commit is contained in:
committed by
Copybara-Service
parent
106a3fc0bb
commit
6e004d7413
@@ -1818,11 +1818,6 @@ void mjXReader::OneActuator(XMLElement* elem, mjCActuator* pact) {
|
||||
|
||||
// adhesion
|
||||
else if (type=="adhesion") {
|
||||
// clear bias, set default gain
|
||||
mjuu_zerovec(pact->biasprm, mjNBIAS);
|
||||
mjuu_zerovec(pact->gainprm, mjNGAIN);
|
||||
pact->gainprm[0] = 1;
|
||||
|
||||
// explicit attributes
|
||||
ReadAttr(elem, "gain", 1, pact->gainprm, text);
|
||||
if (pact->gainprm[0]<0)
|
||||
@@ -1836,7 +1831,6 @@ void mjXReader::OneActuator(XMLElement* elem, mjCActuator* pact) {
|
||||
|
||||
// implied parameters
|
||||
pact->ctrllimited = 1;
|
||||
pact->dyntype = mjDYN_NONE;
|
||||
pact->gaintype = mjGAIN_FIXED;
|
||||
pact->biastype = mjBIAS_NONE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user