Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
follow_me.c File Reference
#include "modules/stereocam/stereocam_follow_me/follow_me.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

static void changeRollYawPhase (int *phaseCounterArg, int *isRollPhaseArg, int *isYawPhaseArg)
 
static void increase_nav_heading (int32_t *heading, int32_t increment)
 
void follow_me (uint8_t headingToFollow, uint8_t heightObject, uint8_t distanceToObject)
 

Variables

float ref_pitch = 0.0
 
float ref_roll = 0.0
 
float selfie_alt = 1.0
 

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

◆ CENTER_IMAGE_HOR

#define CENTER_IMAGE_HOR   65

Definition at line 27 of file follow_me.c.

◆ HEADING_CHANGE_PER_MEASUREMENT

#define HEADING_CHANGE_PER_MEASUREMENT   260

Definition at line 26 of file follow_me.c.

◆ MAXIMUM_ALTITUDE_FOLLOWING

#define MAXIMUM_ALTITUDE_FOLLOWING   3.0

Definition at line 28 of file follow_me.c.

◆ MINIMUM_ALTITUDE_FOLLOWING

#define MINIMUM_ALTITUDE_FOLLOWING   1.0

Definition at line 29 of file follow_me.c.

◆ STEREOCAM_FOLLOW_ME_USE_OPTITRACK

#define STEREOCAM_FOLLOW_ME_USE_OPTITRACK   FALSE

Definition at line 23 of file follow_me.c.

Function Documentation

◆ changeRollYawPhase()

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

Definition at line 35 of file follow_me.c.

Referenced by follow_me().

+ Here is the caller graph for this function:

◆ follow_me()

void follow_me ( uint8_t  headingToFollow,
uint8_t  heightObject,
uint8_t  distanceToObject 
)

◆ increase_nav_heading()

static void increase_nav_heading ( int32_t heading,
int32_t  increment 
)
static

Definition at line 57 of file follow_me.c.

References heading.

Referenced by follow_me().

+ Here is the caller graph for this function:

Variable Documentation

◆ ref_pitch

float ref_pitch = 0.0

Definition at line 31 of file follow_me.c.

Referenced by follow_me().

◆ ref_roll

float ref_roll = 0.0

Definition at line 32 of file follow_me.c.

Referenced by follow_me().

◆ selfie_alt

float selfie_alt = 1.0

Definition at line 33 of file follow_me.c.

Referenced by follow_me().