Preparation for MIMO actuators: split actuator counts: nu (inputs), nactuator (objects), nout (outputs).
An actuator now owns a block of consecutive controls (actuator_ctrladr/ctrlnum, width defined by the actuator type) and a block of consecutive force outputs (actuator_outadr/outnum, width defined by the transmission type). Force outputs are the scalars of actuation space: one force, length, velocity and moment row each. nout = dim(actuator_force) is derived from transmission types; all current types have width 1, so all three counts coincide for every existing model and behavior is bit-exact. Array re-keying: ctrlrange/ctrllimited by nu; forcerange/forcelimited/gear/ acc0/length0/lengthrange and the moment row structure by nout; everything else per actuator. The mjModel actuator block is re-sorted by size key. Layout-breaking, not behavior-breaking: saved .mjb files are invalidated (size list changed) and recompilation is required. PiperOrigin-RevId: 948351772 Change-Id: Icbc196ffa083cb1eaa6f1a3710869c89d8f62540
This commit is contained in:
committed by
Copybara-Service
parent
06f12a9372
commit
d507e92198
@@ -4785,7 +4785,9 @@ EMSCRIPTEN_BINDINGS(mujoco_bindings) {
|
||||
.property("actuator_biasprm", &MjModel::actuator_biasprm)
|
||||
.property("actuator_biastype", &MjModel::actuator_biastype)
|
||||
.property("actuator_cranklength", &MjModel::actuator_cranklength)
|
||||
.property("actuator_ctrladr", &MjModel::actuator_ctrladr)
|
||||
.property("actuator_ctrllimited", &MjModel::actuator_ctrllimited)
|
||||
.property("actuator_ctrlnum", &MjModel::actuator_ctrlnum)
|
||||
.property("actuator_ctrlrange", &MjModel::actuator_ctrlrange)
|
||||
.property("actuator_damping", &MjModel::actuator_damping)
|
||||
.property("actuator_dampingpoly", &MjModel::actuator_dampingpoly)
|
||||
@@ -4802,6 +4804,8 @@ EMSCRIPTEN_BINDINGS(mujoco_bindings) {
|
||||
.property("actuator_historyadr", &MjModel::actuator_historyadr)
|
||||
.property("actuator_length0", &MjModel::actuator_length0)
|
||||
.property("actuator_lengthrange", &MjModel::actuator_lengthrange)
|
||||
.property("actuator_outadr", &MjModel::actuator_outadr)
|
||||
.property("actuator_outnum", &MjModel::actuator_outnum)
|
||||
.property("actuator_plugin", &MjModel::actuator_plugin)
|
||||
.property("actuator_trnid", &MjModel::actuator_trnid)
|
||||
.property("actuator_trntype", &MjModel::actuator_trntype)
|
||||
@@ -5091,6 +5095,7 @@ EMSCRIPTEN_BINDINGS(mujoco_bindings) {
|
||||
.property("nJten", &MjModel::nJten, &MjModel::set_nJten, reference())
|
||||
.property("nM", &MjModel::nM, &MjModel::set_nM, reference())
|
||||
.property("na", &MjModel::na, &MjModel::set_na, reference())
|
||||
.property("nactuator", &MjModel::nactuator, &MjModel::set_nactuator, reference())
|
||||
.property("name_actuatoradr", &MjModel::name_actuatoradr)
|
||||
.property("name_bodyadr", &MjModel::name_bodyadr)
|
||||
.property("name_camadr", &MjModel::name_camadr)
|
||||
@@ -5165,6 +5170,7 @@ EMSCRIPTEN_BINDINGS(mujoco_bindings) {
|
||||
.property("nnumeric", &MjModel::nnumeric, &MjModel::set_nnumeric, reference())
|
||||
.property("nnumericdata", &MjModel::nnumericdata, &MjModel::set_nnumericdata, reference())
|
||||
.property("noct", &MjModel::noct, &MjModel::set_noct, reference())
|
||||
.property("nout", &MjModel::nout, &MjModel::set_nout, reference())
|
||||
.property("npair", &MjModel::npair, &MjModel::set_npair, reference())
|
||||
.property("npaths", &MjModel::npaths, &MjModel::set_npaths, reference())
|
||||
.property("nplugin", &MjModel::nplugin, &MjModel::set_nplugin, reference())
|
||||
|
||||
Reference in New Issue
Block a user