@rbxts/pid
v1.1.0
Published
A PID module based on sleitnick's RbxUtil PID module.
Readme
A PID module based on sleitnick's RbxUtil PID module.
Supported datatypes:
- number
- Vector3
- Vector2
Usage
const pid = new Pid(
kp,
ki,
kd,
min, // optional
max, // optional
);
const output = pid.Calculate(setpoint, processVariable, deltaTime);
// destroy the PID (only neccessary when calling `pid.Debug(name)`)
pid.Destroy();Debugging
Calling pid.Debug(name) will open up an iris window that you can use to debug the PID. Keep in mind that when using pid.Debug(name), you will have to destroy the PID after you're done using it.
