|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
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
78 int16_t __attribute__((unused)) pixel_x,
int16_t __attribute__((unused)) pixel_y,
79 int16_t __attribute__((unused)) pixel_width,
int16_t __attribute__((unused)) pixel_height,
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
92 int16_t __attribute__((unused)) pixel_width,
int16_t __attribute__((unused)) pixel_height,
148 if (
floor_count < floor_count_threshold || fabsf(floor_centroid_frac) > 0.12){
211 if (rand() % 2 == 0) {
struct FloatVect3 speed_sp
int16_t obstacle_free_confidence
float avoidance_heading_direction
#define GUIDANCE_H_MODE_GUIDED
Event structure to store callbacks in a linked list.
static struct FloatEulers * stateGetNedToBodyEulers_f(void)
Get vehicle body attitude euler angles (float).
void orange_avoider_guided_init(void)
float oag_floor_count_frac
const int16_t max_trajectory_confidence
navigation_state
Camera focal length, in pixels (i.e. distance between camera.
void orange_avoider_guided_periodic(void)
static abi_event color_detection_ev
#define VERBOSE_PRINT(...)
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)
#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)
bool guidance_h_set_guided_body_vel(float vx, float vy)
Set body relative horizontal velocity setpoint in GUIDED mode.
float oag_color_count_frac
bool guidance_h_set_guided_heading(float heading)
Set heading setpoint in GUIDED mode.
uint16_t f
Camera baseline, in meters (i.e. horizontal distance between the two cameras of the stereo setup)
@ SEARCH_FOR_SAFE_HEADING
struct HorizontalGuidance guidance_h
uint8_t chooseRandomIncrementAvoidance(void)
static abi_event floor_detection_ev
bool guidance_h_set_guided_heading_rate(float rate)
Set heading rate setpoint in GUIDED mode.