Fix a bug with PID actuators, when plugin definition order differs from actuator order.

PiperOrigin-RevId: 587729879
Change-Id: If71c7e374f36ef08c5147e7316066d6f5365925f
This commit is contained in:
Nimrod Gileadi
2023-12-04 08:30:41 -08:00
committed by Copybara-Service
parent c0b7b9873d
commit 236dcb4ffd
3 changed files with 13 additions and 9 deletions
+1 -1
View File
@@ -84,7 +84,7 @@ class Pid {
mjtNum integral = 0;
};
// Reads data from d->act and returns it as a State struct.
State GetState(const mjModel* m, mjData* d, int instance) const;
State GetState(const mjModel* m, mjData* d, int actuator_idx) const;
// Returns the PID setpoint, which is normally d->ctrl, but can be d->act for
// actuators with dyntype != none.