Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
bebop_front_camera module

Video streaming for the Bebop front camera

No detailed description...

Example for airframe file

Add to your firmware section: This example contains all possible configuration options, not all of them are mandatory!

1 <module name="bebop_front_camera">
2  <define name="BEBOP_FRONT_CAMERA_SHOT_PATH" value="/data/ftp/internal_000/images" />
3  <configure name="BEBOP_FRONT_CAMERA_HOST" value="192.168.1.255" />
4  <configure name="BEBOP_FRONT_CAMERA_PORT_OUT" value="6000" />
5  <configure name="BEBOP_FRONT_CAMERA_BROADCAST" value="FALSE|TRUE" />
6 </module>

Module configuration options

Configure Options

  • name: BEBOP_FRONT_CAMERA_HOST value: 192.168.1.255
    Description: GCS IP (default: MODEM_HOST)
  • name: BEBOP_FRONT_CAMERA_PORT_OUT value: 6000
    Description: Port (default: 5000)
  • name: BEBOP_FRONT_CAMERA_BROADCAST value: FALSE|TRUE
    Description: Enable broadcast of image stream (default: TRUE)

Define Options

  • name: BEBOP_FRONT_CAMERA_SHOT_PATH value: /data/ftp/internal_000/images
    Description: Path where the images should be saved

Module functions

Init Functions

These initialization functions are called once on startup.

Periodic Functions

These functions are called periodically at the specified frequency from the module periodic loop.

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw bebop_front_camera.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="bebop_front_camera" dir="computer_vision">
<doc>
<description>
Video streaming for the Bebop front camera
</description>
<define name="BEBOP_FRONT_CAMERA_SHOT_PATH" value="/data/ftp/internal_000/images" description="Path where the images should be saved"/>
<configure name="BEBOP_FRONT_CAMERA_HOST" value="192.168.1.255" description="GCS IP (default: MODEM_HOST)"/>
<configure name="BEBOP_FRONT_CAMERA_PORT_OUT" value="6000" description="Port (default: 5000)"/>
<configure name="BEBOP_FRONT_CAMERA_BROADCAST" value="FALSE|TRUE" description="Enable broadcast of image stream (default: TRUE)"/>
</doc>
<settings>
<dl_settings>
<dl_settings name="video">
<dl_setting var="bebop_front_camera.take_shot" min="0" step="1" max="1" shortname="take_shot" module="computer_vision/bebop_front_camera" handler="take_shot">
<strip_button name="Shoot" icon="digital-camera.png" value="1" group="video"/>
</dl_setting>
</dl_settings>
</dl_settings>
</settings>
<header>
<file name="bebop_front_camera.h"/>
</header>
<init fun="bebop_front_camera_init()"/>
<periodic fun="bebop_front_camera_periodic()" freq="1" start="bebop_front_camera_start()" stop="bebop_front_camera_stop()" autorun="TRUE"/>
<makefile target="ap">
<file name="bebop_front_camera.c"/>
<!-- Include the needed Computer Vision files -->
<include name="modules/computer_vision"/>
<file name="image.c" dir="modules/computer_vision/lib/vision"/>
<file name="v4l2.c" dir="modules/computer_vision/lib/v4l"/>
<file name="jpeg.c" dir="modules/computer_vision/lib/encoding"/>
<file name="rtp.c" dir="modules/computer_vision/lib/encoding"/>
<!-- Random flags -->
<define name="__USE_GNU"/>
<flag name="LDFLAGS" value="lrt"/>
<flag name="LDFLAGS" value="static-libgcc"/>
<raw>
include $(CFG_SHARED)/udp.makefile
BEBOP_FRONT_CAMERA_HOST ?= $(MODEM_HOST)
BEBOP_FRONT_CAMERA_PORT_OUT ?= 6000
BEBOP_FRONT_CAMERA_BROADCAST ?= TRUE
BEBOPVIEWVID_CFLAGS = -DBEBOP_FRONT_CAMERA_HOST=$(BEBOP_FRONT_CAMERA_HOST) -DBEBOP_FRONT_CAMERA_PORT_OUT=$(BEBOP_FRONT_CAMERA_PORT_OUT)
ifeq ($(BEBOP_FRONT_CAMERA_USE_NETCAT),)
ap.CFLAGS += $(BEBOPVIEWVID_CFLAGS) -DBEBOP_FRONT_CAMERA_BROADCAST=$(BEBOP_FRONT_CAMERA_BROADCAST)
else
ap.CFLAGS += $(BEBOPVIEWVID_CFLAGS) -DBEBOP_FRONT_CAMERA_USE_NETCAT
endif
</raw>
</makefile>
<makefile target="nps">
<file name="BEBOP_FRONT_CAMERA_nps.c"/>
</makefile>
</module>