Class Robot24
java.lang.Object
org.firstinspires.ftc.teamcode.fy24.robots.Robot24
Represents a complete robot consisting of up to 5 subsystems.
Basically, constructing this will construct all of the subsystems for you,
which in turn do all of the low-level hardware setup work.
Call methods of subsystems to perform actions. For example, to open the claw:
robot.claw.setState(Claw.State.OPEN);
Or to start driving forward:
robot.drive.applyDTS(new DTS(1, 0, 0));
Programmers who are used to working directly with the SDK to write complete
TeleOps might appreciate turning about 120 lines of boilerplate code and a
different OpMode for each robot into the following line in a single OpMode:
Robot24 robot = new Robot24(RobotRoundhouse.getParamsAuto());
See RobotRoundhouse
to find Robot24.Parameters
to pass in here.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Robot-specific parameters that are not used directly by the Robot but by external things, usually processors.static class
Subsystems are encapsulated in this class, so their Parameters are too. -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal DoubleArm
final Claw
final RRMecanumDrive
final FriendlyIMU
final RotaryIntake
final com.qualcomm.robotcore.hardware.VoltageSensor
-
Constructor Summary
ConstructorsConstructorDescriptionRobot24
(Robot24.Parameters parameters, com.qualcomm.robotcore.hardware.HardwareMap hardwareMap) Returns a new Robot24 containing an instance of each subsystem (or a blank wherever a subsystem is not present). -
Method Summary
Modifier and TypeMethodDescriptionvoid
update()
Call this method in the loop portion of your OpMode.
-
Field Details
-
extendedParameters
-
claw
-
intake
-
imu
-
drive
-
arm
-
voltageSensor
public final com.qualcomm.robotcore.hardware.VoltageSensor voltageSensor
-
-
Constructor Details
-
Robot24
public Robot24(Robot24.Parameters parameters, com.qualcomm.robotcore.hardware.HardwareMap hardwareMap) Returns a new Robot24 containing an instance of each subsystem (or a blank wherever a subsystem is not present). Robot24.Parameters Pass in the hardwareMap provided by your OpMode.
-
-
Method Details
-
update
public void update()Call this method in the loop portion of your OpMode. Remember this; some subsystems will not function at all if you forget!
-