deltacv / EOCV-Sim

Develop, test, and tune your EasyOpenCV pipelines directly on your computer with a simple GUI !
https://docs.deltacv.org/eocv-sim/
MIT License
54 stars 19 forks source link

gamepad1 (or ExposureControl) in code won't compile in EOCV-Sim #108

Open hexaflexa opened 10 months ago

hexaflexa commented 10 months ago

Thanks for this nice program, it is very useful. I have a question about OpModes that contain gamepad1. When I place a java file containing gamepad1, it compiles in android studio, but EOCV-Sim (3.5.2) won't compile it.

The simplest way to reproduce is to add the following to runOpMode() in ConceptAprilTag.java:

if (gamepad1.x) {
    // do nothing
}

This compiles in Android Studio, but EOCV-Sim displays the error:

Build failed (took 0.18 seconds)

Using the JDK compiler

> robotcontroller\ConceptAprilTag.java
      (72:13): ERROR: cannot find symbol
        symbol:   variable gamepad1
        location: class org.firstinspires.ftc.teamcode.robotcontroller.ConceptAprilTag
      (72:12): ERROR: illegal parenthesized expression

Similar things happen if we try an opmode which references ExposureControl, for example, ConecptAprilTagOptimizeExposure (an official FTC sample) results in:

Build failed (took 0.12 seconds)

Using the JDK compiler

> robotcontroller\ConceptAprilTagOptimizeExposure.java
      (38:73): ERROR: cannot find symbol
        symbol:   class ExposureControl
        location: package org.firstinspires.ftc.robotcore.external.hardware.camera.controls
      (39:73): ERROR: cannot find symbol
        symbol:   class GainControl
        location: package org.firstinspires.ftc.robotcore.external.hardware.camera.controls
serivesmejia commented 1 month ago

There's no current plan in implementing FTC Gamepad classes into EOCV-Sim - they're out of the scope of the software and I don't feel like there's an intuitive way to add them.

However, camera controls is another story, unfortunately the current webcam driver integrated into EOCV-Sim does not support fine grained camera control, it's really a fairly limited implementation. There's a plan of writing libuvc bindings for Java (the webcam driver that the FTC SDK uses), which should enable these features to work in the future, the implementation work is being done at deltacv/libuvc-java.

qwertychouskie commented 1 month ago

There's no current plan in implementing FTC Gamepad classes into EOCV-Sim - they're out of the scope of the software and I don't feel like there's an intuitive way to add them.

It would be nice to at least stub it, so you don't get errors when running your pipeline that has optional gamepad stuff.

serivesmejia commented 1 month ago

It would be nice to at least stub it, so you don't get errors when running your pipeline that has optional gamepad stuff.

Fixed in v3.7.1

ETA for ExposureControl support at most at the end of November.