From 39af30850604ce4c9278f7f638660675cf8a745d Mon Sep 17 00:00:00 2001 From: Nathaniel Palme Date: Sat, 17 Oct 2020 08:37:24 -0500 Subject: [PATCH] Prepared FTC samples code for Vuforia and TensorFlow testing --- .../org}/samples/ConceptTensorFlowObjectDetectionWebcam.java | 4 ++-- .../java/org}/samples/ConceptVuMarkIdentificationWebcam.java | 5 +++-- .../samples/ConceptVuforiaUltimateGoalNavigationWebcam.java | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) rename {FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external => TeamCode/src/main/java/org}/samples/ConceptTensorFlowObjectDetectionWebcam.java (95%) rename {FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external => TeamCode/src/main/java/org}/samples/ConceptVuMarkIdentificationWebcam.java (94%) rename {FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external => TeamCode/src/main/java/org}/samples/ConceptVuforiaUltimateGoalNavigationWebcam.java (97%) diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptTensorFlowObjectDetectionWebcam.java b/TeamCode/src/main/java/org/samples/ConceptTensorFlowObjectDetectionWebcam.java similarity index 95% rename from FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptTensorFlowObjectDetectionWebcam.java rename to TeamCode/src/main/java/org/samples/ConceptTensorFlowObjectDetectionWebcam.java index 9462a8e..1c4ebcf 100644 --- a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptTensorFlowObjectDetectionWebcam.java +++ b/TeamCode/src/main/java/org/samples/ConceptTensorFlowObjectDetectionWebcam.java @@ -27,7 +27,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -package org.firstinspires.ftc.robotcontroller.external.samples; +package org.samples; import com.qualcomm.robotcore.eventloop.opmode.Disabled; import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; @@ -69,7 +69,7 @@ public class ConceptTensorFlowObjectDetectionWebcam extends LinearOpMode { * and paste it in to your code on the next line, between the double quotes. */ private static final String VUFORIA_KEY = - " -- YOUR NEW VUFORIA KEY GOES HERE --- "; + "AcU+kbn/////AAAAGWDmHA7mS0gCoiMy9pA5e1AVyLZeqKejLOtP9c3COfi9g9m4Cs1XuVQVdqRFhyrFkNUynXwrhQyV65hPnPkGgRky9MjHlLLCWuqdpHzDLJonuOSBh5zVO11PleXH+2utK1lCnbBxvOM+/OrB9EAHUBrcB0ItRxjzFQOe8TXrjGGe1IyjC/Ljke3lZf/LVVinej3zjGNqwsNQoZ0+ahxYNPCJOdzRFkXjyMDXJVDQYMtVQcWKpbEM6dJ9jQ9f0UFIVXANJ7CC8ZDyrl2DQ8o4sOX981OktCKWW0d4PH0IwAw/c2nGgt1t2V/7PwTwysBYM1N+SjVpMNRg52u9gNl9os4ulF6AZw+U2LcVj4kqGZDi"; /** * {@link #vuforia} is the variable we will use to store our instance of the Vuforia diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptVuMarkIdentificationWebcam.java b/TeamCode/src/main/java/org/samples/ConceptVuMarkIdentificationWebcam.java similarity index 94% rename from FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptVuMarkIdentificationWebcam.java rename to TeamCode/src/main/java/org/samples/ConceptVuMarkIdentificationWebcam.java index 866261f..3464c9c 100644 --- a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptVuMarkIdentificationWebcam.java +++ b/TeamCode/src/main/java/org/samples/ConceptVuMarkIdentificationWebcam.java @@ -26,12 +26,13 @@ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -package org.firstinspires.ftc.robotcontroller.external.samples; +package org.samples; import com.qualcomm.robotcore.eventloop.opmode.TeleOp; import com.qualcomm.robotcore.eventloop.opmode.Disabled; import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import org.firstinspires.ftc.robotcontroller.external.samples.ConceptVuforiaNavigationWebcam; import org.firstinspires.ftc.robotcore.external.ClassFactory; import org.firstinspires.ftc.robotcore.external.hardware.camera.WebcamName; import org.firstinspires.ftc.robotcore.external.matrices.OpenGLMatrix; @@ -115,7 +116,7 @@ public class ConceptVuMarkIdentificationWebcam extends LinearOpMode { * Once you've obtained a license key, copy the string from the Vuforia web site * and paste it in to your code on the next line, between the double quotes. */ - parameters.vuforiaLicenseKey = " -- YOUR NEW VUFORIA KEY GOES HERE --- "; + parameters.vuforiaLicenseKey = "AcU+kbn/////AAAAGWDmHA7mS0gCoiMy9pA5e1AVyLZeqKejLOtP9c3COfi9g9m4Cs1XuVQVdqRFhyrFkNUynXwrhQyV65hPnPkGgRky9MjHlLLCWuqdpHzDLJonuOSBh5zVO11PleXH+2utK1lCnbBxvOM+/OrB9EAHUBrcB0ItRxjzFQOe8TXrjGGe1IyjC/Ljke3lZf/LVVinej3zjGNqwsNQoZ0+ahxYNPCJOdzRFkXjyMDXJVDQYMtVQcWKpbEM6dJ9jQ9f0UFIVXANJ7CC8ZDyrl2DQ8o4sOX981OktCKWW0d4PH0IwAw/c2nGgt1t2V/7PwTwysBYM1N+SjVpMNRg52u9gNl9os4ulF6AZw+U2LcVj4kqGZDi"; /** diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptVuforiaUltimateGoalNavigationWebcam.java b/TeamCode/src/main/java/org/samples/ConceptVuforiaUltimateGoalNavigationWebcam.java similarity index 97% rename from FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptVuforiaUltimateGoalNavigationWebcam.java rename to TeamCode/src/main/java/org/samples/ConceptVuforiaUltimateGoalNavigationWebcam.java index 8021ba9..1bf747d 100644 --- a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptVuforiaUltimateGoalNavigationWebcam.java +++ b/TeamCode/src/main/java/org/samples/ConceptVuforiaUltimateGoalNavigationWebcam.java @@ -27,7 +27,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -package org.firstinspires.ftc.robotcontroller.external.samples; +package org.samples; import com.qualcomm.robotcore.eventloop.opmode.Disabled; import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; @@ -106,7 +106,7 @@ public class ConceptVuforiaUltimateGoalNavigationWebcam extends LinearOpMode { * and paste it in to your code on the next line, between the double quotes. */ private static final String VUFORIA_KEY = - " --- YOUR NEW VUFORIA KEY GOES HERE --- "; + "AcU+kbn/////AAAAGWDmHA7mS0gCoiMy9pA5e1AVyLZeqKejLOtP9c3COfi9g9m4Cs1XuVQVdqRFhyrFkNUynXwrhQyV65hPnPkGgRky9MjHlLLCWuqdpHzDLJonuOSBh5zVO11PleXH+2utK1lCnbBxvOM+/OrB9EAHUBrcB0ItRxjzFQOe8TXrjGGe1IyjC/Ljke3lZf/LVVinej3zjGNqwsNQoZ0+ahxYNPCJOdzRFkXjyMDXJVDQYMtVQcWKpbEM6dJ9jQ9f0UFIVXANJ7CC8ZDyrl2DQ8o4sOX981OktCKWW0d4PH0IwAw/c2nGgt1t2V/7PwTwysBYM1N+SjVpMNRg52u9gNl9os4ulF6AZw+U2LcVj4kqGZDi"; // Since ImageTarget trackables use mm to specifiy their dimensions, we must use mm for all the physical dimension. // We will define some constants and conversions here