Systems in Homeostasis
Throughout the world, systems containing many parts work together to achieve homeostasis; Our robot is no different.
BasicSystem
BasicSystem(Estimator estimator, FeedbackController feedbackController,
FeedforwardController feedforwardController);PositionVelocitySystem
public PositionVelocitySystem(Estimator positionEstimator,
Estimator velocityEstimator,
FeedforwardController feedforward,
FeedbackController positionFeedback,
FeedbackController velocityFeedback);Example systems
Basic Motor Control
PIDCoefficients coefficients = new PIDCoefficients(0.3,0.04,0.01);
DoubleSupplier motorPosition = new DoubleSupplier() {
@Override
public double getAsDouble() {
return exampleMotor.getPosition();
}
};
BasicPID controller = new BasicPID(coefficients);
NoFeedforward feedforward = new NoFeedforward();
RawValue noFilter = new RawValue(motorPosition);
BasicSystem system = new BasicSystem(noFilter,controller,feedforward);
while (true) {
double command = system.update(referencePosition);
}
Full State with PID
Feedforward Only
Last updated
Was this helpful?
