Class Robot25
java.lang.Object
org.firstinspires.ftc.teamcode.fy25.robots.Robot25
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:
Robot25 robot = new Robot25(RobotRoundhouse25.getParamsAuto(), hardwareMap);
Or, new this year:
Robot25 robot = RobotRoundhouse25.getRobotAuto(hardwareMap);
See RobotRoundhouse25 to find Robot25.Parameters to pass in here.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRobot-specific parameters that are not used directly by the Robot but by external things, usually processors.static classUsed when a subsystem that accepts multiple implementations of HardwareDevice receives one it doesn't expectstatic classSubsystems are encapsulated in this class, so their Parameters are too. -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal RRMecanumDrivefinal FriendlyIMUfinal LauncherGatefinal LauncherWheelfinal MotorIntakefinal com.qualcomm.robotcore.hardware.VoltageSensor -
Constructor Summary
ConstructorsConstructorDescriptionRobot25(Robot25.Parameters parameters, com.qualcomm.robotcore.hardware.HardwareMap hardwareMap) Returns a new Robot25 Object containing an instance of each subsystem (or a blank wherever a subsystem is not present). -
Method Summary
Modifier and TypeMethodDescriptionvoidupdate()Call this method in the loop portion of your OpMode.
-
Field Details
-
extendedParameters
-
drive
-
imu
-
launchWheel
-
launchGate
-
motorIntake
-
voltageSensor
public final com.qualcomm.robotcore.hardware.VoltageSensor voltageSensor
-
-
Constructor Details
-
Robot25
public Robot25(Robot25.Parameters parameters, com.qualcomm.robotcore.hardware.HardwareMap hardwareMap) throws Robot25.InvalidDeviceClassException Returns a new Robot25 Object containing an instance of each subsystem (or a blank wherever a subsystem is not present). Get these fromRobotRoundhouse25Pass 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!
-