* Creates a new PID (Proportional-Integral-Derivative) controller. * * @param kp - The Proportional gain applied to the instantaneous linear position errors. * This is usually set to a multiple of the inverse of simulation step time * (e.g. `60` if the del
(
kp: number,
ki: number,
kd: number,
axes: PidAxesMask,
)
| 454 | * account when calculating the errors and corrections. |
| 455 | */ |
| 456 | public createPidController( |
| 457 | kp: number, |
| 458 | ki: number, |
| 459 | kd: number, |
| 460 | axes: PidAxesMask, |
| 461 | ): PidController { |
| 462 | let controller = new PidController( |
| 463 | this.integrationParameters, |
| 464 | this.bodies, |
| 465 | kp, |
| 466 | ki, |
| 467 | kd, |
| 468 | axes, |
| 469 | ); |
| 470 | this.pidControllers.add(controller); |
| 471 | return controller; |
| 472 | } |
| 473 | |
| 474 | /** |
| 475 | * Removes a PID controller from this world. |