Function
compute_pd_control
(target_angles, current_angles, current_velocities, Kp, Kd)
Source from the content-addressed store, hash-verified
| 6 | |
| 7 | |
| 8 | def compute_pd_control(target_angles, current_angles, current_velocities, Kp, Kd): |
| 9 | error = target_angles - current_angles |
| 10 | error_derivative = -current_velocities |
| 11 | control_output = Kp * error + Kd * error_derivative |
| 12 | return control_output |
| 13 | |
| 14 | |
| 15 | def apply_reduced(self, act: jp.ndarray, qp_p: QP, qp_c: QP) -> Tuple[P, P]: |
Tested by
no test coverage detected