Clear mjData.actuator_moment more selectively.
PiperOrigin-RevId: 566324919 Change-Id: Ie453f8de059d39fa1ebd5248f33a18758ee748af
This commit is contained in:
committed by
Copybara-Service
parent
6ca8a7bdf7
commit
812e617fe9
@@ -1487,6 +1487,9 @@ static void _resetData(const mjModel* m, mjData* d, unsigned char debug_value) {
|
||||
mju_zero(d->mocap_pos, 3*m->nmocap);
|
||||
mju_zero(d->mocap_quat, 4*m->nmocap);
|
||||
|
||||
// zero out actuator_moment, mj_transmission touches it selectively
|
||||
mju_zero(d->actuator_moment, m->nv*m->nu);
|
||||
|
||||
// copy qpos0 from model
|
||||
if (m->qpos0) {
|
||||
memcpy(d->qpos, m->qpos0, m->nq*sizeof(mjtNum));
|
||||
|
||||
Reference in New Issue
Block a user