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
stereocam_state2camera module

Writes rotation to the uart bus

Meant for sending the rotation to the ODROID board or to the stereo camera boards. Can be used to improve vision algorithms. The protocol that is used is the stereocommunication protocol.

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="stereocam_state2camera">
2  <configure name="STEREO_UART" value="UARTX" />
3  <configure name="STEREO_BAUD" value="BXXXXX" />
4 </module>

Module configuration options

Configure Options

  • name: STEREO_UART value: UARTX
    Description: Sets the UART port number of the connected camera (required)
  • name: STEREO_BAUD value: BXXXXX
    Description: Sets the BAUD rate of the connected camera (required: must be same as camera)

Module functions

Periodic Functions

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

  • write_serial_rot()
    • Frequency in Hz: 512.
    • 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 stereocam_state2camera.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="stereocam_state2camera" dir="stereocam">
<doc>
<description>Writes rotation to the uart bus. Meant for sending the rotation
to the ODROID board or to the stereo camera boards.
Can be used to improve vision algorithms.
The protocol that is used is the stereocommunication protocol.
</description>
<configure name="STEREO_UART" value="UARTX" description="Sets the UART port number of the connected camera (required)"/>
<configure name="STEREO_BAUD" value="BXXXXX" description="Sets the BAUD rate of the connected camera (required: must be same as camera)"/>
</doc>
<header>
<file name="state2camera/state2camera.h"/>
</header>
<periodic fun="write_serial_rot()" freq="512."/>
<makefile>
<file name="state2camera/state2camera.c"/>
<file name="stereoprotocol.c" dir="modules/stereocam"/>
<configure name="STEREO_UART" case="upper|lower"/>
<define name="USE_$(STEREO_UART_UPPER)"/>
<define name="UART_LINK" value="$(STEREO_UART_LOWER)"/>
<define name="$(STEREO_UART_UPPER)_BAUD" value="$(STEREO_BAUD)"/>
</makefile>
</module>