Multiple Point Grey Chameleon USB cameras unstable
Hello.
This will be a rather fuzzy question and I apologize for that in advance.
We have two Point Grey Chameleon (http://ptgrey.com/products/chameleon/chameleon_usb_camera.asp) cameras connected to our computer and we're using the camera1394 driver to publish them in ROS.
We've been having instability problems with our setup which seem to be very difficult to debug and analyze.
We know (now) that the USB 2.0 cameras aren't exactly the best option for robot vision and running two like the Chameleon (with a resolution of 1296x964) might be stretching the limit a little.
However, the annoying thing is that we've been able to run the cameras without problems. It works often, but not nearly always. Sometimes we have "rough patches" where things behave unusually bad (tonight was one such night). But as I said, once the cameras are up, they seem to stay up as long as we don't kill the image_proc process. If, however, the image_proc process reports an error (segfaults), we seem to need to hard reboot the computer and cut off power to the cameras (they are powered through both USB and GPIO since USB power alone didn't seem to cope with two of these).
So my question is basically whether anybody has experience or tips with running multiple (higher end) USB cameras through the camera1394 driver? Maybe even the Point Grey Chameleon cameras? What can we do to make this less error prone?
I just found some code that seems to offer a driver for image_proc directly on top of the PGR SDK (http://www.roschina.net/ros/www.ros.org/wiki/pgr_camera_driver.html), I'll try that out tomorrow but I'd like to hear if anybody has experience with that.
Kind regards, Stefan Freyr
UPDATE: A bit more information about this.
I just updated the firmware on both cameras. After that I did a little more structured testing, shutting down and cutting all power to both the computer and cameras. After booting up I tried launching both cameras and that worked. I killed that launch and tried again and got the segfault. Then I tried running each camera individually and that works fine. Then I tried running flycap (the Point Grey image viewer and configuration tool) and that works for each camera individually and (and here's the kicker) it also works to fire up two flycap instances and view both cameras simultaneously! After that I tried running both cameras from a ROS launch script but I get the segfault.
I'm trying to get more information about the segfault but I can't find anything in the log files. Is there a way to make the log files more verbose for camera1394? Do I need to compile the camera1394 driver again and if so, how do I do that cleanly on a setup using the Ubuntu packages?
This seems to be some sort of a pickle with the camera1394 since both cameras are ...
You can turn on Debug logging using the standard rxconsole tool.
If camera1394 segfaults, please get a stack backtrace and file a bug report at https://code.ros.org/trac/ros-pkg/newticket?component=camera1394&type=defect&&camera1394
I've encountered similar issues with using an Allied Vision USB3 Vision camera with ROS. Accessing the camera with the SDK itself is fine, but once any ROS related code "exists" (i.e. even if it's after any camera related code), the camera code segfaults mysteriously... Allied Vision support believes it has something to do with some conflict in handling USB between ROS and their SDK.
It also seems that in general, USB cameras don't handle abrupt disconnections (e.g. segfaults) as gracefully as GigE cameras, where USB cameras would require a full system reboot while GigE cameras may only require to wait for a specific timeout for the system to auto close the connection.
I would advise going for GigE cameras instead of USB cameras for now...