Automode failsafe using runtime/elapsedtime not working.

This page summarizes the projects mentioned and recommended in the original post on /r/FTC

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • examples

    TensorFlow examples (by tensorflow)

  • ahw.BlueBlow(); //add a dif class that runs dif code } if (dpos < 349 && dpos > 0){ telemetry.addData("2 OR 5 DICE ROLL" , "(MIDDLE)"); telemetry.addData("Running class:" , "BlueBmid"); telemetry.update(); sleep(200); dtc = true; vuforia.setFrameQueueCapacity(0); tfod.shutdown(); ahw.BlueBmid(); //add a dif class that runs dif code } if (dpos < 550 && dpos > 200){ telemetry.addData("3 OR 6 DICE ROLL" , "(RIGHT)"); telemetry.addData("Running class:" , "BlueBhigh"); telemetry.update(); sleep(1000); dtc = true; vuforia.setFrameQueueCapacity(0); tfod.shutdown(); //add a dif class that runs dif code } } } telemetry.update(); } } } } if (tfod != null) { tfod.shutdown(); } } /** * Initialize the Vuforia localization engine. */ private void initVuforia() { /* * Configure Vuforia by creating a Parameter object, and passing it to the Vuforia engine. */ VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters(); parameters.vuforiaLicenseKey = VUFORIA_KEY; parameters.cameraName = hardwareMap.get(WebcamName.class, "Webcam 1"); // Instantiate the Vuforia engine vuforia = ClassFactory.getInstance().createVuforia(parameters); // Loading trackables is not necessary for the TensorFlow Object Detection engine. } /** * Initialize the TensorFlow Object Detection engine. */ private void initTfod() { int tfodMonitorViewId = hardwareMap.appContext.getResources().getIdentifier( "tfodMonitorViewId", "id", hardwareMap.appContext.getPackageName()); TFObjectDetector.Parameters tfodParameters = new TFObjectDetector.Parameters(tfodMonitorViewId); tfodParameters.minResultConfidence = 0.6f; tfod = ClassFactory.getInstance().createTFObjectDetector(tfodParameters, vuforia); if(labels != null) { tfod.loadModelFromFile(TFOD_MODEL_FILE, labels); } } /** * Read the labels for the object detection model from a file. */ private void readLabels() { ArrayList labelList = new ArrayList<>(); // try to read in the the labels. try (BufferedReader br = new BufferedReader(new FileReader(TFOD_MODEL_LABELS))) { int index = 0; while (br.ready()) { // skip the first row of the labelmap.txt file. // if you look at the TFOD Android example project (https://github.com/tensorflow/examples/tree/master/lite/examples/object_detection/android) // you will see that the labels for the inference model are actually extracted (as metadata) from the .tflite model file // instead of from the labelmap.txt file. if you build and run that example project, you'll see that // the label list begins with the label "person" and does not include the first line of the labelmap.txt file ("???"). // i suspect that the first line of the labelmap.txt file might be reserved for some future metadata schema // (or that the generated label map file is incorrect). // for now, skip the first line of the label map text file so that your label list is in sync with the embedded label list in the .tflite model. if(index == 0) { // skip first line. br.readLine(); } else { labelList.add(br.readLine()); } index++; } } catch (Exception e) { telemetry.addData("Exception", e.getLocalizedMessage()); telemetry.update(); } if (labelList.size() > 0) { labels = getStringArray(labelList); RobotLog.vv("readLabels()", "%d labels read.", labels.length); for (String label : labels) { RobotLog.vv("readLabels()", " " + label); } } else { RobotLog.vv("readLabels()", "No labels read!"); }

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts