Offworld-Robotics / numbat_software

Off World Robotics NUMBAT Backend
5 stars 4 forks source link

Get camera feed playback working #51

Closed sbt-tbs closed 9 years ago

sbt-tbs commented 9 years ago

Possible useful resources if using gstreamer: introductory tutorial: http://bluwiki.com/go/GStreamer Example pipelines: http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines http://labs.isee.biz/index.php/Example_GStreamer_Pipelines http://noraisin.net/diary/?p=40

Basic tutorial: https://felipec.wordpress.com/2008/01/19/gstreamer-hello-world/

sbt-tbs commented 9 years ago

if using vlc to play video feed is viable option: command line to play output of webcam example: vlc v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 source: http://ubuntuforums.org/showthread.php?t=143732 there is about a 1 second delay from record to playback.

sbt-tbs commented 9 years ago

gstreamer pipeline to display webcam feed: gst-launch-0.10 autovideosrc ! video/x-raw-yuv,framerate=(fraction)30/1,width=640,height=480 ! ffmpegcolorspace ! autovideosink less than 1 second delay in display. source: http://www.commandlinefu.com/commands/view/3507/view-webcam-output-using-gstreamer-pipeline

hjed commented 9 years ago

hm, the gstreamer command here does not work for me

hjed commented 9 years ago

Actually it does half the time... (may be a virtuabox issue)

hjed commented 9 years ago

For now let just use this: on the robot side: roscd gscam cd bin export GSCAM_CONFIG="v4l2src device=/dev/video0 ! video/x-raw-rgb,framerate=30/1,height=480,width=640 ! ffmpegcolorspace"

rosrun gscam gscam

and on the groundstation side rosrun image_view image_view image:=/camera/image_raw

hjed commented 9 years ago

changing the framerate seems to break it