EOCV-Sim icon indicating copy to clipboard operation
EOCV-Sim copied to clipboard

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

Open hexaflexa opened this issue 1 year ago • 3 comments
trafficstars

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

hexaflexa avatar Jan 21 '24 20:01 hexaflexa

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.

serivesmejia avatar Sep 27 '24 22:09 serivesmejia

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.

qwertychouskie avatar Sep 27 '24 22:09 qwertychouskie

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.

serivesmejia avatar Sep 29 '24 14:09 serivesmejia