ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Multiple Point Grey Chameleon USB cameras unstable

asked 2012-06-21 03:50:30 -0600

StFS gravatar image

updated 2014-01-28 17:12:45 -0600

ngrennan gravatar image

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 ... (more)

edit retag flag offensive close merge delete

Comments

You can turn on Debug logging using the standard rxconsole tool.

joq gravatar image joq  ( 2012-06-21 16:20:46 -0600 )edit

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

joq gravatar image joq  ( 2012-06-21 16:23:10 -0600 )edit

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...

Rufus gravatar image Rufus  ( 2020-03-15 21:54:52 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2012-06-21 05:53:10 -0600

StFS gravatar image

Ok this is really weird!

I tried changing the order of the cameras in the launch file and that seems to do the trick. Now they both kick in even after killing and relaunching the launch file.

I'm going to mark this as the answer in case it might help someone else but I'm really frustrated to not know exactly why this is happening! So if anyone has an idea, please post a comment and I'll try to verify it.

Kind regards, Stefan Freyr

edit flag offensive delete link more

Comments

And to be really clear, it also matters which USB port you use for the cameras. There is no good way of figuring out what works best, you just have to use trial and error.

StFS gravatar image StFS  ( 2012-06-21 06:21:14 -0600 )edit

In fact, I tried connecting one camera to a USB 2 plug and another to a USB 3 plug and lsusb reported that they were on different busses but launching the ROS camera stuff failed. I then tried other configurations and the only one that works is when they are on the same bus according to lsusb. grmpf

StFS gravatar image StFS  ( 2012-06-21 06:23:29 -0600 )edit
1

I've seen reports of USB 2 cameras not working on USB 3.

joq gravatar image joq  ( 2012-06-21 06:59:31 -0600 )edit

@StFS: We have the same issue with devices on separate USB 2 and USB 3 busses that is solved when they are on the same bus. Of course for contention, we'd like to keep them on separate busses. Did you ever have any correspondence with Point Grey about this?

Eruditass gravatar image Eruditass  ( 2013-02-20 04:29:07 -0600 )edit

@Eruditass sorry no we didn't. We never had a USB3 bus though so that may be a different problem. I seem to recall some mention of a fix in PointGray release notes recently concerning USB2 cameras on a USB3 bus.

StFS gravatar image StFS  ( 2013-02-20 04:37:03 -0600 )edit

@Eruditass so my advice would be to: 1) upgrade to the latest PointGray driver, 2) use external power to the cameras through GPIO and 3) try to switch the order in which you have your cameras defined in your launch script.

StFS gravatar image StFS  ( 2013-02-20 04:38:28 -0600 )edit
3

answered 2012-06-21 04:07:03 -0600

joq gravatar image

updated 2012-06-21 04:09:14 -0600

I have no experience using USB cameras with camera1394. Some people have reported success with them.

With high-bandwidth cameras like yours, I would worry about USB 2.0 bus contention. Unlike IEEE-1394, USB isochronous bandwidth guarantees may be unreliable.

It might help if you can attach the cameras to separate USB controllers.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2012-06-21 03:50:30 -0600

Seen: 2,623 times

Last updated: Jun 21 '12