This is a ROS package originally developed by the Brown Robotics
Lab for broadcasting any
GStreamer-based video stream via the
standard ROS Camera API. This fork has
several fixes incorporated into it to make it broadcast correct
sensor_msgs/Image
messages with proper frames and timestamps. It also allows
for more ROS-like configuration and more control over the GStreamer interface.
Note that this pacakge now only supports building in catkin workspaces.
gscam supports the following versions of GStreamer
Install dependencies via rosdep
.
- gstreamer1.0-tools
- libgstreamer1.0-dev
- libgstreamer-plugins-base1.0-dev
- libgstreamer-plugins-good1.0-dev
Ubuntu Install:
sudo add-apt-repository ppa:gstreamer-developers/ppa
sudo apt-get install gstreamer1.0-tools libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1.0-dev
sudo apt-get install gstreamer1.0-tools libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1.0-dev
- Use the CMake flag
-DGSTREAMER_VERSION_1_x=On
when building - See the Video4Linux2 launchfile example for an example of the differences in the GStreamer config lines
- This has been tested with
v4l2src
This can be run as both a node and a nodelet.
gscam
camera/image_raw
camera/camera_info
camera/set_camera_info
~camera_name
: The name of the camera (corresponding to the camera info -camera_name/
replacescamera/
in the topic list)~camera_info_url
: A url (file://path/to/file
,package://pkg_name/path/to/file
) to the camera calibration file.~gscam_config
: The GStreamer configuration string.~frame_id
: The TF frame ID.~reopen_on_eof
: Re-open the stream if it ends (EOF).~sync_sink
: Synchronize the app sink (sometimes setting this tofalse
can resolve problems with sub-par framerates).
The gscam c++ library can be used, but it is not guaranteed to be stable.
See example launchfiles and configs in the examples directory. Currently there are examples for:
- Video4Linux2: Standard
video4linux-based cameras like
USB webcams.
- GST-1.0: Use the roslaunch argument
GST10:=True
for GStreamer 1.0 variant
- GST-1.0: Use the roslaunch argument
- Nodelet: Run a V4L-based camera in a nodelet
- Video File: Any videofile readable by GStreamer
- DeckLink:
BlackMagic
DeckLink SDI capture cards (note: this requires the
gst-plugins-bad
plugins) - [tdgigevsrc](launch/tdgigev.launch launch/tdgigev_bayer.launch) for GigeVision cameras. This requires the Teledyne DALSA GigE-V Source plugin for gstreamer-1.0