Webcam to Face Example

From sdk-wiki
Jump to: navigation, search

WARNING: This page appears to have outdated information. Please update it if you are aware of how to install gscam in ROS Indigo. Otherwise, the information here is likely no longer of use.

This is a pywb Test. The idea is just to get your webcam into a ROS standard sensor_msgs/Image message, and then publish it on /robot/xdisplay, which takes Image messages and puts them on a screen.

Install and Run

To get the webcam image as a ROS sensor_msgs/Image, we use a library called gscam from Brown's perception library:

    $ sudo apt-get install ros-groovy-brown-perception

To just get it to run:

    $ cd ~/ros_ws/
    $ ./
    $ roscd gscam
    $ cd bin
    #Find webcam device path
    $ ls /dev/video*
    $ export GSCAM_CONFIG="v4l2src device=/dev/video0 ! video/x-raw-rgb,framerate=30/1 ! ffmpegcolorspace"
    $ rosrun gscam gscam /gscam/image_raw:=/robot/xdisplay


The steps are, from an init'd environment, cd to the new package, figure out what webcams are connected and setup your configuration appropriately, then start the streamer with a topic remapping from the standard topic it publishes webcam images on to the receiving xdisplay topic for Baxter's screen.