Announcement

Collapse
No announcement yet.

TensorFlow with different TeamCode folders

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • mschueren
    replied
    Sorry the formatting is bad in the previous post

    build.gradle

    // // build.gradle in Team7234 // // Most of the definitions for building your module reside in a common, shared // file 'build.common.gradle'. Being factored in this way makes it easier to // integrate updates to the FTC into your code. If you really need to customize // the build definitions, you can place those customizations in this file, but // please think carefully as to whether such customizations are really necessary // before doing so. // Custom definitions may go here // Include common definitions from above. apply from: '../build.common.gradle'

    Leave a comment:


  • mschueren
    replied
    This is the build.gradle from Team7234 Module

    Code:
     
     // // build.gradle in TeamCode // // Most of the definitions for building your module reside in a common, shared // file 'build.common.gradle'. Being factored in this way makes it easier to // integrate updates to the FTC into your code. If you really need to customize // the build definitions, you can place those customizations in this file, but // please think carefully as to whether such customizations are really necessary // before doing so.   // Custom definitions may go here  // Include common definitions from above. apply from: '../build.common.gradle'
    This is from build.common.gradle
    Code:
     
     import java.util.regex.Pattern  apply plugin: 'com.android.application'  android {      compileSdkVersion 23      signingConfigs {         debug {             keyAlias 'androiddebugkey'             keyPassword 'android'             storeFile rootProject.file('libs/ftc.debug.keystore')             storePassword 'android'         }     }      aaptOptions {         noCompress "tflite"     }      defaultConfig {         applicationId 'com.qualcomm.ftcrobotcontroller'         minSdkVersion 19         targetSdkVersion 19          /**          * We keep the versionCode and versionName of robot controller applications in sync with          * the master information published in the AndroidManifest.xml file of the FtcRobotController          * module. This helps avoid confusion that might arise from having multiple versions of          * a robot controller app simultaneously installed on a robot controller device.          *          * We accomplish this with the help of a funky little Groovy script that maintains that          * correspondence automatically.          *          * @see <a href="http://developer.android.com/tools/building/configuring-gradle.html">Configure Your Build</a>          * @see <a href="http://developer.android.com/tools/publishing/versioning.html">Versioning Your App</a>          */         def manifestFile = project(':FtcRobotController').file('src/main/AndroidManifest.xml');         def manifestText = manifestFile.getText()         //         def vCodePattern = Pattern.compile("versionCode=\"(\\d+(\\.\\d+)*)\"")         def matcher = vCodePattern.matcher(manifestText)         matcher.find()         def vCode = Integer.parseInt(matcher.group(1))         //         def vNamePattern = Pattern.compile("versionName=\"(.*)\"")         matcher = vNamePattern.matcher(manifestText);         matcher.find()         def vName = matcher.group(1)         //         versionCode vCode         versionName vName     }      // Advanced user code might just want to use Vuforia directly, so we set up the libs as needed     // http://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.BuildType.html     buildTypes {         release {             // Disable debugging for release versions so it can be uploaded to Google Play.             //debuggable true             ndk {                 abiFilters "armeabi-v7a"             }         }         debug {             debuggable true             jniDebuggable true             renderscriptDebuggable true             ndk {                 abiFilters "armeabi-v7a"             }         }     }      compileOptions {         sourceCompatibility JavaVersion.VERSION_1_7         targetCompatibility JavaVersion.VERSION_1_7     }      sourceSets.main {         jni.srcDirs = []         jniLibs.srcDir rootProject.file('libs')     } }  repositories {     flatDir {         dirs rootProject.file('libs')     } } apply from: 'build.release.gradle'
    This is from settings.gradle
    Code:
     
     include ':FtcRobotController' include ':TeamCode' include ':Team535' include ':Team6194' include ':Team7234' include ':MentorCode' include ':openCVLibrary341'

    Leave a comment:


  • 4634 Programmer
    replied
    Can you post your build.gradle for the user-created teamcode module(s)?

    Leave a comment:


  • mschueren
    started a topic TensorFlow with different TeamCode folders

    TensorFlow with different TeamCode folders

    We have three different teams and have created different TeamCode folders in Android Studio for each team. As we try implementing TensorFlow for the teams, we have experienced that it will only work in the original TeamCode folder. If we copy the sample code to TeamCode it works, but using the exact same code in any of the other team folders causes the app to shutdown. Is the initialization of TensorFlow hardcoded to only work with the TeamCode folder? We can work around this issue by having each team use a separate instance of the ftc_app, but it is nice to keep them all together as separate folders. Is there a way to make TensorFlow work outside of TeamCode?
Working...
X