0
$\begingroup$

Rosanswers logo

I have been working with Firewire cameras on my Mac using camera1394 package. Now I decided to switch to Point Grey Flea3 USB3 cameras. I remember a year ago I have read that these cameras support IIDC and that time I was able to capture images from these cameras using libdc1394 (without ROS). Now I am struggling running it with ROS camera1394 package. My questions,

(a) Did somebody use these cameras with libdc1394, without Flycapture (maybe in Linux, better in OSX)?

(b) I cannot find Flea3 GUID, that camera1394 requires. Do USB3 cameras have GUIDs?


Originally posted by Artem on ROS Answers with karma: 709 on 2013-10-14

Post score: 1


Original comments

Comment by liborw on 2013-10-16:
We are using Chameleon, has GUID and works, but that is USB2. I had to make an udev rule to add it to plugdev group.

Comment by Artem on 2013-10-16:
Thanks for reply, I managed to make it run on OSX. There are still some things that I am not happy with, such as delay. Will test everything then write the answer.

Comment by ubuntuslave on 2015-11-11:
I also got a Chameleon Point Gray camera to work in OS X via libdc1394. The problem is that I can't figure out how to set the camera mode for it to give me color in OpenCV.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The solution was to rebuild libdc1394 library. Here is what I did,

  1. downloaded latest version of the library, libdc1394-2.2.

  2. added vendors and products codes to usb_products[] that is defined in libdc1394-2.2/dc1394/usb/control.c For flea 3, I added these two lines { 0x1e10, 0x3000 }, { 0X1e10, 0x3006 }, Finally the structure looks as follows

    /* This is the list of USB vendor/products that we know support

    • IIDC-over-USB. Currently, this is the only mechanism of detecting
    • such cameras. */ static struct _vendor_product_t { uint16_t vendor; uint16_t product; } usb_products[] = { { 0x1e10, 0x2000 }, // Point Grey Firefly MV Color { 0x1e10, 0x2001 }, // Point Grey Firefly MV Mono { 0x1e10, 0x2002 }, // Point Grey High Res Firefly MV Color { 0x1e10, 0x2003 }, // Point Grey High Res Firefly MV Mono { 0x1e10, 0x2004 }, // Point Grey Chameleon Color { 0x1e10, 0x2005 }, // Point Grey Chameleon Mono { 0x1e10, 0x3000 }, // Point Grey Flea 3 { 0X1e10, 0x3006 }, // Point Grey Flea 3 Color { 0, 0 }, };
  3. Rebuild libdc

  4. Build and run the following code that will allow you to get GUID. Later this GUID should be put to camera yaml file to run camera1394.

    #include <stdio.h> #include <stdint.h> #include <dc1394/dc1394.h> #include <stdlib.h> #include <inttypes.h>

    int main(int argc, char argv[]) { FILE imagefile; dc1394camera_t *camera; unsigned int width, height; dc1394video_frame_t *frame=NULL; //dc1394featureset_t features; dc1394_t * d; dc1394camera_list_t * list; dc1394error_t err;

     d = dc1394_new ();
     if (!d)
         return 1;
     err=dc1394_camera_enumerate (d, &list);
     DC1394_ERR_RTN(err,"Failed to enumerate cameras");
    
     if (list->num == 0) {
         dc1394_log_error("No cameras found");
         return 1;
     }
    
     camera = dc1394_camera_new (d, list->ids[0].guid);
     if (!camera) {
         dc1394_log_error("Failed to initialize camera with guid %llx", list->ids[0].guid);
         return 1;
     }
     dc1394_camera_free_list (list);
    
     printf("Using camera with GUID %" PRIx64"\n", camera->guid);
    
    dc1394_video_set_transmission(camera, DC1394_OFF);
    dc1394_capture_stop(camera);
    dc1394_camera_free(camera);
    dc1394_free (d);
    return 0;
    

    }

It is useable now, although there are some issues with setting different modes and reducing the delay. I don't have these issues on a Windows virtual machine when I use FlyCapture.


Originally posted by Artem with karma: 709 on 2013-10-16

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by abettadapur on 2013-10-30:
I built this code and followed this rebuilding of the library, but the library can't find my Flea3 camera. Do you have any ideas about this?

Comment by Artem on 2013-10-30:
What camera you have and what system you are on? What is your cameras vendor and product numbers?

Comment by abettadapur on 2013-10-31:
Ubuntu 12.04 Flea3 Color. Flycap can recognize the camera, but this script cannot. I'll get the vendor/product numbers in a sec

Comment by Artem on 2013-11-01:
If your vendor number and product number is not listed in the structure in libdc1394-2.2/dc1394/usb/control.c you have to add it. Then you can also try to install coriander (sudo apt-get install coriander) and see if you can get access to the camera through it.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.