Runtime disabling of actuators according to group.
Added `option-actuatorgroupdisable` attribute and associated `mjOption.disableactuator` integer bitfield, used to disable sets of actuators at runtime according to their group. - The first 6 actuator groups are toggleable in the `simulate` viewer. - Minor refactor and cleanup of actuator documentation. https://youtu.be/H9qG9Zf2W44 Fixes #1092. PiperOrigin-RevId: 578335600 Change-Id: I4cf663b90ea768e4380acfa2fe3b8c15c7cbb568
This commit is contained in:
committed by
Copybara-Service
parent
45878b7eef
commit
893c404230
@@ -1784,7 +1784,15 @@ void mj_local2Global(mjData* d, mjtNum xpos[3], mjtNum xmat[9],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// return 1 if actuator i is disabled, 0 otherwise
|
||||
int mj_actuatorDisabled(const mjModel* m, int i) {
|
||||
int group = m->actuator_group[i];
|
||||
if (group < 0 || group > 30) {
|
||||
return 0;
|
||||
} else {
|
||||
return m->opt.disableactuator & (1 << group) ? 1 : 0;
|
||||
}
|
||||
}
|
||||
|
||||
// sum all body masses
|
||||
mjtNum mj_getTotalmass(const mjModel* m) {
|
||||
|
||||
Reference in New Issue
Block a user