Skip disabled actuators in mjd_actuator_vel.
Fixes a bug where the derivative of the actuator force with respect to the generalized velocities (used in implicit and implicitfast integrators) was failing to take into account disabled actuators. Fixes #1838 PiperOrigin-RevId: 657193960 Change-Id: Id8c0ab863a39e2a01cd2703774f460e9731b4807
This commit is contained in:
committed by
Copybara-Service
parent
3f0749a0f7
commit
a4bd2bec0a
@@ -834,6 +834,11 @@ void mjd_actuator_vel(const mjModel* m, mjData* d) {
|
||||
|
||||
// process actuators
|
||||
for (int i=0; i < m->nu; i++) {
|
||||
// skip if disabled
|
||||
if (mj_actuatorDisabled(m, i)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
mjtNum bias_vel = 0, gain_vel = 0;
|
||||
|
||||
// affine bias
|
||||
|
||||
Reference in New Issue
Block a user