Comments (19)
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?
- Close and swipe away the RC app
- Use a file manager to delete
/sdcard/robotControllerLog.txt
- Start the RC app, and reproduce the error and then subsequent success
- Close and swipe away the RC app
- 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....)
- Copy the
/sdcard/robotControllerLog.txt
file to your computer and upload it here.
from easyopencv.
Also, do you experience this same behavior when running the SDK's Vuforia webcam sample?
from easyopencv.
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:
- Selected the WebcamExample Program
- Initialized it
- The error code came up
- Went to Restart Robot on the drivers station and selected it
- Initialized the program
- Played the program and it worked fine.
from easyopencv.
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.
We are using Logitech C270 Webcams if you are referring to the UVC compatible portion.
from easyopencv.
When I use the MultipleCameraExampleOpenCVAlongsideVuforia example program, I do not receive any errors at all.
from easyopencv.
Here is the log file from when it worked with the Multiple Cameras and Vuforia/CV
robotControllerLog.txt
from easyopencv.
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.
Adding in what you suggested took care of the error message and that WebcamExample program works fine on the first try.
from easyopencv.
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.
Really, very interesting. If you remove the sleep between calls to openCameraDevice()
, does it still work?
from easyopencv.
I checked in the WebcamExample code and yes, removing the sleep does allow it to work without any errors.
from easyopencv.
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.
I removed the sleep from our other main programs and it is still working in those as well.
from easyopencv.
We are using Moto G5's
from easyopencv.
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.
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.
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.
Should be fixed in 1.4.0
from easyopencv.
Related Issues (20)
- OpMode crashes on initialization when creating `OpenCvCamera` HOT 2
- possible to setZoom for web camera? HOT 3
- Camera Stream Display Rotated 90° to the Left HOT 3
- How to set camera resolution? HOT 1
- Code Crashes Upon Run on FTC Control Hub HOT 11
- FTC Robot Controller App Crashes HOT 4
- Disconnecting and reconnecting a webcam causes failures HOT 11
- When I switch the pipeline, the robot sometimes stops. HOT 8
- 1.5.3 - duplicate class... HOT 4
- False memory leak warning HOT 12
- Splitting viewport seems to not work... HOT 3
- startStreaming() does not send frames to processFrame() after a call to stopStreaming() HOT 2
- App crashes on loading library after upgrade to 1.6.2 and apriltag 1.1.1 HOT 12
- onViewportTapped in StageSwitchingPipeline is never called HOT 1
- Streaming in driver hub HOT 1
- Error in OpenCvCameraBase crashes usages of VisionPortal in sdk 9.0 HOT 7
- Cannot upload aar file to onbot java of FtcRobotController 9.0 HOT 7
- Camera slow to load HOT 8
- CameraFactory does not work after updates HOT 8
- Getting repeated occasions of "Viewport container specified by user is not empty!" HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from easyopencv.