Skip to content

Commit

Permalink
Updated to FTC SDK 9.0.
Browse files Browse the repository at this point in the history
Updated CommonLib.
Updated FtcLib.
Sync'd to latest template files.
  • Loading branch information
trc492 committed Sep 11, 2023
1 parent df47789 commit 11e0fed
Show file tree
Hide file tree
Showing 92 changed files with 1,240 additions and 1,039 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ captures/
.idea/modules.xml
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
.idea/navEditor.xml
# For Mac users
.DS_Store

# Keystore files
# Uncomment the following lines if you do not want to check your keystore files in.
Expand Down
4 changes: 2 additions & 2 deletions FtcRobotController/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:versionCode="50"
android:versionName="8.2">
android:versionCode="51"
android:versionName="9.0">

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

Expand Down
Binary file removed FtcRobotController/src/main/assets/FTC_2016-17.dat
Binary file not shown.
9 changes: 0 additions & 9 deletions FtcRobotController/src/main/assets/FTC_2016-17.xml

This file was deleted.

Binary file removed FtcRobotController/src/main/assets/RelicVuMark.dat
Binary file not shown.
6 changes: 0 additions & 6 deletions FtcRobotController/src/main/assets/RelicVuMark.xml

This file was deleted.

Binary file not shown.
7 changes: 0 additions & 7 deletions FtcRobotController/src/main/assets/StonesAndChips.xml

This file was deleted.

Binary file removed FtcRobotController/src/main/assets/UltimateGoal.dat
Binary file not shown.
Binary file not shown.
10 changes: 0 additions & 10 deletions FtcRobotController/src/main/assets/UltimateGoal.xml

This file was deleted.

Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import com.qualcomm.robotcore.hardware.DcMotor;
import com.qualcomm.robotcore.util.ElapsedTime;

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

