Home

Awesome

GStreamer Camera Driver for CARMA

This is a fork of the ROS GSCam package that is used for broadcasting any GStreamer-based video stream via the standard ROS Camera API. This fork has been modified to allow for building a Docker image that can serve as a camera driver for the CARMA Platform.

GStreamer Library Support

This driver supports the following versions of GStreamer:

0.10.x: Deprecated

1.x: Default

Ubuntu 20.04 Installation

Assuming the CARMA Platform is installed at ~/carma_ws/src,

cd ~/carma_ws/src
git clone https://github.com/VT-ASIM-LAB/gstreamer_camera_driver.git
cd gstreamer_camera_driver/docker
sudo ./build-image.sh -d

After the Docker image is successfully built, add the following lines to the appropriate docker-compose.yml file in the carma-config directory.

gstreamer-camera-driver:
  image: usdotfhwastoldev/carma-gstreamer-camera-driver:develop
  container_name: gstreamer-camera-driver
  network_mode: host
  volumes_from:
    - container:carma-config:ro
  environment:
    - ROS_IP=127.0.0.1
  volumes:
    - /opt/carma/logs:/opt/carma/logs
    - /opt/carma/.ros:/home/carma/.ros
    - /opt/carma/vehicle/calibration:/opt/carma/vehicle/calibration
  command: bash -c '. ./devel/setup.bash && export ROS_NAMESPACE=$${CARMA_INTR_NS} && wait-for-it.sh localhost:11311 -- roslaunch /opt/carma/vehicle/config/drivers.launch drivers:=gstreamer_camera'

Finally, add the following lines to the drivers.launch file in the same directory as docker-compose.yml.

<include if="$(arg gstreamer_camera)" file="$(find gscam_driver)/launch/left_imx390.launch">
</include>

left_imx390.launch is used as an example here and can be replaced with any other launch file in the gstreamer_camera_driver/launch directory.

ROS API

gscam_driver

This can be run as both a node and a nodelet.

Nodes

Published Topics

Publication frequencies are given for a Leopard Imaging LI-IMX390-GMSL2 camera operating at a resolution of 1920x1080 at 30 frames per second (fps).

Subscribed Topics

N/A

Services

Parameters

Examples

See the example launch files in the gstreamer_camera_driver/launch directory. Each launch file launches a Leopard Imaging LI-IMX390-GMSL2 camera connected via a TCP/IP connection.

Original GSCam Documentation Build Status

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 can be built both in a rosbuild and catkin workspaces.

GStreamer Library Support

gscam supports the following versions of GStreamer

0.1.x: Default

Install dependencies via rosdep.

1.0.x: Experimental

Dependencies:

Ubuntu Install

12.04

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

14.04

sudo apt-get install gstreamer1.0-tools libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1.0-dev

Usage:

Notes:

ROS API (stable)

gscam

This can be run as both a node and a nodelet.

Nodes

Topics

Services

Parameters

C++ API (unstable)

The gscam c++ library can be used, but it is not guaranteed to be stable.

Examples

See example launchfiles and configs in the examples directory. Currently there are examples for: