Class CameraFixCheckOpMode
java.lang.Object
com.qualcomm.robotcore.eventloop.opmode.OpMode
com.qualcomm.robotcore.eventloop.opmode.LinearOpMode
com.crossbotics.ftchelper.finders.FinderOpMode
com.crossbotics.ftchelper.finders.CameraFixCheckOpMode
ALPHA. The standing test for the camera fix (
cameraFix(camera) in Robot.java): it finds
turnDegBlue / turnDegRed, the turn from the Limelight's field frame to ours, and shows
where the camera puts the robot, so you can check it against a tape measure. Nothing moves.
Put the robot on the field FACING AWAY from your drivers' wall (heading 0), with tags in view. The screen shows the Limelight's own pose (MegaTag1: x, y and its yaw), the turn that matches the robot's heading, and the robot's place in our frame with that turn. X saves the turn for BLUE, B for RED (stand at the RED wall for that one).
It is not in "Tune and check" (the camera fix is untested, and not for BIOBUZZ). Run it from a file of your own:
@TeleOp(name = "Camera Fix Check", group = "Finders")
public class CameraFixCheck extends CameraFixCheckOpMode {
@Override protected RobotDefinition robot() { return new Robot(); }
}
Docs: docs/modules/odometry.md, "Camera fix (alpha)"-
Field Summary
FieldsModifier and TypeFieldDescriptioncom.qualcomm.robotcore.hardware.Gamepadcom.qualcomm.robotcore.hardware.Gamepadcom.qualcomm.robotcore.hardware.HardwareMapstatic final intintDeprecated.org.firstinspires.ftc.robotcore.external.TelemetryFields inherited from class com.crossbotics.ftchelper.finders.FinderOpMode
results, tFields inherited from class com.qualcomm.robotcore.eventloop.opmode.OpMode
blackboard, msStuckDetectInit, msStuckDetectInitLoop, msStuckDetectLoop, msStuckDetectStart, time -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidBinds gamepad 1 buttons.protected StringThe finder's name, e.g.protected String[]protected voidpause()Stops what moves, while the help page is open (the finder's buttons pause then).final voidprotected abstract RobotDefinitionrobot()The robot in five files:return new Robot();.protected voidsetup()Sets up the hardware, in INIT.protected voidThe finder's own screen lines, every loop.protected voidWhat INIT shows (the controls, a safety note).protected voidstep()Runs once every loop after the buttons: moves things, measures.protected voidstopAll()Stops every motor and servo it moves.Methods inherited from class com.crossbotics.ftchelper.finders.FinderOpMode
batteryMatters, helpKeyDown, inInit, inputsReady, openHelp, runInside, running, runOpModeMethods inherited from class com.qualcomm.robotcore.eventloop.opmode.LinearOpMode
idle, init, init_loop, isStarted, isStopRequested, loop, opModeInInit, opModeIsActive, sleep, start, stop, waitForStartMethods inherited from class com.qualcomm.robotcore.eventloop.opmode.OpMode
getRuntime, internalPostInitLoop, internalPostLoop, internalPreInit, internalUpdateTelemetryNow, resetRuntime, terminateOpModeNow, updateTelemetry
-
Field Details
-
MS_BEFORE_FORCE_STOP_AFTER_STOP_REQUESTED
public static final int MS_BEFORE_FORCE_STOP_AFTER_STOP_REQUESTED- See Also:
-
gamepad1
public volatile com.qualcomm.robotcore.hardware.Gamepad gamepad1 -
gamepad2
public volatile com.qualcomm.robotcore.hardware.Gamepad gamepad2 -
telemetry
public org.firstinspires.ftc.robotcore.external.Telemetry telemetry -
hardwareMap
public volatile com.qualcomm.robotcore.hardware.HardwareMap hardwareMap -
msStuckDetectStop
Deprecated.
-
-
Constructor Details
-
CameraFixCheckOpMode
public CameraFixCheckOpMode()
-
-
Method Details
-
robot
The robot in five files:return new Robot();. -
finderName
Description copied from class:FinderOpModeThe finder's name, e.g. "Servo finder".- Specified by:
finderNamein classFinderOpMode
-
setup
protected void setup()Description copied from class:FinderOpModeSets up the hardware, in INIT. Nothing may move here.- Specified by:
setupin classFinderOpMode
-
showInit
Description copied from class:FinderOpModeWhat INIT shows (the controls, a safety note).- Overrides:
showInitin classFinderOpMode
-
bind
Description copied from class:FinderOpModeBinds gamepad 1 buttons. Actions must be quick: never wait.- Specified by:
bindin classFinderOpMode
-
step
protected void step()Description copied from class:FinderOpModeRuns once every loop after the buttons: moves things, measures. Never waits.- Specified by:
stepin classFinderOpMode
-
show
Description copied from class:FinderOpModeThe finder's own screen lines, every loop.- Specified by:
showin classFinderOpMode
-
helpLines
- Overrides:
helpLinesin classFinderOpMode
-
stopAll
protected void stopAll()Description copied from class:FinderOpModeStops every motor and servo it moves. Called at the end, always.- Specified by:
stopAllin classFinderOpMode
-
pause
protected void pause()Description copied from class:FinderOpModeStops what moves, while the help page is open (the finder's buttons pause then). Default:FinderOpMode.stopAll(). A finder overrides it when stopAll() also closes something (a camera) that must keep working.- Overrides:
pausein classFinderOpMode
-
requestOpModeStop
public final void requestOpModeStop()
-