@TeleOp(name="Basic: Omni Linear OpMode", group="Linear Opmode")
@TeleOp(name="Basic: Omni Linear OpMode", group="Linear OpMode")
@Disabled
public class BasicOmniOpMode_Linear extends LinearOpMode {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import com.qualcomm.robotcore.util.ElapsedTime;
import com.qualcomm.robotcore.util.Range;

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

@TeleOp(name="Basic: Iterative OpMode", group="Iterative Opmode")
@TeleOp(name="Basic: Iterative OpMode", group="Iterative OpMode")
@Disabled
public class BasicOpMode_Iterative extends OpMode
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@

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

import com.qualcomm.robotcore.eventloop.opmode.Disabled;
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
import com.qualcomm.robotcore.eventloop.opmode.Disabled;
import com.qualcomm.robotcore.hardware.DcMotor;
import com.qualcomm.robotcore.util.ElapsedTime;
import com.qualcomm.robotcore.util.Range;


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

@TeleOp(name="Basic: Linear OpMode", group="Linear Opmode")
@TeleOp(name="Basic: Linear OpMode", group="Linear OpMode")
@Disabled
public class BasicOpMode_Linear extends LinearOpMode {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,16 @@
import com.qualcomm.robotcore.eventloop.opmode.Disabled;
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
import java.util.List;
import android.util.Size;
import org.firstinspires.ftc.robotcore.external.hardware.camera.BuiltinCameraDirection;
import org.firstinspires.ftc.robotcore.external.hardware.camera.WebcamName;
import org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit;
import org.firstinspires.ftc.robotcore.external.navigation.AngleUnit;
import org.firstinspires.ftc.vision.VisionPortal;
import org.firstinspires.ftc.vision.apriltag.AprilTagDetection;
import org.firstinspires.ftc.vision.apriltag.AprilTagProcessor;
import org.firstinspires.ftc.vision.apriltag.AprilTagGameDatabase;

/**
* This 2023-2024 OpMode illustrates the basics of AprilTag recognition and pose estimation,
import java.util.List;

/*
* This OpMode illustrates the basics of AprilTag recognition and pose estimation,
* including Java Builder structures for specifying Vision parameters.
*
* Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name.
Expand All @@ -57,12 +54,12 @@ public class ConceptAprilTag extends LinearOpMode {
private static final boolean USE_WEBCAM = true; // true for webcam, false for phone camera

/**
* {@link #aprilTag} is the variable to store our instance of the AprilTag processor.
* The variable to store our instance of the AprilTag processor.
*/
private AprilTagProcessor aprilTag;

/**
* {@link #visionPortal} is the variable to store our instance of the vision portal.
* The variable to store our instance of the vision portal.
*/
private VisionPortal visionPortal;

Expand Down Expand Up @@ -162,7 +159,7 @@ private void initAprilTag() {


/**
* Function to add telemetry about AprilTag detections.
* Add telemetry about AprilTag detections.
*/
private void telemetryAprilTag() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,16 @@
import com.qualcomm.robotcore.eventloop.opmode.Disabled;
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
import java.util.List;
import org.firstinspires.ftc.robotcore.external.hardware.camera.BuiltinCameraDirection;
import org.firstinspires.ftc.robotcore.external.hardware.camera.WebcamName;
import org.firstinspires.ftc.vision.VisionPortal;
import org.firstinspires.ftc.vision.apriltag.AprilTagDetection;
import org.firstinspires.ftc.vision.apriltag.AprilTagProcessor;

/**
* This 2023-2024 OpMode illustrates the basics of AprilTag recognition and pose estimation, using
import java.util.List;

/*
* This OpMode illustrates the basics of AprilTag recognition and pose estimation, using
* the easy way.
*
* Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name.
Expand All @@ -53,12 +54,12 @@ public class ConceptAprilTagEasy extends LinearOpMode {
private static final boolean USE_WEBCAM = true; // true for webcam, false for phone camera

/**
* {@link #aprilTag} is the variable to store our instance of the AprilTag processor.
* The variable to store our instance of the AprilTag processor.
*/
private AprilTagProcessor aprilTag;

/**
* {@link #visionPortal} is the variable to store our instance of the vision portal.
* The variable to store our instance of the vision portal.
*/
private VisionPortal visionPortal;

Expand Down Expand Up @@ -118,7 +119,7 @@ private void initAprilTag() {
} // end method initAprilTag()

/**
* Function to add telemetry about AprilTag detections.
* Add telemetry about AprilTag detections.
*/
private void telemetryAprilTag() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,17 @@
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
import com.qualcomm.robotcore.util.Range;

import org.firstinspires.ftc.robotcore.external.hardware.camera.WebcamName;
import org.firstinspires.ftc.robotcore.external.hardware.camera.controls.ExposureControl;
import org.firstinspires.ftc.robotcore.external.hardware.camera.controls.GainControl;

import org.firstinspires.ftc.vision.VisionPortal;
import org.firstinspires.ftc.vision.apriltag.AprilTagDetection;
import org.firstinspires.ftc.vision.apriltag.AprilTagProcessor;

import java.util.List;
import java.util.concurrent.TimeUnit;

/**
/*
* This OpMode determines the best Exposure for minimizing image motion-blur on a Webcam
* 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
* this OpMode/Feature only applies to an externally connected Webcam
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import com.qualcomm.robotcore.eventloop.opmode.Disabled;
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
import java.util.List;
import org.firstinspires.ftc.robotcore.external.ClassFactory;
import org.firstinspires.ftc.robotcore.external.hardware.camera.CameraName;
import org.firstinspires.ftc.robotcore.external.hardware.camera.WebcamName;
Expand All @@ -41,8 +40,10 @@
import org.firstinspires.ftc.vision.apriltag.AprilTagDetection;
import org.firstinspires.ftc.vision.apriltag.AprilTagProcessor;

/**
* This 2023-2024 OpMode illustrates the basics of AprilTag recognition and pose estimation, using
import java.util.List;

/*
* This OpMode illustrates the basics of AprilTag recognition and pose estimation, using
* two webcams.
*
* Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name.
Expand All @@ -52,20 +53,20 @@
@Disabled
public class ConceptAprilTagSwitchableCameras extends LinearOpMode {

/**
/*
* Variables used for switching cameras.
*/
private WebcamName webcam1, webcam2;
private boolean oldLeftBumper;
private boolean oldRightBumper;

/**
* {@link #aprilTag} is the variable to store our instance of the AprilTag processor.
* The variable to store our instance of the AprilTag processor.
*/
private AprilTagProcessor aprilTag;

/**
* {@link #visionPortal} is the variable to store our instance of the vision portal.
* The variable to store our instance of the vision portal.
*/
private VisionPortal visionPortal;

Expand Down Expand Up @@ -130,7 +131,7 @@ private void initAprilTag() {
} // end method initAprilTag()

/**
* Function to add telemetry about camera switching.
* Add telemetry about camera switching.
*/
private void telemetryCameraSwitching() {

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

/**
* Function to add telemetry about AprilTag detections.
* Add telemetry about AprilTag detections.
*/
private void telemetryAprilTag() {

Expand Down Expand Up @@ -173,7 +174,7 @@ private void telemetryAprilTag() {
} // end method telemetryAprilTag()

/**
* Function to set the active camera according to input from the gamepad.
* Set the active camera according to input from the gamepad.
*/
private void doCameraSwitching() {
if (visionPortal.getCameraState() == CameraState.STREAMING) {
Expand Down
Loading

0 comments on commit 11e0fed

Please sign in to comment.