Paparazzi UAS  v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
orange_avoider module

Avoid all objects that are orange!

This example module shows how you can use the camera stream and colorfilter to detect orange objects. By adding this module to your flightplan and flying in the cyberzoo with the flightplan TUDELFT/tudelft_course2016_avoid_orange_cyberzoo.xml you will avoid every obstacle that is orange.

Example for airframe file

Add to your firmware section:

1 <module name="cv_colorfilter.xml"/>
2 <module name="orange_avoider"/>

Dependencies

  • module__cv_colorfilter_xml

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.

  • orange_avoider_periodic()
    • Frequency in Hz: 4
    • Autorun: LOCK
      Periodic function automatically starts after init and can't be stopped.

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw orange_avoider.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="orange_avoider">
<doc>
<description>
Avoid all objects that are orange!
This example module shows how you can use the camera stream and colorfilter to detect orange objects.
By adding this module to your flightplan and flying in the cyberzoo with the flightplan TUDELFT/tudelft_course2016_avoid_orange_cyberzoo.xml you will avoid every obstacle that is orange.
</description>
</doc>
<depends>cv_colorfilter.xml</depends>
<header>
<file name="orange_avoider.h"/>
</header>
<init fun="orange_avoider_init()"/>
<periodic fun="orange_avoider_periodic()" freq="4"/>
<makefile target="ap">
<file name="orange_avoider.c"/>
</makefile>
</module>