No announcement yet.

ConceptTensorFlowObjectDetection example compiled in AS, has errors in OnBotJava

  • Filter
  • Time
  • Show
Clear All
new posts

  • ConceptTensorFlowObjectDetection example compiled in AS, has errors in OnBotJava

    TensorFlow detection compiles and runs from Android Studio.

    I get this error in two places in OnBotJava -

    ERROR: cannot find symbol
    symbol: method getInstance()

    This is one of the lines it's complaining about that's in private void initVuforia() -
    ​​​​​​​vuforia = ClassFactory.getInstance().createVuforia(parameter s);

  • #2
    I just tried it with 6.0 and it works fine. Are you sure you are using 6.0?


    • #3
      After more testing -
      I have a Moto G2 XT1064 Android version 6.0. Kernel 3.4.42 1/6/2016. (Recently acquired from Ebay as I can no longer assist students with my ZTE.)
      The school has a Moto G2 XT1063 Android version 6.0. Kernel 3.4.42 8/24/2016.
      I have compiled and downloaded SDK 6.0 from Android Studio on my PC to both phones.
      The Android Studio versions compile. Only the class names changed and the license key added to the opmodes.
      On my phone, the Vuforia and Tensorflow opmodes work with both a C270 and a C310 webcam and with the phone camera. (Anything described as working sees Nav targets or rings as appropriate.)
      The school phone works with the phone camera and the C270, but the configuration file scanner sees no devices when the C310 is attached.

      In OnBotJava
      On my phone everything builds and works, Vuforia, Tensorflow, both web cams and the phone cam.
      The school phone has build errors on all 4 opmodes, on Vuforia and Tensorflow phone and web camera versions.
      Both web opmodes have cameraname errors.
      All 4 have getInstance errors.

      A G4 Play set the school has also would not see the school's C310 web cam. Alas, I sent those phones home with a student before I started testing OnBotJava, with my webcam and phones. I will have to ask the students to do some testing for me with the other at home equipment.

      Some of the students will be using OnBotJava.


      • #4
        The Robot Controller has been downloaded more than once from Android Studio.
        Another weirdness is the Program and Manage page (on both phones) shows the network name as (network), passphrase is (passphrase), url address is (url). I had already connected these phones in the past so I didn't need this info.


        • #5
          With the school phone (the one with the compiler errors for ClassFactory.getInstance), can you do the following:
          adb shell ls -l /sdcard/FIRST/java/lib/onbotjava-classes.jar

          With my phone, it says:
          -rw-rw---- 1 root sdcard_rw 3327050 2020-10-02 16:07 /sdcard/FIRST/java/lib/onbotjava-classes.jar

          If your onbotjava-classes.jar is a different size, try deleting it and then restart the robot controller.


          • #6
            Mine was a different size, I deleted, checked and it was gone. Restarted, still have compile errors and the classes.jar was replaced with one the same size as before on this phone.


            • #7
              I'm baffled. Just to be sure, can you check that the Robot Controller about box says it is version 6.0?


              • #8
                Another thing to check is whether the pre-built robot controller apk from works on that phone.


                • #9
                  Yes I had checked the about box. Yes I had that idea as well, but I wiped the FIRST directory and all files I could find first. The prebuilt worked, and when I compiled from AS it still worked. I haven't tried wiping everything before compiling from AS yet to see if something from the AS version is wrong and only installed if not already there.

                  The C310 still doesn't work, but I suspect it is a power issue. I repeatedly scanned in config and it finally found it, but it detects nothing, the screen on the RC is blank, and the power light is off.


                  • #10
                    I have now wiped the phone and installed from AS and everything works except for the C310 as before. I'll try picking up a powered hub tomorrow.


                    • #11
                      Thanks for helping!