[ros-users] Weird issues with camera1394

Jack O'Quin jack.oquin at gmail.com
Wed May 26 18:19:12 UTC 2010


On Wed, May 26, 2010 at 11:05 AM, Miguel Prada
<miguel.register at gmail.com> wrote:
> Hi,
>
> First of all the camera now works. While I was following Erics suggestion of copying coriander's settings to the camera yaml I suddenly realised the camera_info_url parameter was wrong. The reason for this was that I was using the sample unibrain.yaml file in camera1394 package wich had a hardcoded absolute path which, of course, didn't exist on my machine. After fixing this parameter everything has started to work and I'm now trying different sets of parameters to see what best fits my application.
>
> I've just 'svn up'ed the camera1394 package and this absolute path is still there in unibrain.yaml file. This should be changed to something more portable, removed or at least commented somehow IMO.

This package is currently undergoing an API review. I'll make a note
of that problem.

Those launch files are purely for testing, not intended to be part of
the package interface. I'm planning to move them from 'launch' to
'test' and add some comments to make that clearer.

> Thanks to both of you for your quick replies.
>
> PS: For the record, I'm answering your coments inline, Jack.
>
> El 26/05/2010, a las 17:23, Jack O'Quin escribió:
>
>> On Wed, May 26, 2010 at 9:28 AM, Miguel Prada <miguel.register at gmail.com> wrote:
>>> Hi,
>>>
>>> I'm trying to replace a usb webcam I'm using for a firewire Unibrain Fire-i camera, but I'm having some trouble using it with ROS. There are two issues I honestly don't know how to deal with.
>>
>> For the record: what OS, ROS and camera driver versions are you running?
>
> The machine I'm trying this on is running Ubuntu 9.10, and the camera drivers are the ones apt has installed for me by default (libdc1394-22 package, version 2.1.2; libraw1394-11, version 2.0.4)
>
> As for the ROS version I think it's 'latest', but I must admit I'm not sure. I installed it a while ago (before boxturtle came out) and cannot remember what did I do, mostly because back then I didn't know very well what I was doing either ;)
>
>>> 1- If I run camera1394_node using 'rosrun camera1394 camera1394_node' the camera seems to work, but when I try to visualize the images published on /camera/image_raw topic using image_view the image that shows is completely messed up. However, when I visualize the camera output with coriander it looks perfect. Check the images linked below to see what I mean.
>>>
>>> camera1394->image_view: http://www.flickr.com/photos/migueluli/4641459303/in/set-72157624016324875/
>>> Coriander:                                      http://www.flickr.com/photos/migueluli/4641459171/in/set-72157624016324875/
>>
>> You need to set the correct video_mode. For your fire-i, this should work:
>>
>> $ rosrun camera1394 camera1394_node _video_mode:=640x480_rgb
>>
>> If you use the current SVN trunk camera1394 with ROS latest, you
>> should be able to try different parameters using dynamic reconfigure:
>>
>> $ rosrun dynamic_reconfigure reconfigure_gui
>>
>> But, note that some video_mode settings are not compatible with this
>> camera. If you request an unsupported one, the camera may hang in some
>> way that requires resetting.
>
> After fixing the path issue I mention above I've been able to try different video modes. 640x480_yuv411 and 640x480_mono work fine, which are the ones that interest me most since they're the only ones capable of achieving 30fps at that resolution (according to specs).
>
> I've been having some trouble with 640x480_rgb even if according to the manufacturer it is supported.

It works fine at 15 fps, I don't think I've succeeded at 30 fps.

>>> 2- If I use roslaunch instead of rosrun I'm unable to start the camera. I've tried to look at the two launch files found in camera1394 package, as well as the camera configuration yaml files, but I can't think of anything inside those that may cause this problems. For the output I get (pasted below), it looks like it has something to do with not being able to set the appropriate iso level on the camera, but I find it strange that the same doesn't happen when using rosrun.
>>
>> Bus screw-ups are a common problem with the Linux 1394 drivers. In
>> many (not all) cases, running dc1394_reset_bus will clear the problem.
>> That command is found in the libdc1394-utils package on recent Ubuntu
>> distributions.
>
> I've still noticed some issues now and then. When fiddling a lot with different modes and framerates somethimes the video goes back to the weird thing I posted on the first mail. I'll try if this fixes it the next time it happens, otherwise, taking the power off the camera seems to do the trick too.
>
>>> One last thing that might be related. I have to give read and write permissions to /dev/raw1394 and /dev/video1394/0 for all users in order to make any of the above stated work at all.
>>
>> The permission problem exists with almost all distributions using the
>> old 1394 driver stack. The new (Juju) firewire stack is supposed to
>> have fixed that issue. But, who knows what new problems they
>> introduce?
>
> I have no idea of how to find out which stack I'm using. In any case changing permisions is not much of an issue right now.

Karmic has the older 1394 stack by default. If you run this command:

 $ lsmod | grep 1394

It should show four drivers, all with 1394 in the name. The Juju
drivers have "firewire" in the names.

>>> Has anyone experienced similar problems? If so, have you fixed it? And how?
>>
>> Yes, I've seen most of these problems. Getting firewire cameras
>> working solidly takes some fiddling. I'll add a Troubleshooting page
>> to the camera1394 wiki, when I can find time.
>>
>> The good news is that I've been testing the driver extensively with a
>> similar Unibrain Fire-i. Once you get the parameters dialed in
>> correctly, it should work quite reliably. For $100, that's a very nice
>> camera.
>
> Now that the camera works I'm anxious to try if the performance of my application improves with respect to using a cheap usb webcam.

Good. Please let us know what you find.
-- 
 joq



More information about the ros-users mailing list