cameleon-rs / cameleon

A safe, fast, and flexible library for GenICam compatible cameras
Mozilla Public License 2.0
85 stars 16 forks source link

Cannot connect to FLIR USB3 Vision camera ? #136

Open justinbacle opened 2 years ago

justinbacle commented 2 years ago

Hello all, just starting to use this rust lib as I am coming from python and the harvesters module (which is basically the equivalent of cameleon, but for python) but got sick of the snail pace of python.

My camera is as follows, (gathered from SpinView, before changing driver to libusb) :

DeviceDisplayName   Point Grey Research Blackfly BFLY-U3-23S6C
DeviceModelName         Blackfly BFLY-U3-23S6C
DeviceID            USB\VID_1E10&PID_3300&MI_00\9&10787E88&1&0000_0
DeviceType          USB3Vision
DeviceVendorName    Point Grey Research
DeviceInstanceId    USB\VID_1E10&PID_3300&MI_00\9&10787E88&1&0000
DeviceCurrentSpeed  SuperSpeed
DeviceAccessStatus  OpenReadWrite
DeviceVersion       FW:v1.9.3.00 FPGA:v2.02

Steps I did : Setup rust environment, tested that hello world worked. Installed libusb installed device driver with zadig Added dependencies to cargo.toml

[dependencies]
cameleon = { version = "0.1", features = ["libusb"] }

as specified in readme.md build the example script given in the readme.md

output:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: StreamError(Io(libusb error: operation not supported or unimplemented on this platform

Caused by:
    operation not supported or unimplemented on this platform))', src\main.rs:18:19
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library\std\src\panicking.rs:584
   1: core::panicking::panic_fmt
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library\core\src\panicking.rs:142
   2: core::result::unwrap_failed
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library\core\src\result.rs:1785
   3: enum$<core::result::Result<tuple$<>,enum$<cameleon::CameleonError> >, 0, 4, Err>::unwrap<tuple$<>,enum$<cameleon::CameleonError> >
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3\library\core\src\result.rs:1078
   4: swcam_rust::main
             at .\src\main.rs:18
   5: core::ops::function::FnOnce::call_once<void (*)(),tuple$<> >
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3\library\core\src\ops\function.rs:248
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

on line

// Opens the camera.
    camera.open().unwrap();

Am I missing something obvious ?

bradmartin333 commented 1 year ago

Experiencing the same

Inga-sunga-sun commented 1 year ago

I got the same error in my environment.

OS: Windows10, Windows11 Camera: Basler USB 3.0 camera

doc-E-brown commented 5 months ago

I am able to successfully complete the tutorial on Ubuntu 22.04 with a Basler 45ucPRO camera, but for some reason I get the same error when trying to execute the same code in windows using WebUSB

called `Result::unwrap()` on an `Err` value: ControlError(Io(libusb error: pipe error

Caused by:
    pipe error))
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace