[ros-users] Digital Camera 1394 in ROS?
Trevor Jay
tjay at cs.brown.edu
Thu Mar 11 19:46:06 UTC 2010
Much of your understandable confusion is probably my fault. We've
documented mostly as a webcam/v4l2 driver, but its actually much more
generic than that.
A little bit of background:
Gstreamer is Gnome's primary multimedia library. It is a
plugin/pipe/filter based library. If you're familiar with DirectShow
under Windows, the idea is much the same. The library is concerned
with building generic multimedia functionality by constructing
pipelines. You might have a plugin that reads CD music, a filter that
normalizes the volume, and a plugin that plays audio through the
soundcard. With Gstreamer you would build a pipeline of these parts so
that music is read off the CD, normalized, and then played.
probe is not exactly a Gstreamer plugin, but it's close. It can "tap"
into a pipeline and read RGB video, which it then broadcast as a
standard ROS image transport.
The (supposed) advantage of this approach is that Gstreamer has many
many plugins, which probe can leverage. At the same time, you need
only compile/install the plugins you need. The original motivation was
to use Gstreamers whitebalancing filters so that we could use cameras
that did not support this feature in hardware.
You are correct about Gstreamer supporting DV, but it also supports DC
once the dc1394src plugin is installed. I've just used two different
models of dc1394 cameras to confirm this.
I first setup probe's pipeline via an environmental variable:
export PROBE_CONFIG="dc1394src camera-number=0 ! video/x-raw-rgb !
ffmpegcolorspace ! identity name=ros ! fakesink"
then I run probe itself:
rosrun probe probe
That's really all there seems to be too it.
I've also run two daisy chained firewire cameras at the same time via:
export PROBE_CONFIG="dc1394src camera-number=0 ! video/x-raw-rgb !
ffmpegcolorspace ! identity name=ros ! fakesink"
rosrun probe probe probe_publisher:=probe_a probe/image:=probe_a/image
export PROBE_CONFIG="dc1394src camera-number=1 ! video/x-raw-rgb !
ffmpegcolorspace ! identity name=ros ! fakesink"
rosrun probe probe probe_publisher:=probe_b probe/image:=probe_b/image
One thing to note: this last case requires the the absolute latest
version of probe (earlier versions had a bug that prevented two probes
from running at once under certain circumstances).
Speaking of the latest version, the release versions of our packages
are always located in:
http://brown-ros-pkg.googlecode.com/svn/tags/brown-ros-pkg/
The other branches represent various stages of development. The best
way to get these is through our install script, but they can be
checked out individually through svn or downloaded on our download
page:
http://code.google.com/p/brown-ros-pkg/downloads/list
On your last point, I understand your reluctance to add *yet another*
dependency to the camera_stack and probe is very likely to generic to
be considered a part of a camera stack proper. Still, it is very
flexible and can be very useful for building imaging toolchains with
ROS. This should be even more true once the nodelet interface has
solidified.
_Trevor
On Thu, Mar 11, 2010 at 11:50 AM, Jack O'Quin <jack.oquin at gmail.com> wrote:
> On Wed, Mar 10, 2010 at 11:00 AM, Trevor Jay <tjay at cs.brown.edu> wrote:
>> As long as the 1394 camera in question appears as a "normal" firewire
>> camera (i.e. it's not a Swiss Ranger or other such device), the Brown
>> ROS Pkg has a package named "probe" (soon to be renamed
>> "gstreamer_camera") that may suit your needs. It plugs into a
>> gstreamer pipeline and publishes the images to a ROS image transport.
>> Gstreamer has firewire support, so you should be able to build an
>> appropriate pipeline and get the image stream you want. There might be
>> issues with accessing the camera/image settings, but it could be a
>> stopgap solution provided the camera(s) you want to use aren't too
>> exotic.
>>
>> I mention it because probe has very few dependencies (except for the
>> Gstreamer library and plugins). Currently, probe depends only on
>> image_transport and sensor_msgs.
>
> Thanks for the suggestion, Trevor. I took a look at on Google code. Is
> the version in trunk/unstable/probe the current version? I see other
> similar packages in different parts of the tree.
>
> A few minutes looking at gstreamer docs suggests that it supports
> Digital Video 1394, but not Digital Camera 1394. Is that correct?
>
> My naive understanding is that DV is a different class of devices from
> DC speaking a different protocol (although both use the 1394 bus to
> transfer data). I am looking for a DC driver.
>
> Do some people have a requirement for DV, too? Shouldn't that be a
> different driver?
>
> Pardon me if these questions are silly, but I would be reluctant to
> add a future dependency on gstreamer to the camera_drivers stack
> without a better understanding of the issues.
>
> Regards,
> --
> joq
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
More information about the ros-users
mailing list