Skip to content

Commit f3a5a54

Browse files
authored
Merge pull request #674 from FIRST-Tech-Challenge/20230830-154348-release-candidate
FtcRobotController v9.0
2 parents 660a2f6 + 4de7b1e commit f3a5a54

File tree

75 files changed

+706
-930
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+706
-930
lines changed

FtcRobotController/src/main/AndroidManifest.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:tools="http://schemas.android.com/tools"
4-
android:versionCode="50"
5-
android:versionName="8.2">
4+
android:versionCode="51"
5+
android:versionName="9.0">
66

77
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
88

Binary file not shown.

FtcRobotController/src/main/assets/FTC_2016-17.xml

-9
This file was deleted.
Binary file not shown.

FtcRobotController/src/main/assets/RelicVuMark.xml

-6
This file was deleted.
Binary file not shown.

FtcRobotController/src/main/assets/StonesAndChips.xml

-7
This file was deleted.
Binary file not shown.
Binary file not shown.

FtcRobotController/src/main/assets/UltimateGoal.xml

-10
This file was deleted.

FtcRobotController/src/main/assets/qcar_config.xsd

Whitespace-only changes.

FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/BasicOmniOpMode_Linear.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
import com.qualcomm.robotcore.hardware.DcMotor;
3636
import com.qualcomm.robotcore.util.ElapsedTime;
3737

38-
/**
38+
/*
3939
* This file contains an example of a Linear "OpMode".
4040
* An OpMode is a 'program' that runs in either the autonomous or the teleop period of an FTC match.
4141
* The names of OpModes appear on the menu of the FTC Driver Station.
@@ -60,10 +60,10 @@
6060
* the direction of all 4 motors (see code below).
6161
*
6262
* Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name.
63-
* Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list
63+
* Remove or comment out the @Disabled line to add this OpMode to the Driver Station OpMode list
6464
*/
6565

66-
@TeleOp(name="Basic: Omni Linear OpMode", group="Linear Opmode")
66+
@TeleOp(name="Basic: Omni Linear OpMode", group="Linear OpMode")
6767
@Disabled
6868
public class BasicOmniOpMode_Linear extends LinearOpMode {
6969

FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/BasicOpMode_Iterative.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
import com.qualcomm.robotcore.util.ElapsedTime;
3737
import com.qualcomm.robotcore.util.Range;
3838

39-
/**
39+
/*
4040
* This file contains an example of an iterative (Non-Linear) "OpMode".
4141
* An OpMode is a 'program' that runs in either the autonomous or the teleop period of an FTC match.
4242
* The names of OpModes appear on the menu of the FTC Driver Station.
@@ -47,10 +47,10 @@
4747
* It includes all the skeletal structure that all iterative OpModes contain.
4848
*
4949
* Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name.
50-
* Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list
50+
* Remove or comment out the @Disabled line to add this OpMode to the Driver Station OpMode list
5151
*/
5252

53-
@TeleOp(name="Basic: Iterative OpMode", group="Iterative Opmode")
53+
@TeleOp(name="Basic: Iterative OpMode", group="Iterative OpMode")
5454
@Disabled
5555
public class BasicOpMode_Iterative extends OpMode
5656
{

FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/BasicOpMode_Linear.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@
2929

3030
package org.firstinspires.ftc.robotcontroller.external.samples;
3131

32+
import com.qualcomm.robotcore.eventloop.opmode.Disabled;
3233
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
3334
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
34-
import com.qualcomm.robotcore.eventloop.opmode.Disabled;
3535
import com.qualcomm.robotcore.hardware.DcMotor;
3636
import com.qualcomm.robotcore.util.ElapsedTime;
3737
import com.qualcomm.robotcore.util.Range;
3838

3939

40-
/**
40+
/*
4141
* This file contains an minimal example of a Linear "OpMode". An OpMode is a 'program' that runs in either
4242
* the autonomous or the teleop period of an FTC match. The names of OpModes appear on the menu
4343
* of the FTC Driver Station. When a selection is made from the menu, the corresponding OpMode
@@ -47,10 +47,10 @@
4747
* It includes all the skeletal structure that all linear OpModes contain.
4848
*
4949
* Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name.
50-
* Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list
50+
* Remove or comment out the @Disabled line to add this OpMode to the Driver Station OpMode list
5151
*/
5252

53-
@TeleOp(name="Basic: Linear OpMode", group="Linear Opmode")
53+
@TeleOp(name="Basic: Linear OpMode", group="Linear OpMode")
5454
@Disabled
5555
public class BasicOpMode_Linear extends LinearOpMode {
5656

FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptAprilTag.java

+7-10
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,16 @@
3232
import com.qualcomm.robotcore.eventloop.opmode.Disabled;
3333
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
3434
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
35-
import java.util.List;
36-
import android.util.Size;
3735
import org.firstinspires.ftc.robotcore.external.hardware.camera.BuiltinCameraDirection;
3836
import org.firstinspires.ftc.robotcore.external.hardware.camera.WebcamName;
39-
import org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit;
40-
import org.firstinspires.ftc.robotcore.external.navigation.AngleUnit;
4137
import org.firstinspires.ftc.vision.VisionPortal;
4238
import org.firstinspires.ftc.vision.apriltag.AprilTagDetection;
4339
import org.firstinspires.ftc.vision.apriltag.AprilTagProcessor;
44-
import org.firstinspires.ftc.vision.apriltag.AprilTagGameDatabase;
4540

46-
/**
47-
* This 2023-2024 OpMode illustrates the basics of AprilTag recognition and pose estimation,
41+
import java.util.List;
42+
43+
/*
44+
* This OpMode illustrates the basics of AprilTag recognition and pose estimation,
4845
* including Java Builder structures for specifying Vision parameters.
4946
*
5047
* Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name.
@@ -57,12 +54,12 @@ public class ConceptAprilTag extends LinearOpMode {
5754
private static final boolean USE_WEBCAM = true; // true for webcam, false for phone camera
5855

5956
/**
60-
* {@link #aprilTag} is the variable to store our instance of the AprilTag processor.
57+
* The variable to store our instance of the AprilTag processor.
6158
*/
6259
private AprilTagProcessor aprilTag;
6360

6461
/**
65-
* {@link #visionPortal} is the variable to store our instance of the vision portal.
62+
* The variable to store our instance of the vision portal.
6663
*/
6764
private VisionPortal visionPortal;
6865

@@ -162,7 +159,7 @@ private void initAprilTag() {
162159

163160

164161
/**
165-
* Function to add telemetry about AprilTag detections.
162+
* Add telemetry about AprilTag detections.
166163
*/
167164
private void telemetryAprilTag() {
168165

FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptAprilTagEasy.java

+7-6
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,16 @@
3232
import com.qualcomm.robotcore.eventloop.opmode.Disabled;
3333
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
3434
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
35-
import java.util.List;
3635
import org.firstinspires.ftc.robotcore.external.hardware.camera.BuiltinCameraDirection;
3736
import org.firstinspires.ftc.robotcore.external.hardware.camera.WebcamName;
3837
import org.firstinspires.ftc.vision.VisionPortal;
3938
import org.firstinspires.ftc.vision.apriltag.AprilTagDetection;
4039
import org.firstinspires.ftc.vision.apriltag.AprilTagProcessor;
4140

42-
/**
43-
* This 2023-2024 OpMode illustrates the basics of AprilTag recognition and pose estimation, using
41+
import java.util.List;
42+
43+
/*
44+
* This OpMode illustrates the basics of AprilTag recognition and pose estimation, using
4445
* the easy way.
4546
*
4647
* Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name.
@@ -53,12 +54,12 @@ public class ConceptAprilTagEasy extends LinearOpMode {
5354
private static final boolean USE_WEBCAM = true; // true for webcam, false for phone camera
5455

5556
/**
56-
* {@link #aprilTag} is the variable to store our instance of the AprilTag processor.
57+
* The variable to store our instance of the AprilTag processor.
5758
*/
5859
private AprilTagProcessor aprilTag;
5960

6061
/**
61-
* {@link #visionPortal} is the variable to store our instance of the vision portal.
62+
* The variable to store our instance of the vision portal.
6263
*/
6364
private VisionPortal visionPortal;
6465

@@ -118,7 +119,7 @@ private void initAprilTag() {
118119
} // end method initAprilTag()
119120

120121
/**
121-
* Function to add telemetry about AprilTag detections.
122+
* Add telemetry about AprilTag detections.
122123
*/
123124
private void telemetryAprilTag() {
124125

FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptAprilTagOptimizeExposure.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,17 @@
3333
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
3434
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
3535
import com.qualcomm.robotcore.util.Range;
36-
3736
import org.firstinspires.ftc.robotcore.external.hardware.camera.WebcamName;
3837
import org.firstinspires.ftc.robotcore.external.hardware.camera.controls.ExposureControl;
3938
import org.firstinspires.ftc.robotcore.external.hardware.camera.controls.GainControl;
40-
4139
import org.firstinspires.ftc.vision.VisionPortal;
4240
import org.firstinspires.ftc.vision.apriltag.AprilTagDetection;
4341
import org.firstinspires.ftc.vision.apriltag.AprilTagProcessor;
4442

4543
import java.util.List;
4644
import java.util.concurrent.TimeUnit;
4745

48-
/**
46+
/*
4947
* This OpMode determines the best Exposure for minimizing image motion-blur on a Webcam
5048
* Note that it is not possible to control the exposure for a Phone Camera, so if you are using a Phone for the Robot Controller
5149
* this OpMode/Feature only applies to an externally connected Webcam

FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptAprilTagSwitchableCameras.java

+10-9
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
import com.qualcomm.robotcore.eventloop.opmode.Disabled;
3333
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
3434
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
35-
import java.util.List;
3635
import org.firstinspires.ftc.robotcore.external.ClassFactory;
3736
import org.firstinspires.ftc.robotcore.external.hardware.camera.CameraName;
3837
import org.firstinspires.ftc.robotcore.external.hardware.camera.WebcamName;
@@ -41,8 +40,10 @@
4140
import org.firstinspires.ftc.vision.apriltag.AprilTagDetection;
4241
import org.firstinspires.ftc.vision.apriltag.AprilTagProcessor;
4342

44-
/**
45-
* This 2023-2024 OpMode illustrates the basics of AprilTag recognition and pose estimation, using
43+
import java.util.List;
44+
45+
/*
46+
* This OpMode illustrates the basics of AprilTag recognition and pose estimation, using
4647
* two webcams.
4748
*
4849
* Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name.
@@ -52,20 +53,20 @@
5253
@Disabled
5354
public class ConceptAprilTagSwitchableCameras extends LinearOpMode {
5455

55-
/**
56+
/*
5657
* Variables used for switching cameras.
5758
*/
5859
private WebcamName webcam1, webcam2;
5960
private boolean oldLeftBumper;
6061
private boolean oldRightBumper;
6162

6263
/**
63-
* {@link #aprilTag} is the variable to store our instance of the AprilTag processor.
64+
* The variable to store our instance of the AprilTag processor.
6465
*/
6566
private AprilTagProcessor aprilTag;
6667

6768
/**
68-
* {@link #visionPortal} is the variable to store our instance of the vision portal.
69+
* The variable to store our instance of the vision portal.
6970
*/
7071
private VisionPortal visionPortal;
7172

@@ -130,7 +131,7 @@ private void initAprilTag() {
130131
} // end method initAprilTag()
131132

132133
/**
133-
* Function to add telemetry about camera switching.
134+
* Add telemetry about camera switching.
134135
*/
135136
private void telemetryCameraSwitching() {
136137

@@ -145,7 +146,7 @@ private void telemetryCameraSwitching() {
145146
} // end method telemetryCameraSwitching()
146147

147148
/**
148-
* Function to add telemetry about AprilTag detections.
149+
* Add telemetry about AprilTag detections.
149150
*/
150151
private void telemetryAprilTag() {
151152

@@ -173,7 +174,7 @@ private void telemetryAprilTag() {
173174
} // end method telemetryAprilTag()
174175

175176
/**
176-
* Function to set the active camera according to input from the gamepad.
177+
* Set the active camera according to input from the gamepad.
177178
*/
178179
private void doCameraSwitching() {
179180
if (visionPortal.getCameraState() == CameraState.STREAMING) {

0 commit comments

Comments
 (0)