# Class PidController

A controller for controlling dynamic bodies using the Proportional-Integral-Derivative correction model.

- Defined in control/pid_controller.d.ts:32

#####
Index

### Constructors

constructor

### Properties

bodies
params
raw

### Methods

angularCorrection
applyAngularCorrection
applyLinearCorrection
free
linearCorrection
resetIntegrals
setAxes
setKd
setKi
setKp

## Constructors

### constructor

- new PidController(params, bodies, kp, ki, kd, axes): PidController

- #### Parameters

  - params: IntegrationParameters
  - bodies: RigidBodySet
  - kp: number
  - ki: number
  - kd: number
  - axes: PidAxesMask

  #### Returns PidController

  - Defined in control/pid_controller.d.ts:36

## Properties

### `Private` bodies

bodies: any

- Defined in control/pid_controller.d.ts:35

### `Private` params

params: any

- Defined in control/pid_controller.d.ts:34

### `Private` raw

raw: any

- Defined in control/pid_controller.d.ts:33

## Methods

### angularCorrection

- angularCorrection(body, targetRotation, targetAngVel): number

- #### Parameters

  - body: RigidBody
  - targetRotation: number
  - targetAngVel: number

  #### Returns number

  - Defined in control/pid_controller.d.ts:47

### applyAngularCorrection

- applyAngularCorrection(body, targetRotation, targetAngVel): void

- #### Parameters

  - body: RigidBody
  - targetRotation: number
  - targetAngVel: number

  #### Returns void

  - Defined in control/pid_controller.d.ts:45

### applyLinearCorrection

- applyLinearCorrection(body, targetPosition, targetLinvel): void

- #### Parameters

  - body: RigidBody
  - targetPosition: Vector
  - targetLinvel: Vector

  #### Returns void

  - Defined in control/pid_controller.d.ts:44

### free

- free(): void
- `Internal`

  #### Returns void

  - Defined in control/pid_controller.d.ts:38

### linearCorrection

- linearCorrection(body, targetPosition, targetLinvel): Vector

- #### Parameters

  - body: RigidBody
  - targetPosition: Vector
  - targetLinvel: Vector

  #### Returns Vector

  - Defined in control/pid_controller.d.ts:46

### resetIntegrals

- resetIntegrals(): void

- #### Returns void

  - Defined in control/pid_controller.d.ts:43

### setAxes

- setAxes(axes): void

- #### Parameters

  - axes: PidAxesMask

  #### Returns void

  - Defined in control/pid_controller.d.ts:42

### setKd

- setKd(kd, axes): void

- #### Parameters

  - kd: number
  - axes: PidAxesMask

  #### Returns void

  - Defined in control/pid_controller.d.ts:41

### setKi

- setKi(ki, axes): void

- #### Parameters

  - ki: number
  - axes: PidAxesMask

  #### Returns void

  - Defined in control/pid_controller.d.ts:40

### setKp

- setKp(kp, axes): void

- #### Parameters

  - kp: number
  - axes: PidAxesMask

  #### Returns void

  - Defined in control/pid_controller.d.ts:39