For the complete documentation index, see llms.txt. This page is also available as Markdown.

Velocity Control Mode

Velocity Control uses the PID controller to run the motor at a set speed in RPM (or configured conversion factor units).

It is called in the same way as Position Control:

m_controller.setSetpoint(setPoint, ControlType.kVelocity);

API Docs: setSetpoint

using namespace rev::spark;

m_controller.SetSetpoint(setPoint, SparkBase::ControlType::kVelocity);

API Reference: SetSetpoint

Velocity Loop constants are often of a very low magnitude, so if your mechanism isn't behaving as expected, try decreasing your gains.

Last updated

Was this helpful?