Correct DC motor derivative calculation and enforce actearly.
PiperOrigin-RevId: 898983657 Change-Id: I008529eacf3e400696d26bd3a52a4cf4c1c12225
This commit is contained in:
committed by
Copybara-Service
parent
bc83c24a4d
commit
c004d144d1
@@ -7238,6 +7238,12 @@ void mjCActuator::Compile(void) {
|
||||
actdim = (dyntype != mjDYN_NONE && dyntype != mjDYN_DCMOTOR);
|
||||
}
|
||||
|
||||
// DC motor always uses actearly
|
||||
if (dyntype == mjDYN_DCMOTOR && !actearly) {
|
||||
throw mjCError(this, "actearly cannot be false for DC motor actuator '%s' (id = %d)",
|
||||
name.c_str(), id);
|
||||
}
|
||||
|
||||
// check muscle parameters
|
||||
for (int i=0; i < 2; i++) {
|
||||
// select gain or bias
|
||||
|
||||
Reference in New Issue
Block a user