Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
6d983ff
DutchFtcCore
Meikasaurus Nov 14, 2020
bb851c8
Driver opmode en motornamen aangepast
Meikasaurus Nov 14, 2020
0c811a0
FtcRobotController v6.1
CalKestis Dec 9, 2020
d010c1b
Merge pull request #62 from FIRST-Tech-Challenge/20201209-113742-rele…
CalKestis Dec 16, 2020
e11a44a
Fix broken urls in README
CalKestis Dec 22, 2020
5b8d84a
Merge pull request #68 from FIRST-Tech-Challenge/2020.22.12-fix-javad…
CalKestis Dec 22, 2020
6e7dfbf
FtcRobotController v6.2
CalKestis Feb 18, 2021
cd037e0
Merge pull request #105 from FIRST-Tech-Challenge/20210218-074821-rel…
CalKestis Feb 22, 2021
095884f
new code
Meikasaurus Mar 13, 2021
be8f3d2
servo toegevoegd
Meikasaurus Mar 13, 2021
4777f4b
more changes
Meikasaurus Mar 13, 2021
d4bdbe4
Merge pull request #1 from FIRST-Tech-Challenge/master
ghpdohmen Mar 14, 2021
47901d8
enter
Morgan720 Mar 14, 2021
f189f40
gamepad
Meikasaurus Mar 14, 2021
dcf9d5c
error opgelost
Meikasaurus Mar 14, 2021
170e9ad
+ boolean
Meikasaurus Mar 20, 2021
cf31792
boolean
Meikasaurus Mar 20, 2021
a9bc086
servo
Morgan720 Mar 20, 2021
2636881
servo 2.0
Morgan720 Mar 20, 2021
00add56
servo 3.0
Morgan720 Mar 20, 2021
0620d55
shooting system
Meikasaurus Mar 20, 2021
e276659
grote schoonmaak :)
Morgan720 Mar 20, 2021
b99f6ea
servo void gedeelte
Meikasaurus Mar 20, 2021
657be30
servo klaar
Meikasaurus Mar 20, 2021
7df0858
motors goed gezet
Meikasaurus Mar 27, 2021
2e886dc
poging servo update
Meikasaurus Apr 3, 2021
b985fa1
a
Morgan720 Apr 3, 2021
d6cebad
Merge branch 'master' of https://github.com/FTCunits/FtcRobotController
Morgan720 Apr 3, 2021
fac7a4b
Test commit
hackenshaw Apr 3, 2021
e0899e4
.
Meikasaurus Apr 3, 2021
7f3a0ac
code weer werkend
Meikasaurus Apr 10, 2021
2ff3465
terugdraaiende intake
Meikasaurus Apr 10, 2021
de40691
atonomous mode3
Morgan720 Apr 24, 2021
82e962b
Add .idea folder to .gitignore
hackenshaw Apr 27, 2021
3fe230c
Add example navigation and object detection code
hackenshaw Apr 27, 2021
a4ed1ac
always show recognitions in telemetry
hackenshaw May 1, 2021
e3a3f27
wobblegoal dropping system
Meikasaurus Jun 5, 2021
d4e267b
forward -> reverse (wobbleGoal)
Meikasaurus Jun 5, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ captures/

# IntelliJ
*.iml
.idea/
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
Expand Down
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 2 additions & 10 deletions FtcRobotController/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,12 @@ android {
buildConfigField "String", "BUILD_TIME", '"' + (new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ", Locale.ROOT).format(new Date())) + '"'
}

compileSdkVersion 28
compileSdkVersion 29

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}

repositories {
maven { url = "https://dl.bintray.com/first-tech-challenge/ftcsdk/" }

flatDir {
dirs '../libs'
}
}

apply from: 'build.release.gradle'
apply from: '../build.dependencies.gradle'
10 changes: 0 additions & 10 deletions FtcRobotController/build.release.gradle

This file was deleted.

7 changes: 4 additions & 3 deletions FtcRobotController/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.qualcomm.ftcrobotcontroller"
android:versionCode="38"
android:versionName="6.0">
android:versionCode="40"
android:versionName="6.2">

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

