8 Commits
v6.0 ... v6.2

Author SHA1 Message Date
cd037e0e74 Merge pull request #105 from FIRST-Tech-Challenge/20210218-074821-release-candidate
FtcRobotController v6.2
2021-02-22 13:17:09 -08:00
6e7dfbfb8b FtcRobotController v6.2 2021-02-18 09:48:51 -08:00
5b8d84a3cd Merge pull request #68 from FIRST-Tech-Challenge/2020.22.12-fix-javadoc-url
Fix broken urls in README
2020-12-22 15:41:55 -08:00
e11a44a356 Fix broken urls in README 2020-12-22 15:40:05 -08:00
d010c1b0fc Merge pull request #62 from FIRST-Tech-Challenge/20201209-113742-release-candidate
FtcRobotController v6.1
2020-12-16 08:38:17 -08:00
0c811a081a FtcRobotController v6.1 2020-12-09 12:01:36 -08:00
09359bbaaf Merge pull request #7 from FIRST-Tech-Challenge/missing-gradlew
Missing gradle wrappers
2020-09-25 09:47:41 -07:00
314c6500d9 Missing gradle wrappers 2020-09-25 08:38:16 -07:00
17 changed files with 466 additions and 120 deletions

View File

@ -13,7 +13,7 @@ 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
@ -21,12 +21,4 @@ android {
}
}
repositories {
maven { url = "https://dl.bintray.com/first-tech-challenge/ftcsdk/" }
flatDir {
dirs '../libs'
}
}
apply from: 'build.release.gradle'
apply from: '../build.dependencies.gradle'

View File

@ -1,10 +0,0 @@
dependencies {
implementation 'org.firstinspires.ftc:Inspection:6.0.1'
implementation 'org.firstinspires.ftc:Blocks:6.0.1'
implementation 'org.firstinspires.ftc:RobotCore:6.0.1'
implementation 'org.firstinspires.ftc:RobotServer:6.0.1'
implementation 'org.firstinspires.ftc:OnBotJava:6.0.1'
implementation 'org.firstinspires.ftc:Hardware:6.0.1'
implementation 'org.firstinspires.ftc:FtcCommon:6.0.1'
implementation 'androidx.appcompat:appcompat:1.2.0'
}

View File

@ -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" />
@ -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

View File

@ -102,10 +102,8 @@ public class ConceptTensorFlowObjectDetection extends LinearOpMode {
// 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 */

View File

@ -111,10 +111,8 @@ public class ConceptTensorFlowObjectDetectionSwitchableCameras extends LinearOpM
// 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 */

View File

@ -102,10 +102,8 @@ public class ConceptTensorFlowObjectDetectionWebcam extends LinearOpMode {
// 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 */

View File

@ -48,9 +48,8 @@ import java.util.List;
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
@ -89,10 +88,6 @@ import static org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocaliz
@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.
@ -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);
@ -207,12 +203,12 @@ 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)));
@ -220,42 +216,33 @@ public class ConceptVuforiaUltimateGoalNavigationWebcam extends LinearOpMode {
//
// 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.
// 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.
// 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 ;
}
// 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:

View File

@ -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

View File

@ -112,6 +112,7 @@ import org.firstinspires.ftc.robotcore.internal.network.WifiDirectChannelChanger
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;
@ -379,6 +380,9 @@ public class FtcRobotControllerActivity extends Activity
}
FtcAboutActivity.setBuildTimeFromBuildConfig(BuildConfig.BUILD_TIME);
// check to see if there is a preferred Wi-Fi to use.
checkPreferredChannel();
}
protected UpdateUI createUpdateUI() {
@ -400,17 +404,6 @@ public class FtcRobotControllerActivity extends Activity
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) {
@ -603,6 +596,9 @@ public class FtcRobotControllerActivity extends Activity
}
}
// 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();
@ -653,7 +649,9 @@ public class FtcRobotControllerActivity extends Activity
// 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();
}
}

View File

