|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
22 #include "generated/airframe.h"
28 #define NAV_C // needed to get the nav functions like Inside...
29 #include "generated/flight_plan.h"
31 #define ORANGE_AVOIDER_VERBOSE TRUE
33 #define PRINT(string,...) fprintf(stderr, "[orange_avoider->%s()] " string,__FUNCTION__ , ##__VA_ARGS__)
34 #if ORANGE_AVOIDER_VERBOSE
35 #define VERBOSE_PRINT PRINT
37 #define VERBOSE_PRINT(...)
72 #ifndef ORANGE_AVOIDER_VISUAL_DETECTION_ID
73 #define ORANGE_AVOIDER_VISUAL_DETECTION_ID ABI_BROADCAST
77 int16_t __attribute__((unused)) pixel_x,
int16_t __attribute__((unused)) pixel_y,
78 int16_t __attribute__((unused)) pixel_width,
int16_t __attribute__((unused)) pixel_height,
216 VERBOSE_PRINT(
"Calculated %f m forward position. x: %f y: %f based on pos(%f, %f) and heading(%f)\n", distanceMeters,
239 if (rand() % 2 == 0) {
const int16_t max_trajectory_confidence
#define ORANGE_AVOIDER_VISUAL_DETECTION_ID
#define FLOAT_ANGLE_NORMALIZE(_a)
float oa_color_count_frac
static void color_detection_cb(uint8_t sender_id, int16_t pixel_x, int16_t pixel_y, int16_t pixel_width, int16_t pixel_height, int32_t quality, int16_t extra)
int16_t obstacle_free_confidence
static uint8_t calculateForwards(struct EnuCoor_i *new_coor, float distanceMeters)
static struct EnuCoor_f * stateGetPositionEnu_f(void)
Get position in local ENU coordinates (float).
static struct EnuCoor_i * stateGetPositionEnu_i(void)
Get position in local ENU coordinates (int).
Event structure to store callbacks in a linked list.
static struct FloatEulers * stateGetNedToBodyEulers_f(void)
Get vehicle body attitude euler angles (float).
#define POS_FLOAT_OF_BFP(_ai)
static uint8_t increase_nav_heading(float incrementDegrees)
int32_t nav_heading
with INT32_ANGLE_FRAC
navigation_state
Camera focal length, in pixels (i.e. distance between camera.
bool autopilot_in_flight(void)
get in_flight flag
void orange_avoider_init(void)
static uint8_t chooseRandomIncrementAvoidance(void)
#define ANGLE_BFP_OF_REAL(_af)
static abi_event color_detection_ev
void waypoint_move_here_2d(uint8_t wp_id)
void orange_avoider_periodic(void)
void waypoint_move_xy_i(uint8_t wp_id, int32_t x, int32_t y)
static uint8_t moveWaypoint(uint8_t waypoint, struct EnuCoor_i *new_coor)
uint16_t f
Camera baseline, in meters (i.e. horizontal distance between the two cameras of the stereo setup)
@ SEARCH_FOR_SAFE_HEADING
#define VERBOSE_PRINT(...)
static uint8_t moveWaypointForward(uint8_t waypoint, float distanceMeters)
#define POS_BFP_OF_REAL(_af)
vector in East North Up coordinates