Giter VIP home page Giter VIP logo

Comments (19)

Windwoes avatar Windwoes commented on August 13, 2024

Could you provide a minimal log file from the Robot Controller which captures the error on the first run and the success on the subsequent run?

  1. Close and swipe away the RC app
  2. Use a file manager to delete /sdcard/robotControllerLog.txt
  3. Start the RC app, and reproduce the error and then subsequent success
  4. Close and swipe away the RC app
  5. Reboot the phone to ensure that the filesystem has been synced to NAND (this wouldn't be a problem if the MTP protocol was less buggy....)
  6. Copy the /sdcard/robotControllerLog.txt file to your computer and upload it here.

from easyopencv.

Windwoes avatar Windwoes commented on August 13, 2024

Also, do you experience this same behavior when running the SDK's Vuforia webcam sample?

from easyopencv.

ZMcElroy avatar ZMcElroy commented on August 13, 2024

I went in and loaded the WebcamExample program to make sure it wasn't an issue with our program. I ran it and the same results happened. I did as you said to grab the log file and have attached it here.

After clearing the file and resting the app here is what I did to reproduce the problem:

  1. Selected the WebcamExample Program
  2. Initialized it
  3. The error code came up
  4. Went to Restart Robot on the drivers station and selected it
  5. Initialized the program
  6. Played the program and it worked fine.

robotControllerLog.txt

from easyopencv.

Windwoes avatar Windwoes commented on August 13, 2024

Well I see something very suspicious in your log...

11-27 22:09:37.786  8650  8934 D libusb  : [489.113857] [000022e6] libusb: debug [_originate_err] [linux_usbfs.c:798] originating err: -12(LIBUSB_ERROR_NOT_SUPPORTED)
11-27 22:09:37.786  8650  8935 V UvcDeviceHandle: construct(pointer=0x8d8a2420)
11-27 22:09:37.786  8650  8934 D Uvc     : [device.cpp:613] uvc_create_uvc_device()...
11-27 22:09:37.786  8650  8934 D Uvc     : [libuvc/libuvc_internal.h:354] uvc_device::uvc_device()...
11-27 22:09:37.786  8650  8934 D libusb  : [489.114131] [000022e6] libusb: debug [_originate_err] [descriptor.c:543] originating err: -5(LIBUSB_ERROR_NOT_FOUND)
........
11-27 22:09:37.789  8650  8934 D UvcContext: usb device is *not* UVC compatible, /dev/bus/usb/001/007

@NoahAndrews any thoughts?

from easyopencv.

ZMcElroy avatar ZMcElroy commented on August 13, 2024

We are using Logitech C270 Webcams if you are referring to the UVC compatible portion.

from easyopencv.

ZMcElroy avatar ZMcElroy commented on August 13, 2024

When I use the MultipleCameraExampleOpenCVAlongsideVuforia example program, I do not receive any errors at all.

from easyopencv.

ZMcElroy avatar ZMcElroy commented on August 13, 2024

Here is the log file from when it worked with the Multiple Cameras and Vuforia/CV
robotControllerLog.txt

from easyopencv.

Windwoes avatar Windwoes commented on August 13, 2024

Hmm interesting. I have a suspicion. Go back to the WebcamExample program. Find this part in the program:

        /*
         * Open the connection to the camera device
         */
        webcam.openCameraDevice();

And replace it with:

        /*
         * Open the connection to the camera device
         */
        webcam.openCameraDevice();
        sleep(1000);
        webcam.openCameraDevice();

And then test again and see what happens.

from easyopencv.

ZMcElroy avatar ZMcElroy commented on August 13, 2024

Adding in what you suggested took care of the error message and that WebcamExample program works fine on the first try.

from easyopencv.

ZMcElroy avatar ZMcElroy commented on August 13, 2024

I added that into one of our main pieces of code and it took care of the error message in there as well.

from easyopencv.

Windwoes avatar Windwoes commented on August 13, 2024

Really, very interesting. If you remove the sleep between calls to openCameraDevice(), does it still work?

from easyopencv.

ZMcElroy avatar ZMcElroy commented on August 13, 2024

I checked in the WebcamExample code and yes, removing the sleep does allow it to work without any errors.

from easyopencv.

Windwoes avatar Windwoes commented on August 13, 2024

Hmm. I think what we're seeing here is that your particular phone takes longer to grant permission and open the camera than EasyOpenCV's timeout allows, which is 1 second.

The implementation of the webcam driver for Vuforia splits up the initialization into seperate steps for aquiring permission and opening, each with 1 second timeout. I could potentially switch to doing that, or I could keep it the current way and increase the timeout to 2 seconds... Hmmm...

What model RC phone are you using?

from easyopencv.

ZMcElroy avatar ZMcElroy commented on August 13, 2024

I removed the sleep from our other main programs and it is still working in those as well.

from easyopencv.

ZMcElroy avatar ZMcElroy commented on August 13, 2024

We are using Moto G5's

from easyopencv.

Windwoes avatar Windwoes commented on August 13, 2024

Interesting, a while ago I tested webcams on a Moto G5 Plus and it didn't run into any problems. If I were to generate an unofficial release or two, would you be intetested in testing?

from easyopencv.

ZMcElroy avatar ZMcElroy commented on August 13, 2024

I don't mind pending they aren't too drastic of changes. We have our state championship this weekend so i'm a little hesitant to change too much. However, we don't leave until Friday.

from easyopencv.

Windwoes avatar Windwoes commented on August 13, 2024

Well since you have a workaround, why don't you keep that for now and we can revisit this later after your championship :)

from easyopencv.

Windwoes avatar Windwoes commented on August 13, 2024

Should be fixed in 1.4.0

from easyopencv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.