Expand All @@ -13,7 +13,8 @@
android:extractNativeLibs="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppThemeRedRC" >
android:theme="@style/AppThemeRedRC"
android:usesCleartextTraffic="true">

<!-- Indicates to the ControlHubUpdater what the latest version of the Control Hub is that this app supports -->
<meta-data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,8 @@ public void runOpMode() {
// If your target is at distance greater than 50 cm (20") you can adjust the magnification value
// to artificially zoom in to the center of image. For best results, the "aspectRatio" argument
// should be set to the value of the images used to create the TensorFlow Object Detection model
// (typically 1.78 or 16/9).

// Uncomment the following line if you want to adjust the magnification and/or the aspect ratio of the input images.
//tfod.setZoom(2.5, 1.78);
// (typically 16/9).
tfod.setZoom(2.5, 16.0/9.0);
}

/** Wait for the game to begin */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,8 @@ public void runOpMode() {
// If your target is at distance greater than 50 cm (20") you can adjust the magnification value
// to artificially zoom in to the center of image. For best results, the "aspectRatio" argument
// should be set to the value of the images used to create the TensorFlow Object Detection model
// (typically 1.78 or 16/9).

// Uncomment the following line if you want to adjust the magnification and/or the aspect ratio of the input images.
//tfod.setZoom(2.5, 1.78);
// (typically 16/9).
tfod.setZoom(2.5, 16.0/9.0);
}

/** Wait for the game to begin */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,8 @@ public void runOpMode() {
// If your target is at distance greater than 50 cm (20") you can adjust the magnification value
// to artificially zoom in to the center of image. For best results, the "aspectRatio" argument
// should be set to the value of the images used to create the TensorFlow Object Detection model
// (typically 1.78 or 16/9).

// Uncomment the following line if you want to adjust the magnification and/or the aspect ratio of the input images.
//tfod.setZoom(2.5, 1.78);
// (typically 16/9).
tfod.setZoom(2.5, 16.0/9.0);
}

/** Wait for the game to begin */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@

import static org.firstinspires.ftc.robotcore.external.navigation.AngleUnit.DEGREES;
import static org.firstinspires.ftc.robotcore.external.navigation.AxesOrder.XYZ;
import static org.firstinspires.ftc.robotcore.external.navigation.AxesOrder.YZX;
import static org.firstinspires.ftc.robotcore.external.navigation.AxesOrder.XZY;
import static org.firstinspires.ftc.robotcore.external.navigation.AxesReference.EXTRINSIC;
import static org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.CameraDirection.BACK;

/**
* This 2020-2021 OpMode illustrates the basics of using the Vuforia localizer to determine
Expand Down Expand Up @@ -89,10 +88,6 @@
@Disabled
public class ConceptVuforiaUltimateGoalNavigationWebcam extends LinearOpMode {

// IMPORTANT: If you are using a USB WebCam, you must select CAMERA_CHOICE = BACK; and PHONE_IS_PORTRAIT = false;
private static final VuforiaLocalizer.CameraDirection CAMERA_CHOICE = BACK;
private static final boolean PHONE_IS_PORTRAIT = false ;

/*
* IMPORTANT: You need to obtain your own license key to use Vuforia. The string below with which
* 'parameters.vuforiaLicenseKey' is initialized is for illustration only, and will not function.
Expand Down Expand Up @@ -140,8 +135,9 @@ public class ConceptVuforiaUltimateGoalNavigationWebcam extends LinearOpMode {

/*
* Configure Vuforia by creating a Parameter object, and passing it to the Vuforia engine.
* We can pass Vuforia the handle to a camera preview resource (on the RC phone);
* We can pass Vuforia the handle to a camera preview resource (on the RC screen);
* If no camera monitor is desired, use the parameter-less constructor instead (commented out below).
* Note: A preview window is required if you want to view the camera stream on the Driver Station Phone.
*/
int cameraMonitorViewId = hardwareMap.appContext.getResources().getIdentifier("cameraMonitorViewId", "id", hardwareMap.appContext.getPackageName());
VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters(cameraMonitorViewId);
Expand Down Expand Up @@ -207,55 +203,46 @@ public class ConceptVuforiaUltimateGoalNavigationWebcam extends LinearOpMode {
.multiplied(Orientation.getRotationMatrix(EXTRINSIC, XYZ, DEGREES, 90, 0, 0)));
frontWallTarget.setLocation(OpenGLMatrix
.translation(-halfField, 0, mmTargetHeight)
.multiplied(Orientation.getRotationMatrix(EXTRINSIC, XYZ, DEGREES, 90, 0 , 90)));
.multiplied(Orientation.getRotationMatrix(EXTRINSIC, XYZ, DEGREES, 90, 0, 90)));

// The tower goal targets are located a quarter field length from the ends of the back perimeter wall.
blueTowerGoalTarget.setLocation(OpenGLMatrix
.translation(halfField, quadField, mmTargetHeight)
.multiplied(Orientation.getRotationMatrix(EXTRINSIC, XYZ, DEGREES, 90, 0 , -90)));
.multiplied(Orientation.getRotationMatrix(EXTRINSIC, XYZ, DEGREES, 90, 0, -90)));
redTowerGoalTarget.setLocation(OpenGLMatrix
.translation(halfField, -quadField, mmTargetHeight)
.multiplied(Orientation.getRotationMatrix(EXTRINSIC, XYZ, DEGREES, 90, 0, -90)));

//
// Create a transformation matrix describing where the phone is on the robot.
//
// NOTE !!!! It's very important that you turn OFF your phone's Auto-Screen-Rotation option.
// Lock it into Portrait for these numbers to work.
//
// Info: The coordinate frame for the robot looks the same as the field.
// The robot's "forward" direction is facing out along X axis, with the LEFT side facing out along the Y axis.
// Z is UP on the robot. This equates to a bearing angle of Zero degrees.
//
// The phone starts out lying flat, with the screen facing Up and with the physical top of the phone
// pointing to the LEFT side of the Robot.
// The two examples below assume that the camera is facing forward out the front of the robot.

// We need to rotate the camera around it's long axis to bring the correct camera forward.
if (CAMERA_CHOICE == BACK) {
phoneYRotate = -90;
} else {
phoneYRotate = 90;
}

// Rotate the phone vertical about the X axis if it's in portrait mode
if (PHONE_IS_PORTRAIT) {
phoneXRotate = 90 ;
}
// For a WebCam, the default starting orientation of the camera is looking UP (pointing in the Z direction),
// with the wide (horizontal) axis of the camera aligned with the X axis, and
// the Narrow (vertical) axis of the camera aligned with the Y axis
//
// But, this example assumes that the camera is actually facing forward out the front of the robot.
// So, the "default" camera position requires two rotations to get it oriented correctly.
// 1) First it must be rotated +90 degrees around the X axis to get it horizontal (it's now facing out the right side of the robot)
// 2) Next it must be be rotated +90 degrees (counter-clockwise) around the Z axis to face forward.
//
// Finally the camera can be translated to its actual mounting position on the robot.
// In this example, it is centered (left to right), but 4" forward of the middle of the robot, and 8" above ground level.

// Next, translate the camera lens to where it is on the robot.
// In this example, it is centered (left to right), but forward of the middle of the robot, and above ground level.
final float CAMERA_FORWARD_DISPLACEMENT = 4.0f * mmPerInch; // eg: Camera is 4 Inches in front of robot-center
final float CAMERA_VERTICAL_DISPLACEMENT = 8.0f * mmPerInch; // eg: Camera is 8 Inches above ground
final float CAMERA_LEFT_DISPLACEMENT = 0; // eg: Camera is ON the robot's center line

