From 00af1b123e37dc254c11455f8a7d509e0b7d7978 Mon Sep 17 00:00:00 2001 From: Nathaniel Palme Date: Sat, 17 Oct 2020 11:51:51 -0500 Subject: [PATCH] Updated Vuforia License Keys --- .../ConceptTensorFlowObjectDetectionWebcam.java | 5 +++-- .../org/samples/ConceptVuMarkIdentificationWebcam.java | 4 ++-- .../ConceptVuforiaUltimateGoalNavigationWebcam.java | 10 +++++----- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/TeamCode/src/main/java/org/samples/ConceptTensorFlowObjectDetectionWebcam.java b/TeamCode/src/main/java/org/samples/ConceptTensorFlowObjectDetectionWebcam.java index 1c4ebcf..6e1cdf8 100644 --- a/TeamCode/src/main/java/org/samples/ConceptTensorFlowObjectDetectionWebcam.java +++ b/TeamCode/src/main/java/org/samples/ConceptTensorFlowObjectDetectionWebcam.java @@ -50,7 +50,7 @@ import org.firstinspires.ftc.robotcore.external.tfod.Recognition; * is explained below. */ @TeleOp(name = "Concept: TensorFlow Object Detection Webcam", group = "Concept") -@Disabled + public class ConceptTensorFlowObjectDetectionWebcam extends LinearOpMode { private static final String TFOD_MODEL_ASSET = "UltimateGoal.tflite"; private static final String LABEL_FIRST_ELEMENT = "Quad"; @@ -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 = - "AcU+kbn/////AAAAGWDmHA7mS0gCoiMy9pA5e1AVyLZeqKejLOtP9c3COfi9g9m4Cs1XuVQVdqRFhyrFkNUynXwrhQyV65hPnPkGgRky9MjHlLLCWuqdpHzDLJonuOSBh5zVO11PleXH+2utK1lCnbBxvOM+/OrB9EAHUBrcB0ItRxjzFQOe8TXrjGGe1IyjC/Ljke3lZf/LVVinej3zjGNqwsNQoZ0+ahxYNPCJOdzRFkXjyMDXJVDQYMtVQcWKpbEM6dJ9jQ9f0UFIVXANJ7CC8ZDyrl2DQ8o4sOX981OktCKWW0d4PH0IwAw/c2nGgt1t2V/7PwTwysBYM1N+SjVpMNRg52u9gNl9os4ulF6AZw+U2LcVj4kqGZDi"; + "Abmu1jv/////AAABmYzrcgDEi014nv+wD6PkEPVnOlV2pI3S9sGUMMR/X7hF72x20rP1JcVtsU0nI6VK0yUlYbCSA2k+yMo4hQmPDBvrqeqAgXKa57ilPhW5e1cB3BEevP+9VoJ9QYFhKA3JJTiuFS50WQeuFy3dp0gOPoqHL3XClRFZWbhzihyNnLXgXlKiq+i5GbfONECucQU2DgiuuxYlCaeNdUHl1X5C2pO80zZ6y7PYAp3p0ciXJxqfBoVAklhd69avaAE5Z84ctKscvcbxCS16lq81X7XgIFjshLoD/vpWa300llDG83+Y777q7b5v7gsUCZ6FiuK152Rd272HLuBRhoTXAt0ug9Baq5cz3sn0sAIEzSHX1nah["; /** * {@link #vuforia} is the variable we will use to store our instance of the Vuforia @@ -153,6 +153,7 @@ public class ConceptTensorFlowObjectDetectionWebcam extends LinearOpMode { parameters.vuforiaLicenseKey = VUFORIA_KEY; parameters.cameraName = hardwareMap.get(WebcamName.class, "Webcam 1"); + // Instantiate the Vuforia engine vuforia = ClassFactory.getInstance().createVuforia(parameters); diff --git a/TeamCode/src/main/java/org/samples/ConceptVuMarkIdentificationWebcam.java b/TeamCode/src/main/java/org/samples/ConceptVuMarkIdentificationWebcam.java index 3464c9c..67dc16f 100644 --- a/TeamCode/src/main/java/org/samples/ConceptVuMarkIdentificationWebcam.java +++ b/TeamCode/src/main/java/org/samples/ConceptVuMarkIdentificationWebcam.java @@ -68,7 +68,7 @@ import org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackables; */ @TeleOp(name="Concept: VuMark Id Webcam", group ="Concept") -@Disabled + public class ConceptVuMarkIdentificationWebcam extends LinearOpMode { public static final String TAG = "Vuforia VuMark Sample"; @@ -116,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 = "AcU+kbn/////AAAAGWDmHA7mS0gCoiMy9pA5e1AVyLZeqKejLOtP9c3COfi9g9m4Cs1XuVQVdqRFhyrFkNUynXwrhQyV65hPnPkGgRky9MjHlLLCWuqdpHzDLJonuOSBh5zVO11PleXH+2utK1lCnbBxvOM+/OrB9EAHUBrcB0ItRxjzFQOe8TXrjGGe1IyjC/Ljke3lZf/LVVinej3zjGNqwsNQoZ0+ahxYNPCJOdzRFkXjyMDXJVDQYMtVQcWKpbEM6dJ9jQ9f0UFIVXANJ7CC8ZDyrl2DQ8o4sOX981OktCKWW0d4PH0IwAw/c2nGgt1t2V/7PwTwysBYM1N+SjVpMNRg52u9gNl9os4ulF6AZw+U2LcVj4kqGZDi"; + parameters.vuforiaLicenseKey = "Abmu1jv/////AAABmYzrcgDEi014nv+wD6PkEPVnOlV2pI3S9sGUMMR/X7hF72x20rP1JcVtsU0nI6VK0yUlYbCSA2k+yMo4hQmPDBvrqeqAgXKa57ilPhW5e1cB3BEevP+9VoJ9QYFhKA3JJTiuFS50WQeuFy3dp0gOPoqHL3XClRFZWbhzihyNnLXgXlKiq+i5GbfONECucQU2DgiuuxYlCaeNdUHl1X5C2pO80zZ6y7PYAp3p0ciXJxqfBoVAklhd69avaAE5Z84ctKscvcbxCS16lq81X7XgIFjshLoD/vpWa300llDG83+Y777q7b5v7gsUCZ6FiuK152Rd272HLuBRhoTXAt0ug9Baq5cz3sn0sAIEzSHX1nah"; /** diff --git a/TeamCode/src/main/java/org/samples/ConceptVuforiaUltimateGoalNavigationWebcam.java b/TeamCode/src/main/java/org/samples/ConceptVuforiaUltimateGoalNavigationWebcam.java index 1bf747d..d199540 100644 --- a/TeamCode/src/main/java/org/samples/ConceptVuforiaUltimateGoalNavigationWebcam.java +++ b/TeamCode/src/main/java/org/samples/ConceptVuforiaUltimateGoalNavigationWebcam.java @@ -86,7 +86,7 @@ import static org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocaliz @TeleOp(name="ULTIMATEGOAL Vuforia Nav Webcam", group ="Concept") -@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; @@ -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 = - "AcU+kbn/////AAAAGWDmHA7mS0gCoiMy9pA5e1AVyLZeqKejLOtP9c3COfi9g9m4Cs1XuVQVdqRFhyrFkNUynXwrhQyV65hPnPkGgRky9MjHlLLCWuqdpHzDLJonuOSBh5zVO11PleXH+2utK1lCnbBxvOM+/OrB9EAHUBrcB0ItRxjzFQOe8TXrjGGe1IyjC/Ljke3lZf/LVVinej3zjGNqwsNQoZ0+ahxYNPCJOdzRFkXjyMDXJVDQYMtVQcWKpbEM6dJ9jQ9f0UFIVXANJ7CC8ZDyrl2DQ8o4sOX981OktCKWW0d4PH0IwAw/c2nGgt1t2V/7PwTwysBYM1N+SjVpMNRg52u9gNl9os4ulF6AZw+U2LcVj4kqGZDi"; + "Abmu1jv/////AAABmYzrcgDEi014nv+wD6PkEPVnOlV2pI3S9sGUMMR/X7hF72x20rP1JcVtsU0nI6VK0yUlYbCSA2k+yMo4hQmPDBvrqeqAgXKa57ilPhW5e1cB3BEevP+9VoJ9QYFhKA3JJTiuFS50WQeuFy3dp0gOPoqHL3XClRFZWbhzihyNnLXgXlKiq+i5GbfONECucQU2DgiuuxYlCaeNdUHl1X5C2pO80zZ6y7PYAp3p0ciXJxqfBoVAklhd69avaAE5Z84ctKscvcbxCS16lq81X7XgIFjshLoD/vpWa300llDG83+Y777q7b5v7gsUCZ6FiuK152Rd272HLuBRhoTXAt0ug9Baq5cz3sn0sAIEzSHX1nah"; // 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 @@ -143,10 +143,10 @@ public class ConceptVuforiaUltimateGoalNavigationWebcam extends LinearOpMode { * We can pass Vuforia the handle to a camera preview resource (on the RC phone); * If no camera monitor is desired, use the parameter-less constructor instead (commented out below). */ - int cameraMonitorViewId = hardwareMap.appContext.getResources().getIdentifier("cameraMonitorViewId", "id", hardwareMap.appContext.getPackageName()); - VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters(cameraMonitorViewId); +// int cameraMonitorViewId = hardwareMap.appContext.getResources().getIdentifier("cameraMonitorViewId", "id", hardwareMap.appContext.getPackageName()); +// VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters(cameraMonitorViewId); - // VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters(); + VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters(); parameters.vuforiaLicenseKey = VUFORIA_KEY;