FTC CanDo With TensorFlow 20220513
Contents
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
- Tutorial - Using TensorFlow to detect game pieces in First Tech Challenge (FTC) robot competitions and explore Machine Learning
- Locate Gold Mineral And Push Demo Video
Epp TensorFlow Projects
- FTC Epp TensorCode
- IEEE TryEnginering resource page Links to the same tutorial above.
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
- CanDo06.java for the May lab.
- For details see FTC_A_Hint_of_CanDo_-_TBD_20220422#Version_6_Add_Reverse_and_Turn
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
- Gearing up for confidence level experiments
- TensorFlowCanDo13.java
Potential Exercises
- Camera Field of View
- Initial robot rotation speed
- Impact of background on recognition
- other?
TBD Working with Models
References to be Explored
- FTC Machine Learning Tookit 2021-2022Step-by-step guide
- FTC OnBot Java TensorFlow Custom Model Tutorial
- A step-by-step guide to implementing your TensorFlow Custom Model in OnBot Java Guide to making a TensorFlow Custom Model android studio?
- TensorFlow for Current Game
- OnBotJava issue!
- Using TensorFlow in Freight Frenzy
- Using TensorFlow in Freight Frenzy
- FTC Freight Frenzy TensorFlow Programming Issue
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.