NaoAV

Introduction

The NaoA/V setup is a hack that allows to
  • transmit camera images and audio buffers from the Nao robot to a different node
  • synchronize audio and video data streams
  • store the synchronized audio/video stream in a container file

It consists of several components:

  • On the Nao robot
    • rsbvideosender
    • rsbaudiosender
  • In a receiver/synchronization/store process on a workstation
    • gst_nao_audio_import
    • gst_nao_video_import

Static View

Implementation

The implementation uses the GStreamer multimedia framework to synchronize, mux and store the audio and video streams. GStreamer is capable of aligning and synchronizing the audio and video streams which are received via RSB and producing a merged A/V stream that is suitable for writing to a video container file. In order to perform this synchronization, GStreamer makes use of the timestamps which are included in all RSB events.

The abovementioned processing pipeline can be instantiated from the commandline as follows:

gst-launch-0.10                                            \
  audiotestsrc do-timestamp=FALSE                                \
  ! rsb_nao_audio_import pubName="/nao/audio/all"                        \
  ! queue                                            \
  ! "audio/x-raw-int", channels=2, width=16, depth=16, signed=TRUE, rate=48000, endianess=4321    \
  ! audiorate                                            \
  ! mux. videotestsrc do-timestamp=FALSE                            \
  ! rsb_nao_video_import pubName="/nao/vision/top"                        \
  ! queue                                            \
  ! videorate                                            \
  ! 'video/x-raw-yuv,width=320,height=240,framerate=20/1'                    \
  ! mux. avimux name="mux"                                    \
  ! filesink location="/tmp/bla.avi"    

The pipeline uses the following audio and video parameters

Audio:
Parameter Value
Channels 2 (out of 4 Nao microphones)
Bits per sample 16
Sample rate 48 kHz
Video:
Parameter Value
Width 320 px
Height 240 px
Frame rate 20 Hz
Colorspace YUV
Pixel Format YV12

nao-import.tar.gz (9.54 KB) J. Moringen, 07/05/2011 07:11 PM

nao-rsb.tar.gz (48.4 KB) J. Moringen, 07/05/2011 07:11 PM

static-view.png (27 KB) J. Moringen, 07/05/2011 07:20 PM

static-view.svg (65.7 KB) J. Moringen, 07/05/2011 07:20 PM

pipeline.svg (47.4 KB) J. Moringen, 07/06/2011 01:02 AM

pipeline.png (27.7 KB) J. Moringen, 07/06/2011 01:05 AM