Our middle school FTC team uses Android Studio and JAVA to code our robot. We are trying to use the FTC provided TensorFlowObjectDetection capability to find our team shipping element on the barcode. For those of you unfamiliar with the game, there are 3 - 2" colored squares (either red or blue depending on alliance). Either a duck or the team’s shipping element will be randomly placed on one of the 3 squares.
We have chosen to create a class for each of our robot’s sub-systems – the camera being one, the drive train being another. The methods in these classes are then used to create our opModes (the programs that the user can run from the drive station).
We have used the sample code and successfully identify a “Marker” (one of the 2" colored squares (ConceptTensorFlowObjectDetectionWebcam.java). NOTE: This opMode allows the user to view the camera stream and the object Detection after INIT but before START.
We converted the sample code from an opMode to a class library (BarcodeReading.java)
We use these in our autonomous opMode (AutonBlueCarousel.java)
When we run our AutonBlueCarousel opMode:
After INIT: The camera stream shows the Marker and identifies it as such – it is in the center of the field of view.
After START (the camera stream can no longer be viewed), the class returns no object found instead of finding the Marker!
I have no idea what is happening here and am fresh out of debugging ideas – any help would be appreciated. I am uploading the code.AutonBlueCarousel.java (6.8 KB) BarcodeReading.java (10.9 KB) ConceptTensorFlowObjectDetectionWebcam.java (9.1 KB)