FTC CanDo With TensorFlow 20220513

From wikidb
Jump to: navigation, search

Added Machine Learning Capability

The goal of this program is to enable CanDo to push a gold cub off the arena more quickly by using Tensorflow. Some may say that we are making the program smarter through machine learning. Whether we think the terms "learning" and "smarter" are appropriate, Convolutional Neural Networks are a powerful, import and fun technology to understand. We'll get a hint of what it is about in this lab.

References

Tutorial Videos

Epp TensorFlow Projects

Code

Integrated CanDo and TensorFlow Code

The goal of this program is to enable CanDo to push a gold cub off the arena more quickly by use Tensorflow.

Based on Version 6 of CanDo and

Bases on this Version of a TensorFlow Object Detection Program

Exercises

Exercise 1

  • Test recognition for a gold cube under
    • Various lighting
    • Orientations
    • Distances

Exercise 2

  • Enhance the TensorFlowCanDo11.java program by making the robot rotate to find a gold mineral.

Exercise 3

  • Make the robot stop rotating after it has located the gold mineral.

Exercise 4

  • Make the robot push the gold mineral off the arena.
  • If the robot overshoots its rotation, make it adjust its aim until the robot is centered in the monitor.
  • Enhance model

Spoiler Alert - New Code Version

This version implement several of the exercises. It is a proof of concept. The follow are some possible improvements.

  • Optimize motor power to improve performance.
  • Correct for overshoot by reversing rotation one or more times.
  • Try BC instead of the BCDM tflite versions of the model.
  • Test lighting conditions
  • Replace dead reckoning with additional targeting step during the move toward the block in the last step

Exercise 5 - TBD

Potential Exercises

  • Camera Field of View
  • Initial robot rotation speed
  • Impact of background on recognition
  • other?

TBD Working with Models

References to be Explored

Failed: Enabling the Rover Ruckus model

Load the following into

   C:\Users\epp\AndroidStudioProjects\FTC71\FtcRobotController\FtcRobotController\src\main\assets
       RoverReckus.tflite
                  .dat
                  .xml
 from
   C:\Users\epp\AndroidStudioProjects\FTC54\SkyStone-master\SkyStone-master\FtcRobotController\src\main\assets

and use this command

 private static final String TFOD_MODEL_ASSET = "RoverRuckus.tflite";

The program would not start up. Could find a "FreightFrenzy_BCDM.tflite" in my project. The SDK has changed.