ftctechnh / ftc_app

FTC Android Studio project to create FTC Robot Controller app.
761 stars 3.16k forks source link

v4.3 Tensorflow support missing #637

Closed fortraan closed 6 years ago

fortraan commented 6 years ago

The Problem

The example code provided, ConceptTensorflowObjectDetection and ConceptTensorflowObjectDetectionWebcam, do not work. Specifically, the type TFObjectDetector is not found.

What we've done about it

Looking through RobotCore-release-sources.jar, we found the implementation for Tensorflow support in org.firstinspires.ftc.robotcore.internal.tfod. However, it seems the .aar files do not match the sources. We've tried copying the contents of tfod elsewhere and using those, but it didn't work.

Note: We changed the java compile version to 1.8, since we use features from JDK 1.8. We don't know if this is the problem.

dmssargent commented 6 years ago

TFObjectDector is not in the org.firstinspires.ftc.robotcore.internal.tfod package.

The correct import for that file is import org.firstinspires.ftc.robotcore.external.tfod.TFObjectDetector; and the respective AAR files seem to match that.

You can try running a command-line build from the root of the project via ./gradlew assemble to check if the issue is Gradle issues with Android Studio or if the build is really breaking. If the build is really breaking, try redownloading the various AARs that are on GitHub and replace your current AAR files with those fresh copies.

fortraan commented 6 years ago

I'm not sure why, but somehow it just fixed itself. I removed all dependencies of RobotCore-release.aar, synced Gradle, added them back in, and now it works. I don't know why that fixed it,but I'm not going to complain.