Motors FTCLib Docs
Motors FTCLib Docs
Motors
package
com.arcrobotics.ftclib.hardware.motors
Using a RunMode
// in Motor.java
/**
* The RunMode of the motor.
*/
public enum RunMode {
VelocityControl, PositionControl, RawPower
}
m_motor.set(0);
m_motor.setFeedforwardCoefficients(0.92, 0.47,
ffCoeffs = m_motor.getFeedforwardCoefficients(
kA = ffCoeffs[2];
Setting Behaviors
Bulk Reading
// control loop
int cycles = 0;
while (cycles++ < 500) {
double v1 = m1.getVelocity();
double v2 = m2.getVelocity();
/* implementation */
}
CRServo
Th CRServo class is just a motor object intended to
be used for a continuous rotation servo. Its general
purpose is to be used in FTCLib classes that require
a Motor input. It works just like a regular motor,
without any of the encoder stu!.
MotorGroup
A motor group object takes several motors and
runs them in parallel like a single motor. Motor
groups have one leader and a set of followers. For
any group, there must be a leader, but the number
of followers can be zero. This makes creating
di!erent drive profiles simpler. The constructor for a
MotorGroup is as follows:
Previous
Hardware
Next
Gamepad