Announcement

Collapse
No announcement yet.

Is it possible to use two webcams serially with Vuforia?

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

  • Is it possible to use two webcams serially with Vuforia?

    Hello,

    We've successfully tested frame capture from a webcam (a LogiTech BRIO) using Vuforia.
    So we thought we'd see what would happen if we attached a second UVC camera (an older LogiTech 9000) to our USB hub and
    then attempted to access the cameras serially. That is, we would capture some frames from the first camera, close it via the VuforiaLocalizer,
    then open the second camera. This attempt crashed with the error message: "Vuforia failed to start: phase=Nascent".

    The cameras were recognized during configuration (using Scan): "Webcam 1" and "Webcam 2".

    Is there a way to make this work?

    Here's a portion of our log, starting with the close of the first camera:
    06-22 15:19:07.741 4157 8171 D UsbResiliantWebcam|DelCaptureSession: camera session is closed: Webcam(7A69CC4E)
    06-22 15:19:07.741 4157 8101 D UsbResiliantWebcam|DelCaptureSequence: ...undoStreaming()
    06-22 15:19:07.741 4157 8171 V UvcApiCaptureSession: destroy(hash=0x01c7238d)
    06-22 15:19:07.741 4157 8171 D UvcApiCaptureSession: destructor...
    06-22 15:19:07.741 4157 8171 D UvcApiCaptureSession: ...destructor
    06-22 15:19:07.741 4157 8134 D VuforiaWebcam: capture sequence DelegatingCaptureSequenceId(1) reports completed: lastFrame=298
    ...
    06-22 15:19:07.745 4157 8101 D UvcDeviceHandle: destructor...
    06-22 15:19:07.745 4157 8101 D Uvc : [jni_devicehandle.cpp:87] Java_org_firstinspires_ftc_robotcore_internal_came ra_libuvc_nativeobject_UvcDeviceHandle_nativeRelea seRefDeviceHandle()...
    06-22 15:19:07.745 4157 8101 V Uvc : API: Java_org_firstinspires_ftc_robotcore_internal_came ra_libuvc_nativeobject_UvcDeviceHandle_nativeRelea seRefDeviceHandle: enter...
    06-22 15:19:07.745 4157 8101 D Uvc : [libuvc_internal.h:877] uvc_device_handle::~uvc_device_handle()...
    06-22 15:19:07.745 4157 8101 D Uvc : [libuvc_internal.h:845] uvc_device_handle::deconstruct()...
    06-22 15:19:07.745 4157 8101 D Uvc : [libuvc_internal.h:754] uvc_device_handle::stop()...
    06-22 15:19:07.745 4157 8101 D Uvc : [libuvc_internal.h:754] ...uvc_device_handle::stop()
    06-22 15:19:07.745 4157 8101 D Uvc : [libuvc_internal.h:870] uvc_device_handle::close()...
    06-22 15:19:07.745 4157 8101 E libusb : [128.627187] [00001fa5] libusb: error [do_close] Device handle closed while transfer was still being processed, but the device is still connected as far as we know
    06-22 15:19:07.746 4157 8101 E libusb : [128.627263] [00001fa5] libusb: error [do_close] A cancellation hasn't even been scheduled on the transfer for which the device is closing
    ...
    The here are the errors that happened when we tried to get a VuforiaLocalizer for the second camera:
    06-22 15:19:09.255 4157 8101 D Vuforia : using camera by name: Webcam(93329019)
    06-22 15:19:09.410 4157 8101 D Uvc : [NativeVuforiaWebcam.cpp:176] Java_org_firstinspires_ftc_robotcore_internal_vufo ria_externalprovider_VuforiaWebcam_nativePreVufori aInit()...
    6-22 15:19:09.411 4157 8101 D UvcVuforiaWebcam: [NativeVuforiaWebcam.h:170] setting external vuforia library: libraryName='libRobotCore.so' pvUser=0x8f8dc280
    06-22 15:19:09.411 4157 8101 I AR : Warning: Trying to set external library name after Vuforia has been initialized will not have any effect.
    06-22 15:19:09.411 4157 8101 E UvcVuforiaWebcam: [NativeVuforiaWebcam.h:178] Vuforia::setExternalProviderLibrary failed
    -22 15:19:09.411 4157 8101 D Uvc : [NativeVuforiaWebcam.cpp:176] ...Java_org_firstinspires_ftc_robotcore_internal_v uforia_externalprovider_VuforiaWebcam_nativePreVuf oriaInit()
    06-22 15:19:09.411 4157 8101 E VuforiaWebcam: nativeCreateNativeVuforiaWebcam() failed
    06-22 15:19:09.412 4157 8101 V RobotCore: thread: ...terminating 'LinearOpMode main'
    06-22 15:19:09.415 4157 5587 E EventLoopManager: Event loop threw an exception
    06-22 15:19:09.425 4157 5587 E EventLoopManager: org.firstinspires.ftc.robotcore.internal.vuforia.V uforiaException: Vuforia failed to start: phase=Nascent

    Thanks,
    Phil Young
    Software Mentor, Team 5921
Working...
X