@ -2,7 +2,7 @@
This repository contains the public FTC SDK for the Ultimate Goal (2020-2021) competition season.
Formerly this software project was hosted [here](https://github.com/FIRST-Tech-Challenge/Skystone). Teams who are competing in the Ultimate Goal Challenge should use this new [FtcRobotController repository](https://github.com/FIRST-Tech-Challenge/FtcRobotController) instead of last season's (no longer updated) Skystone repository.
Formerly this software project was hosted [here](https://github.com/FIRST-Tech-Challenge/Skystone). Teams who are competing in the Ultimate Goal Challenge should use this [new FtcRobotController repository](https://github.com/FIRST-Tech-Challenge/FtcRobotController) instead of last season's (no longer updated) Skystone repository.
## Welcome!
This GitHub repository contains the source code that is used to build an Android app to control a *FIRST* Tech Challenge competition robot. To use this SDK, download/clone the entire project to your local computer.
@ -25,51 +25,103 @@ If you are an Android Studio programmer, there are several ways to download this
* You can also download the project folder (as a .zip or .tar.gz archive file) from the Downloads subsection of the [Releases](https://github.com/FIRST-Tech-Challenge/FtcRobotController/releases) page for this repository.
Once you have downloaded and uncompressed (if needed) your folder, you can use Android Studio to import the project ("Import project (Eclipse ADT, Gradle, etc.)").
* The Releases page also contains prebuilt APKs.
Once you have downloaded and uncompressed (if needed) your folder, you can use Android Studio to import the folder ("Import project (Eclipse ADT, Gradle, etc.)").
## Getting Help
### User Documentation and Tutorials
*FIRST* maintains documentation with information and tutorials on how to use the *FIRST* Tech Challenge software and robot control system. You can access this documentation using the following link:
*FIRST* maintains online documentation with information and tutorials on how to use the *FIRST* Tech Challenge software and robot control system. You can access this documentation using the following link:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[FtcRobotController Documentation](https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[FtcRobotController Online Documentation](https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki)
Note that the documentation is an "evergreen" document that is constantly being updated and edited. It contains the most current information about the *FIRST* Tech Challenge software and control system.
Note that the online documentation is an "evergreen" document that is constantly being updated and edited. It contains the most current information about the *FIRST* Tech Challenge software and control system.
### Javadoc Reference Material
The Javadoc reference documentation for the FTC SDK is now available online at https://first-tech-challenge.github.io/FtcRobotController.
The Javadoc reference documentation for the FTC SDK is now available online. Click on the following link to view the FTC SDK Javadoc documentation as a live website:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[FTC Javadoc Documentation](https://first-tech-challenge.github.io/FtcRobotController)
Documentation is no longer distributed with the repository itself. See the wiki referenced above for tutorials or the javadoc reference for API documentation.
Prebuilt APK's are available on the releases page.
### Online User Forum
For technical questions regarding the Control System or the FTC SDK, please visit the FTC Technology forum:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[FTC Technology Forum](https://ftcforum.usfirst.org/forumdisplay.php?156-FTC-Technology)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[FTC Technology Forum](https://ftcforum.firstinspires.org/forum/ftc-technology)
### Sample OpModes
This project contains a large selection of Sample OpModes (robot code examples) which can be cut and pasted into your /teamcode folder to be used as-is, or modified to suit your team's needs.
Samples Folder: &nbsp;&nbsp; [/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples](FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples)
The readme.md file located in the [/TeamCode/src/main/java/org/firstinspires/ftc/teamcode](TeamCode/src/main/java/org/firstinspires/ftc/teamcode) folder contains an explanation of the sample naming convention, and instructions on how to copy them to your own project space.
# Release Information
## Version 6.2 (20210218-074821)
### Enhancements
* Attempts to automatically fix the condition where a Control Hub's internal Expansion Hub is not
working by re-flashing its firmware
* Makes various improvements to the WiFi Direct pairing screen, especially in landscape mode
* Makes the Robot Controller service no longer be categorically restarted when the main activity is brought to foreground
* (e.g. the service is no longer restarted simply by viewing the Self Inspect screen and pressing the back button)
* It is still restarted if the Settings menu or Configure Robot menu is opened
### Bug fixes
* Fixes [FtcRobotController issue #71](https://github.com/FIRST-Tech-Challenge/FtcRobotController/issues/71)
Cannot open OpModes in v6.1 Blocks offline editor
* Fixes [FtcRobotController issue #79](https://github.com/FIRST-Tech-Challenge/FtcRobotController/issues/79)
6.1 causes a soft reboot on the Motorola E5 Play
* Fixes issue where the Control Hub OS's watchdog would restart the Robot Controller app if
the Control Hub was not able to communicate with its internal Expansion Hub
* Fixes certain I2C devices not showing up in the appropriate `HardwareMap` fields (such as `hardwareMap.colorSensor`)
* Fixes issue where performing a WiFi factory reset on the Control Hub would not set the WiFi band to 2.4 GHz
* Fixes issue where OnBotJava might fail to create a new file if the option to "Setup Code for Configured Hardware" was selected
* Fixes issue where performing certain operations after an Op Mode crashes would temporarily break Control/Expansion Hub communication
* Fixes issue where a Control Hub with a configured USB-connected Expansion Hub would not work if the Expansion Hub was missing at startup
* Fixes potential issues caused by having mismatched Control/Expansion Hub firmware versions
* Fixes [ftc_app issue 673](https://github.com/ftctechnh/ftc_app/issues/673) Latest matchlog is being deleted instead of old ones by RobotLog
* Fixes ConceptVuforiaUltimateGoalNavigationWebcam sample opmode by correctly orienting camera on robot.
* Fixes issue where logcat would be spammed with InterruptedExceptions when stop is requested from the Driver Station (this behavior was accidentally introduced in v5.3). This change has no impact on functionality.
* Fixes issue where the blocks editor fails to load if the name of any TeleOp opmode contains an apostrophe.
## Version 6.1 (20201209-113742)
* Makes the scan button on the configuration screen update the list of Expansion Hubs connected via RS-485
* Fixes [SkyStone issue #143](https://github.com/FIRST-Tech-Challenge/SkyStone/issues/143)
* Improves web interface compatibility with older browser and Android System WebView versions.
* Fixes issue in UVC driver where some cameras (e.g. certain MS Lifecams) which reported frame intervals as rounded rather than truncated values (e.g. `666667*100ns` instead of `666666*100ns` for 15FPS) would fail to start streaming.
* Adds support in UVC driver for virtual PTZ control
* Adds support in UVC driver for gain (ISO) control
* Adds support in UVC driver for enabling/disable AE priority. This setting provides a means to tell the camera firmware either
* A) It can undershoot the requested frame rate in order to provide a theoretically better image (i.e. with a longer exposure than the inter-frame period of the selected frame rate allows)
* B) It *must* meet the inter-frame deadline for the selected frame rate, even if the image may be underexposed as a result
* Adds support for the Control Hub OS 1.1.2 Robot Controller watchdog
* The Robot Controller app will be restarted if it stops responding for more than 10 seconds
* Adds support for using the Driver Station app on Android 10+
* Introduces an automatic TeleOp preselection feature
* For details and usage guide, please see [this wiki entry](https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Automatically-Loading-a-Driver-Controlled-Op-Mode)
* Shows icon next to OpMode name in the OpMode list dropdown on the Driver Station to indicate the source of the OpMode (i.e. the programming tool used to create it)
* Fixes issue where the Driver Station app would exit after displaying the Configuring WiFi Direct screen
* Fixes Blocks and OnBotJava prompts when accessed via the REV Hardware Client
## Version 6.0 (20200921-085816)
### Important Notes
* Version 6.0 is the minimum legal version for the Ultimate Goal season.
* Prebuilt APKs are now only available from the repository's Releases page.
* Android Studio 4.0 required.
* Android Studio users need to be connected to the internet the first time they build the app (in order to download needed packages for the build). Clearing gradle caches will also require an internet connection for the next build.
* Version 6.0 is the version for the Ultimate Goal season.
* Requires Android Studio 4.0.
* Android Studio users need to be connected to the Internet the first time they build the app (in order to download needed packages for the build).
* Version 5.5 was a moderately large off-season, August 2020, drop. It's worth reviewing those release notes below also.
* Version 5.5 and greater will not work on older Android 4.x and 5.x phones. Users must upgrade to an approved Android 6.x device or newer.
* The default PIDF values for REV motors have been reverted to the default PID values that were used in the 2018-2019 season
* This change was made because the 2018-2019 values turned out to work better for many mechanisms
* This brings the behavior of the REV motors in line with the behavior of all other motors
* If you prefer the 2019-2020 season's behavior for REV motors, here are the PIDF values that were in place, so that you can manually set them in your OpModes:
* If you prefer the 2019-2020 season's behavior for REV motors, here are the PIDF values that were in place, so that you can manually set them in your OpModes:
<br>
**HD Hex motors (all gearboxes):**
Velocity PIDF values: `P = 1.17`, `I = 0.117`, `F = 11.7`
Position PIDF values: `P = 5.0`
**Core Hex motor:**
Velocity PIDF values: `P = 4.96`, `I = 0.496`, `F = 49.6`
**HD Hex motors (all gearboxes):**
Velocity PIDF values: `P = 1.17`, `I = 0.117`, `F = 11.7`
Position PIDF values: `P = 5.0`
**Core Hex motor:**
Velocity PIDF values: `P = 4.96`, `I = 0.496`, `F = 49.6`
Position PIDF values: `P = 5.0`
### New features
@ -94,7 +146,7 @@ For technical questions regarding the Control System or the FTC SDK, please visi
* Removes IR readings and calculations not meant for the Broadcom sensor chip
### Bug fixes
* Improved reliability of BNO055IMU IMU initialization to prevent random initialization failures (which manifested as `Problem with 'imu'`).
* Improves reliability of BNO055IMU IMU initialization to prevent random initialization failures (which manifested as `Problem with 'imu'`).
## Version 5.5 (20200824-090813)

View File

@ -13,11 +13,9 @@
// Include common definitions from above.
apply from: '../build.common.gradle'
repositories {
maven { url = "https://dl.bintray.com/first-tech-challenge/ftcsdk/" }
}
apply from: '../build.dependencies.gradle'
dependencies {
implementation project(':FtcRobotController')
annotationProcessor files('lib/OpModeAnnotationProcessor.jar')
}
}

View File

@ -1,8 +0,0 @@
dependencies {
implementation project(':FtcRobotController')
implementation 'org.firstinspires.ftc:RobotCore:6.0.1'
implementation 'org.firstinspires.ftc:Hardware:6.0.1'
implementation 'org.firstinspires.ftc:FtcCommon:6.0.1'
implementation (name: 'tfod-release', ext:'aar')
implementation (name: 'tensorflow-lite-0.0.0-nightly', ext:'aar')
}

View File

@ -21,9 +21,24 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 28
compileSdkVersion 29
signingConfigs {
release {
def apkStoreFile = System.getenv("APK_SIGNING_STORE_FILE")
if (apkStoreFile != null) {
keyAlias System.getenv("APK_SIGNING_KEY_ALIAS")
keyPassword System.getenv("APK_SIGNING_KEY_PASSWORD")
storeFile file(System.getenv("APK_SIGNING_STORE_FILE"))
storePassword System.getenv("APK_SIGNING_STORE_PASSWORD")
} else {
keyAlias 'androiddebugkey'
keyPassword 'android'
storeFile rootProject.file('libs/ftc.debug.keystore')
storePassword 'android'
}
}
debug {
keyAlias 'androiddebugkey'
keyPassword 'android'
@ -75,8 +90,8 @@ android {
// http://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.BuildType.html
buildTypes {
release {
// Disable debugging for release versions so it can be uploaded to Google Play.
//debuggable true
signingConfig signingConfigs.release
ndk {
abiFilters "armeabi-v7a", "arm64-v8a"
}
@ -100,6 +115,7 @@ android {
jni.srcDirs = []
jniLibs.srcDir rootProject.file('libs')
}
ndkVersion '21.3.6528147'
}
repositories {
@ -107,4 +123,4 @@ repositories {
dirs rootProject.file('libs')
}
}
apply from: 'build.release.gradle'

23
build.dependencies.gradle Normal file
View File

@ -0,0 +1,23 @@
repositories {
mavenCentral()
google() // Needed for androidx
jcenter() // Needed for tensorflow-lite
flatDir {
dirs rootProject.file('libs')
}
}
dependencies {
implementation 'org.firstinspires.ftc:Inspection:6.2.1'
implementation 'org.firstinspires.ftc:Blocks:6.2.1'
implementation 'org.firstinspires.ftc:RobotCore:6.2.1'
implementation 'org.firstinspires.ftc:RobotServer:6.2.1'
implementation 'org.firstinspires.ftc:OnBotJava:6.2.1'
implementation 'org.firstinspires.ftc:Hardware:6.2.1'
implementation 'org.firstinspires.ftc:FtcCommon:6.2.1'
implementation 'org.firstinspires.ftc:tfod:1.0.2'
implementation 'org.tensorflow:tensorflow-lite:1.10.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
}

View File

@ -3,8 +3,14 @@
*
* It is extraordinarily rare that you will ever need to edit this file.
*/
configurations {
doc { transitive false }
}
buildscript {
repositories {
mavenCentral()
google()
jcenter()
}
@ -17,7 +23,47 @@ buildscript {
// google() repository beginning with version 3.2 of the Android Gradle Plugin
allprojects {
repositories {
mavenCentral()
google()
jcenter()
}
}
repositories {
mavenCentral()
flatDir {
dirs '../libs'
}
}
dependencies {
doc 'org.firstinspires.ftc:Hardware:6.2.0'
doc 'org.firstinspires.ftc:RobotCore:6.2.0'
doc 'org.firstinspires.ftc:FtcCommon:6.2.0'
doc 'org.firstinspires.ftc:OnBotJava:6.2.0'
doc 'org.firstinspires.ftc:Inspection:6.2.0'
}
task extractJavadoc {
doLast {
def componentIds = configurations.doc.incoming.resolutionResult.allDependencies.collect { it.selected.id }
def result = dependencies.createArtifactResolutionQuery()
.forComponents(componentIds)
.withArtifacts(JvmLibrary, SourcesArtifact, JavadocArtifact)
.execute()
for (component in result.resolvedComponents) {
component.getArtifacts(JavadocArtifact).each { artifact ->
def version = artifact.identifier.componentIdentifier.version
def libName = artifact.identifier.componentIdentifier.moduleIdentifier.name
copy {
from zipTree(artifact.file)
into "docs/$version/$libName/"
}
}
}
}
}

164
gradlew vendored Normal file
View File

@ -0,0 +1,164 @@
#!/usr/bin/env bash
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac
# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
APP_HOME="`pwd -P`"
cd "$SAVED" >&-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

90
gradlew.bat vendored Normal file
View File

@ -0,0 +1,90 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega