30#include "generated/airframe.h"
36#define ORANGE_AVOIDER_VERBOSE TRUE
38#define PRINT(string,...) fprintf(stderr, "[orange_avoider_guided->%s()] " string,__FUNCTION__ , ##__VA_ARGS__)
39#if ORANGE_AVOIDER_VERBOSE
40#define VERBOSE_PRINT PRINT
42#define VERBOSE_PRINT(...)
72#ifndef ORANGE_AVOIDER_VISUAL_DETECTION_ID
73#error This module requires two color filters, as such you have to define ORANGE_AVOIDER_VISUAL_DETECTION_ID to the orange filter
74#error Please define ORANGE_AVOIDER_VISUAL_DETECTION_ID to be COLOR_OBJECT_DETECTION1_ID or COLOR_OBJECT_DETECTION2_ID in your airframe
85#ifndef FLOOR_VISUAL_DETECTION_ID
86#error This module requires two color filters, as such you have to define FLOOR_VISUAL_DETECTION_ID to the orange filter
87#error Please define FLOOR_VISUAL_DETECTION_ID to be COLOR_OBJECT_DETECTION1_ID or COLOR_OBJECT_DETECTION2_ID in your airframe
211 if (
rand() % 2 == 0) {
Main include for ABI (AirBorneInterface).
Event structure to store callbacks in a linked list.
static struct FloatEulers * stateGetNedToBodyEulers_f(void)
Get vehicle body attitude euler angles (float).
struct FloatVect3 speed_sp
#define ORANGE_AVOIDER_VISUAL_DETECTION_ID
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)
#define VERBOSE_PRINT(...)
uint8_t chooseRandomIncrementAvoidance(void)
static abi_event color_detection_ev
static void floor_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)
void orange_avoider_guided_periodic(void)
float oag_floor_count_frac
float avoidance_heading_direction
static abi_event floor_detection_ev
int16_t obstacle_free_confidence
float oag_color_count_frac
const int16_t max_trajectory_confidence
@ SEARCH_FOR_SAFE_HEADING
void orange_avoider_guided_init(void)
void guidance_h_set_heading(float heading)
Set heading setpoint.
struct HorizontalGuidance guidance_h
void guidance_h_set_body_vel(float vx, float vy)
Set body relative horizontal velocity setpoint.
void guidance_h_set_heading_rate(float rate)
Set heading rate setpoint.
Horizontal guidance for rotorcrafts.
#define GUIDANCE_H_MODE_GUIDED
API to get/set the generic vehicle states.
int int32_t
Typedef defining 32 bit int type.
short int16_t
Typedef defining 16 bit short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
navigation_state
Camera focal length, in pixels (i.e. distance between camera.