Remove control plugin API.
This is a rollback of f937ffd93326b2964e33689b0dc6024124776a9e. PiperOrigin-RevId: 507456400 Change-Id: I2026510e6065eb440c0c899fcc5a2cc8ff5afd49
This commit is contained in:
committed by
Copybara-Service
parent
dc3a900809
commit
9a7f4a768a
@@ -775,30 +775,9 @@ void mj_forwardSkip(const mjModel* m, mjData* d, int skipstage, int skipsensor)
|
||||
}
|
||||
|
||||
// acceleration-dependent
|
||||
if (!mjDISABLED(mjDSBL_ACTUATION)) {
|
||||
// call legacy control callback if specified
|
||||
if (mjcb_control) {
|
||||
mjcb_control(m, d);
|
||||
}
|
||||
|
||||
// handle control plugins
|
||||
if (m->nplugin) {
|
||||
const int nslot = mjp_pluginCount();
|
||||
for (int i=0; i<m->nplugin; i++) {
|
||||
const int slot = m->plugin[i];
|
||||
const mjpPlugin* plugin = mjp_getPluginAtSlotUnsafe(slot, nslot);
|
||||
if (!plugin) {
|
||||
mju_error_i("invalid plugin slot: %d", slot);
|
||||
}
|
||||
if (plugin->capabilityflags & mjPLUGIN_CONTROL) {
|
||||
if (!plugin->compute) {
|
||||
mju_error_i("`compute` is a null function pointer for plugin at slot %d", slot);
|
||||
}
|
||||
plugin->compute(m, d, i, mjPLUGIN_CONTROL);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (mjcb_control && !mjDISABLED(mjDSBL_ACTUATION)) {
|
||||
mjcb_control(m, d);
|
||||
}
|
||||
|
||||
mj_fwdActuation(m, d);
|
||||
mj_fwdAcceleration(m, d);
|
||||
|
||||
Reference in New Issue
Block a user