Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
wedgebug.h File Reference
#include <stdint.h>
#include "modules/computer_vision/lib/vision/image.h"
+ Include dependency graph for wedgebug.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  kernel_C1
 

Functions

void wedgebug_init (void)
 
void wedgebug_periodic (void)
 
void post_disparity_crop_rect (struct crop_t *_img_cropped_info, struct img_size_t *_original_img_dims, const int disp_n, const int block_size)
 
void set_state (uint8_t _state, uint8_t change_allowed)
 
void kernel_create (struct kernel_C1 *kernel, uint16_t width, uint16_t height, enum image_type type)
 
void kernel_free (struct kernel_C1 *kernel)
 
uint8_t getMedian (uint8_t *a, uint32_t n)
 

Variables

int N_disparities
 Variable that saves previous mode to control the drone, for some memory. More...
 
int block_size_disparities
 Number of disparity levels (0-this number) More...
 
int min_disparity
 Block size used for the block matching (SBM) function. More...
 
int max_disparity
 
uint16_t K_median_h
 Width of kernel for the median kernel. More...
 
uint16_t K_median_w
 SE size for the Sobel operation, to detect edges. More...
 
int SE_opening_OCV
 
int SE_closing_OCV
 SE size for the opening operation. More...
 
int SE_dilation_OCV_1
 SE size for the closing operation. More...
 
int SE_dilation_OCV_2
 SE size for the first dilation operation. More...
 
int SE_erosion_OCV
 SE size for the second dilation operation (see state 3 "WEDGEBUG_START" and state 6 "POSITION_EDGE" ) More...
 
uint16_t threshold_median_depth
 Below this distance (in meters) it is considered that the robot has reached the goal, in DIRECT_CONTROL mode. More...
 
uint16_t threshold_depth_of_edges
 Below this median depth (cm), an obstacle is considered to block the way (i.e. the blocking obstacle needs to be close) More...
 
int threshold_edge_magnitude
 Below this depth (cm) edges are eligible for the WedgeBug algorith. More...
 
float threshold_distance_to_goal
 Above this disparity edges are eligible for WedgeBug algorithm (i.e. edges cannot be very far away) More...
 
float threshold_distance_to_angle
 Below this distance (in meters) it is considered that the robot has reached the goal. More...
 
int16_t max_obstacle_confidence
 This is the confidence that no edge was found. More...
 
int16_t max_free_path_confidence
 This is the max confidence that an obstacle was spotted. More...
 
int16_t max_position_confidence
 This is the max confidence that an obstacle was not spotted. More...
 
int16_t max_heading_confidence
 This is the max confidence that a specific position was reached. More...
 
int16_t max_edge_found_micro_confidence
 This is the max confidence that a specific heading was reached. More...
 
int16_t max_edge_found_macro_confidence
 This is the max confidence that edges (micro-see above) were found. More...
 
