Servo Actuator

Servo Actuator

Servo Actuator is implemented in the TrcServo class in the Framework Library. It abstracts a superset of functionalities of what a servo can do. Some functionalities are supported by the servo natively and others are simulated in software by TrcServo. Note that our Framework Library considers a Continuous Rotation Servo the same as a DC motors and not a servo, therefore, Servo Actuator only supports servos configured as regular servos (refer to Motor Actuator for Continuous Rotation Servos). Since our Framework Library is shared between FTC and FRC, TrcServo is platform independent and provides generic servo functionalities for both FTC and FRC. This allows our subsystem code to work in both FTC and FRC environment. In order for TrcServo to support both FTC and FRC platforms, corresponding FTC and FRC subclasses must extend TrcServo and will provide platform specific accesses to the corresponding servo hardware. For example, FtcServo class in FTC and FrcServo class in FRC. To make it even easier to use, the Framework Library also provide wrapper classes FtcServoActuator and FrcServoActuator that contain code to instantiate and configure the servo hardware for the corresponding platform.

Subsystem Parameters

Subsystem Methods

The following are the most commonly called methods provided by TrcServo which is the object returned by the getActuator method:

Example: Create a Wrist Subsystem for FTC