OpenGLMatrix robotFromCamera = OpenGLMatrix
OpenGLMatrix cameraLocationOnRobot = OpenGLMatrix
.translation(CAMERA_FORWARD_DISPLACEMENT, CAMERA_LEFT_DISPLACEMENT, CAMERA_VERTICAL_DISPLACEMENT)
.multiplied(Orientation.getRotationMatrix(EXTRINSIC, YZX, DEGREES, phoneYRotate, phoneZRotate, phoneXRotate));
.multiplied(Orientation.getRotationMatrix(EXTRINSIC, XZY, DEGREES, 90, 90, 0));

/** Let all the trackable listeners know where the phone is. */
for (VuforiaTrackable trackable : allTrackables) {
((VuforiaTrackableDefaultListener) trackable.getListener()).setPhoneInformation(robotFromCamera, parameters.cameraDirection);
((VuforiaTrackableDefaultListener) trackable.getListener()).setCameraLocationOnRobot(parameters.cameraName, cameraLocationOnRobot);
}

// WARNING:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
## Caution
No Team-specific code should be placed or modified in this ``.../samples`` folder.

Full or partial Samples should be Copied from here, and then Pasted into
the team's folder, using the Android Studio cut and paste commands.
This automatically changes all file and class names to be consistent.
Samples should be Copied from here, and then Pasted into the team's
[/TeamCode/src/main/java/org/firstinspires/ftc/teamcode](../../../../../../../../../../TeamCode/src/main/java/org/firstinspires/ftc/teamcode)
folder, using the Android Studio cut and paste commands. This automatically changes all file and
class names to be consistent. From there, the sample can be modified to suit the team's needs.

For more detailed instructions see the /teamcode readme.

### Naming of Samples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
import org.firstinspires.ftc.robotcore.internal.network.WifiMuteEvent;
import org.firstinspires.ftc.robotcore.internal.network.WifiMuteStateMachine;
import org.firstinspires.ftc.robotcore.internal.opmode.ClassManager;
import org.firstinspires.ftc.robotcore.internal.system.AppAliveNotifier;
import org.firstinspires.ftc.robotcore.internal.system.AppUtil;
import org.firstinspires.ftc.robotcore.internal.system.Assert;
import org.firstinspires.ftc.robotcore.internal.system.PreferencesHelper;
Expand Down Expand Up @@ -379,6 +380,9 @@ public boolean onMenuItemClick(MenuItem item) {
}

FtcAboutActivity.setBuildTimeFromBuildConfig(BuildConfig.BUILD_TIME);

// check to see if there is a preferred Wi-Fi to use.
checkPreferredChannel();
}

protected UpdateUI createUpdateUI() {
Expand All @@ -400,17 +404,6 @@ protected void onStart() {
super.onStart();
RobotLog.vv(TAG, "onStart()");

// If we're start()ing after a stop(), then shut the old robot down so
// we can refresh it with new state (e.g., with new hw configurations)
shutdownRobot();

updateUIAndRequestRobotSetup();

cfgFileMgr.getActiveConfigAndUpdateUI();

// check to see if there is a preferred Wi-Fi to use.
checkPreferredChannel();

entireScreenLayout.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
Expand Down Expand Up @@ -603,6 +596,9 @@ else if (id == R.id.action_exit_app) {
}
}

// Allow the user to use the Control Hub operating system's UI, instead of relaunching the app
AppAliveNotifier.getInstance().disableAppWatchdogUntilNextAppStart();

//Finally, nuke the VM from orbit
AppUtil.getInstance().exitApplication();

Expand Down Expand Up @@ -653,7 +649,9 @@ protected void onActivityResult(int request, int result, Intent intent) {
// was some historical confusion about launch codes here, so we err safely
if (request == RequestCode.CONFIGURE_ROBOT_CONTROLLER.ordinal() || request == RequestCode.SETTINGS_ROBOT_CONTROLLER.ordinal()) {
// We always do a refresh, whether it was a cancel or an OK, for robustness
shutdownRobot();
cfgFileMgr.getActiveConfigAndUpdateUI();
updateUIAndRequestRobotSetup();
}
}

Expand Down
Loading