Announcement

Collapse
No announcement yet.

onBlocksjava and OpenCV

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

  • lgutman
    replied
    I am all ears.

    Leave a comment:


  • dmssargent
    replied
    OnBotJava never loaded arbitary JAR files located in java/lib. All of the libraries in that directory are controlled by FIRST and subject to change with any release.

    I will note that you can perform what you want to do to, much more easily than with the steps you have outlined above.

    Leave a comment:


  • lgutman
    replied
    I have not went back to verify again. It 4.0 it would load jars in the java/lib directory. Now it seems to only load pre defined jar files.

    Leave a comment:


  • dmssargent
    replied
    Originally posted by lgutman View Post
    So in 4.0 I was able to add jar files for DogeCV and it dependencies. Now in 4.3 I can't. Is our only option to deploy a custom APK to make it work. It was sweet when we could just use ftc_http to make changes. It is so much faster.
    Thanks
    Larry
    Would you mind explaining the regression? Were you vigilant in verifying that you followed the same set of procedures in the current release as what you did for the v4.0 release?

    Leave a comment:


  • lgutman
    replied
    So in 4.0 I was able to add jar files for DogeCV and it dependencies. Now in 4.3 I can't. Is our only option to deploy a custom APK to make it work. It was sweet when we could just use ftc_http to make changes. It is so much faster.
    Thanks
    Larry

    Leave a comment:


  • FTC12676
    replied
    Thanks I will take look at these classes.

    Leave a comment:


  • dmssargent
    replied
    OnBotJava is really powerful, so it depends on what you mean to modify. Yes, you can modify the behavior of carefully crafted OpModes using it, however easily using OpenCV with OnBotJava by modifying the exact same code as what you are using in Android Studio is not officially supported.

    The last release of OnBotJava added support for .properties and .json files (https://docs.oracle.com/javase/tutor...roperties.html and https://learnxinyminutes.com/docs/json/ respectively)

    The two things you might need to dig up in the SDK is SimpleGson and OnBotJavaManager.srcDir

    Leave a comment:


  • FTC12676
    replied
    Just want to clarify - do you mean if I create complete .apk file with OpenCV and deploy it on phone ( I.e. I will be using my ftc app that has OpenCV instead of google play FtC app) and after that if I start using onBot for modifying my TeamCode will not work?

    Leave a comment:


  • dmssargent
    replied
    OnBotJava doesn't load all JARs in the java/lib directory. What you are trying to do isn't currently supported (most people won't be able to help you).

    Leave a comment:


  • dziobro
    started a topic onBlocksjava and OpenCV

    onBlocksjava and OpenCV

    I have been trying to find a way to load the necessary libraries onto the phone so that the team can use onBotjava with opencv.

    I followed the directions on the https://github.com/guineawheek/endercv and was able to build an app in android studio to use opencv.
    I was able to get this to work okay.

    I then proceeded to revert the phone back to the robot controller from google play.

    I built the .jar files for opencv and endercv on android studio.
    I added to the gradle files the following to build the .jar files
    task deleteJar(type: Delete) { delete 'libs/jars/opencv.jar' } task createJar(type: Copy) { from('build/intermediates/packaged-classes/debug') into('libs/jars/') include('classes.jar') rename('classes.jar', 'opencv.jar') } I transferred those files to the phone and placed into the FIRST/java/lib directory.
    This allowed the example vision programs to build okay on the phone.

    I went to run the vision program from the drivers station and the robot controller crashed.

    I think I must be missing another file that I need to transfer to the phone.
    Any thoughts or ideas?



Working...
X