int16_t max_no_edge_found_confidence
 This is the max confidence that edges (macro-see above were found. More...
 
int heat_map_type
 Variable to hold distance from robot to edge to goal (used in EDGE_SCAN (9) state) More...
 
uint8_t save_images_flag
 Set to 1 if control mode of drone is changed, 0 otherwise. More...
 

Detailed Description

Author
Ralph Rudi schmidt ralph.nosp@m..r.s.nosp@m.chmid.nosp@m.t@ou.nosp@m.tlook.nosp@m..com An integration of the WegdeBug algorithm (Laubach 1999) for path finding, for drones with stereo vision.

Note.

  1. Information on different flight modes (such as AP_MODE_GUIDED) can be found here paparazzi/sw/airborne/firmwares/rotorcraft/autopilot_static.h
  2. When starting paparazzi and joystick is selected, the autopilot will start in the mode AP_MODE_ATTITUDE_DIRECT 4 (but engines are off)
  3. When pressing circle on the dual shock 4 controller you activate the manual control mode AP_MODE_ATTITUDE_Z_HOLD 9
  4. When pressing x on the dual shock 4 controller you activate the manual control mode AP_MODE_ATTITUDE_DIRECT 4
Author
Ralph Rudi schmidt ralph.nosp@m..r.s.nosp@m.chmid.nosp@m.t@ou.nosp@m.tlook.nosp@m..com An integration of the WegdeBug algorithm (Laubach 1999) for path finding, for drones with stereo vision.

Definition in file wedgebug.h.


Data Structure Documentation

◆ kernel_C1

struct kernel_C1

Definition at line 42 of file wedgebug.h.

Data Fields
uint32_t buf_size Size of values of weight buffer and values buffer.
void * buf_values Kernel value buffer. These are the values underneath the kernel.
void * buf_weights Kernel weight buffer.
uint16_t h Kernel height.
enum image_type type
uint16_t w

Function Documentation

◆ getMedian()

uint8_t getMedian ( uint8_t a,
uint32_t  n 
)

◆ kernel_create()

void kernel_create ( struct kernel_C1 kernel,
uint16_t  width,
uint16_t  height,
enum image_type  type 
)

◆ kernel_free()

void kernel_free ( struct kernel_C1 kernel)

◆ post_disparity_crop_rect()

void post_disparity_crop_rect ( struct crop_t _img_cropped_info,
struct img_size_t _original_img_dims,
const int  disp_n,
const int  block_size 
)

Referenced by SBM_OCV().

+ Here is the caller graph for this function:

◆ set_state()

void set_state ( uint8_t  _state,
uint8_t  change_allowed 
)

◆ wedgebug_init()

void wedgebug_init ( void  )

◆ wedgebug_periodic()

void wedgebug_periodic ( void  )

Variable Documentation

◆ block_size_disparities

int block_size_disparities

Number of disparity levels (0-this number)

Definition at line 256 of file wedgebug.c.

◆ heat_map_type

int heat_map_type

Variable to hold distance from robot to edge to goal (used in EDGE_SCAN (9) state)

Definition at line 266 of file wedgebug.c.

◆ K_median_h

uint16_t K_median_h

Width of kernel for the median kernel.

Definition at line 113 of file wedgebug.c.

◆ K_median_w

uint16_t K_median_w

SE size for the Sobel operation, to detect edges.

Definition at line 112 of file wedgebug.c.

◆ max_disparity

int max_disparity

◆ max_edge_found_macro_confidence

int16_t max_edge_found_macro_confidence

This is the max confidence that edges (micro-see above) were found.

Definition at line 166 of file wedgebug.c.

◆ max_edge_found_micro_confidence

int16_t max_edge_found_micro_confidence

This is the max confidence that a specific heading was reached.

Definition at line 165 of file wedgebug.c.

◆ max_free_path_confidence

int16_t max_free_path_confidence

This is the max confidence that an obstacle was spotted.

Definition at line 162 of file wedgebug.c.

◆ max_heading_confidence

int16_t max_heading_confidence

This is the max confidence that a specific position was reached.

Definition at line 164 of file wedgebug.c.

◆ max_no_edge_found_confidence

int16_t max_no_edge_found_confidence

This is the max confidence that edges (macro-see above were found.

Definition at line 167 of file wedgebug.c.

◆ max_obstacle_confidence

int16_t max_obstacle_confidence

This is the confidence that no edge was found.

Definition at line 161 of file wedgebug.c.

◆ max_position_confidence

int16_t max_position_confidence

This is the max confidence that an obstacle was not spotted.

Definition at line 163 of file wedgebug.c.

◆ min_disparity

int min_disparity

Block size used for the block matching (SBM) function.

Definition at line 257 of file wedgebug.c.

Referenced by CN_escape_velocity(), CN_potential_heading(), CN_potential_velocity(), CN_vector_escape_velocity(), and CN_vector_velocity().

◆ N_disparities

int N_disparities

Variable that saves previous mode to control the drone, for some memory.

Definition at line 255 of file wedgebug.c.

◆ save_images_flag

uint8_t save_images_flag

Set to 1 if control mode of drone is changed, 0 otherwise.

Definition at line 180 of file wedgebug.c.

◆ SE_closing_OCV

int SE_closing_OCV

SE size for the opening operation.

Definition at line 107 of file wedgebug.c.

◆ SE_dilation_OCV_1

int SE_dilation_OCV_1

SE size for the closing operation.

Definition at line 108 of file wedgebug.c.

◆ SE_dilation_OCV_2

int SE_dilation_OCV_2

SE size for the first dilation operation.

Definition at line 109 of file wedgebug.c.

◆ SE_erosion_OCV

int SE_erosion_OCV

SE size for the second dilation operation (see state 3 "WEDGEBUG_START" and state 6 "POSITION_EDGE" )

Definition at line 110 of file wedgebug.c.

◆ SE_opening_OCV

int SE_opening_OCV

Definition at line 106 of file wedgebug.c.

◆ threshold_depth_of_edges

uint16_t threshold_depth_of_edges

Below this median depth (cm), an obstacle is considered to block the way (i.e. the blocking obstacle needs to be close)

Below this median depth (cm), an obstacle is considered to block the way (i.e. the blocking obstacle needs to be close)

Definition at line 150 of file wedgebug.c.

◆ threshold_distance_to_angle

float threshold_distance_to_angle

Below this distance (in meters) it is considered that the robot has reached the goal.

Definition at line 146 of file wedgebug.c.

◆ threshold_distance_to_goal

float threshold_distance_to_goal

Above this disparity edges are eligible for WedgeBug algorithm (i.e. edges cannot be very far away)

Definition at line 145 of file wedgebug.c.

◆ threshold_edge_magnitude

int threshold_edge_magnitude

Below this depth (cm) edges are eligible for the WedgeBug algorith.

Below this depth (cm) edges are eligible for the WedgeBug algorith.

Definition at line 142 of file wedgebug.c.

◆ threshold_median_depth

uint16_t threshold_median_depth

Below this distance (in meters) it is considered that the robot has reached the goal, in DIRECT_CONTROL mode.

Definition at line 149 of file wedgebug.c.