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
follow_me.c File Reference
#include "modules/stereocam/stereocam_follow_me/follow_me.h"
#include "modules/stereocam/stereocam.h"
#include "state.h"
#include "navigation.h"
#include "subsystems/datalink/telemetry.h"
#include "generated/flight_plan.h"
+ Include dependency graph for follow_me.c:

Go to the source code of this file.

Macros

#define STEREOCAM_FOLLOW_ME_USE_OPTITRACK   FALSE
 
#define HEADING_CHANGE_PER_MEASUREMENT   260
 
#define CENTER_IMAGE_HOR   65
 
#define MAXIMUM_ALTITUDE_FOLLOWING   3.0
 
#define MINIMUM_ALTITUDE_FOLLOWING   1.0
 

Functions

void changeRollYawPhase (int *phaseCounterArg, int *isRollPhaseArg, int *isYawPhaseArg)
 
void increase_nav_heading (int32_t *heading, int32_t increment)
 Increases the NAV heading. More...
 
void follow_me_periodic ()
 

Variables

float ref_pitch = 0.0
 
float ref_roll = 0.0
 
float selfie_alt = 1.0
 
int breaksPoints = 0
 
int isRollPhase = 0
 
int isYawPhase = 0
 
int phaseCounter = 0
 
float heightGain = 0.3
 
int amountOfRollPhaseTime = 15
 
int amountOfYawPhaseTime = 15
 
uint8_t distanceToObject
 
uint8_t heightObject
 

Detailed Description

Author
Roland Follows a person using the reference given by the stereocam. This module does so by changing the yaw angle and roll angle alternatively. This way the drone does not drift away, and keeps looking at the person it tries to follow.

Definition in file follow_me.c.

Macro Definition Documentation

#define CENTER_IMAGE_HOR   65

Definition at line 28 of file follow_me.c.

Referenced by follow_me_periodic().

#define HEADING_CHANGE_PER_MEASUREMENT   260

Definition at line 27 of file follow_me.c.

Referenced by follow_me_periodic().

#define MAXIMUM_ALTITUDE_FOLLOWING   3.0

Definition at line 29 of file follow_me.c.

Referenced by follow_me_periodic().

#define MINIMUM_ALTITUDE_FOLLOWING   1.0

Definition at line 30 of file follow_me.c.

Referenced by follow_me_periodic().

#define STEREOCAM_FOLLOW_ME_USE_OPTITRACK   FALSE

Definition at line 23 of file follow_me.c.

Referenced by follow_me_periodic().

Function Documentation

void changeRollYawPhase ( int *  phaseCounterArg,
int *  isRollPhaseArg,
int *  isYawPhaseArg 
)

Definition at line 45 of file follow_me.c.

References amountOfRollPhaseTime, and amountOfYawPhaseTime.

Referenced by follow_me_periodic().

+ Here is the caller graph for this function:

void increase_nav_heading ( int32_t heading,
int32_t  increment 
)

Increases the NAV heading.

Assumes heading is an INT32_ANGLE. It is bound in this function.

Definition at line 65 of file follow_me.c.

References INT32_ANGLE_NORMALIZE.

Referenced by follow_me_periodic().

+ Here is the caller graph for this function:

Variable Documentation

int amountOfRollPhaseTime = 15

Definition at line 39 of file follow_me.c.

Referenced by changeRollYawPhase().

int amountOfYawPhaseTime = 15

Definition at line 40 of file follow_me.c.

Referenced by changeRollYawPhase().

int breaksPoints = 0

Definition at line 34 of file follow_me.c.

uint8_t distanceToObject

Definition at line 41 of file follow_me.c.

Referenced by follow_me_periodic().

float heightGain = 0.3

Definition at line 38 of file follow_me.c.

Referenced by follow_me_periodic().

uint8_t heightObject

Definition at line 42 of file follow_me.c.

Referenced by follow_me_periodic().

int isRollPhase = 0

Definition at line 35 of file follow_me.c.

Referenced by follow_me_periodic().

int isYawPhase = 0

Definition at line 36 of file follow_me.c.

Referenced by follow_me_periodic().

int phaseCounter = 0

Definition at line 37 of file follow_me.c.

Referenced by follow_me_periodic().

float ref_pitch = 0.0

Definition at line 31 of file follow_me.c.

Referenced by follow_me_periodic().

float ref_roll = 0.0

Definition at line 32 of file follow_me.c.

Referenced by follow_me_periodic().

float selfie_alt = 1.0

Definition at line 33 of file follow_me.c.

Referenced by follow_me_periodic().