Paparazzi UAS
v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
|
Obstacle avoidance methods. More...
Go to the source code of this file.
Functions | |
void | serial_init (void) |
void | serial_update (void) |
void | serial_start (void) |
void | setAnglesMeasurements (float *anglesMeasurements, float *centersensorRad, float *fieldOfViewRad, uint16_t *size_matrix_local) |
void | pingpong_euler (float *distances_hor, float *horizontalAnglesMeasurements, int horizontalAmountOfMeasurements, float attitude_reference_pitch, float attitude_reference_roll, float dist_treshold) |
void | matrix_2_pingpong (float *distancesMeters, uint16_t *size_matrix, float *distances_hor) |
void | CN_matrix_Kalman_filter (void) |
void | CN_matrix_butterworth (void) |
void | CN_calculate_target (void) |
void | CN_potential_heading (void) |
void | CN_potential_velocity (void) |
void | CN_vector_velocity (void) |
void | CN_vector_escape_velocity (void) |
void | CN_escape_velocity (void) |
Variables | |
float | F1 |
float | F2 |
float | Cfreq |
float | Ko |
float | Kg |
float | Dist_offset |
int8_t | dis_treshold |
float | dx_ref |
float | dy_ref |
float | K_goal |
float | K_obst |
float | b_damp |
float | c1_oa |
float | c2_oa |
float | c3_oa |
float | c4_oa |
float | c5_oa |
float | kv |
float | epsilon |
Obstacle avoidance methods.
Definition in file obstacle_avoidance.h.
void CN_calculate_target | ( | void | ) |
Definition at line 321 of file obstacle_avoidance.c.
References current_pos, dx_ref, dy_ref, heading_goal_f, OA_method_flag, pos_diff, FloatEulers::psi, stateGetNedToBodyEulers_f(), stateGetPositionNed_f(), target, waypoint_rot, FloatVect2::x, NedCoor_f::x, FloatVect2::y, and NedCoor_f::y.
Referenced by serial_update().
void CN_escape_velocity | ( | void | ) |
Definition at line 1032 of file obstacle_avoidance.c.
References angle_hor_board, baseline, direction, FLOAT_ANGLE_NORMALIZE, focal, heading_goal_f, heading_goal_ref, new_heading, new_heading_old, obstacle_flag, pos_diff, FloatEulers::psi, ref_pitch, ref_roll, set_bias, size_matrix, speed_pot, stateGetNedToBodyEulers_f(), stereo_fow, VECT2_NORM2, vref_max, and waypoint_rot.
Referenced by serial_update().
void CN_matrix_butterworth | ( | void | ) |
Definition at line 295 of file obstacle_avoidance.c.
References butter_old, READimageBuffer_old, and size_matrix.
void CN_matrix_Kalman_filter | ( | void | ) |
Definition at line 263 of file obstacle_avoidance.c.
References A_kal, H_kal, Pest_new, Q_kal, R_kal, size_matrix, and Xest_new.
void CN_potential_heading | ( | void | ) |
Definition at line 404 of file obstacle_avoidance.c.
References angle_hor_board, b_damp, baseline, c1_oa, c2_oa, c3_oa, c4_oa, epsilon, FLOAT_ANGLE_NORMALIZE, focal, heading_goal_f, heading_goal_ref, K_goal, K_obst, kv, pos_diff, FloatEulers::psi, FloatRates::r, r_dot_new, size_matrix, speed_pot, stateGetBodyRates_f(), stateGetNedToBodyEulers_f(), stereo_fow, VECT2_NORM2, and vref_max.
Referenced by serial_update().
void CN_potential_velocity | ( | void | ) |
Definition at line 506 of file obstacle_avoidance.c.
References alpha_fil, angle_hor_board, b_damp, baseline, c1_oa, c2_oa, c3_oa, c4_oa, epsilon, FLOAT_ANGLE_NORMALIZE, focal, heading_goal_f, heading_goal_ref, K_goal, K_obst, kv, new_heading, pos_diff, FloatEulers::psi, FloatRates::r, r_dot_new, ref_pitch, size_matrix, speed_pot, stateGetBodyRates_f(), stateGetNedToBodyEulers_f(), stereo_fow, VECT2_NORM2, vmin, and vref_max.
Referenced by serial_update().
void CN_vector_escape_velocity | ( | void | ) |
Definition at line 777 of file obstacle_avoidance.c.
References angle_hor_board, Attractforce_goal, baseline, Cfreq, direction, Dist_offset, escape_flag, F1, F2, FLOAT_ANGLE_NORMALIZE, focal, heading_goal_f, heading_goal_ref, Kg, Ko, new_heading, new_heading_old, obstacle_flag, pos_diff, FloatEulers::psi, ref_pitch, ref_roll, repulsionforce_filter_flag, Repulsionforce_Kan, Repulsionforce_Used, set_bias, size_matrix, speed_pot, stateGetNedToBodyEulers_f(), stereo_fow, v_max, v_min, VECT2_NORM2, VECT3_ADD, VECT3_COPY, VECT3_SMUL, vref_max, waypoint_rot, FloatVect3::x, FloatVect3::y, and FloatVect3::z.
Referenced by serial_update().
void CN_vector_velocity | ( | void | ) |
Definition at line 590 of file obstacle_avoidance.c.
References angle_hor_board, Attractforce_goal, baseline, Cfreq, Dist_offset, F1, F2, focal, heading_goal_f, heading_goal_ref, hysteris_flag, Kg, Ko, pos_diff, FloatEulers::psi, ref_pitch, ref_roll, repulsionforce_filter_flag, Repulsionforce_Kan, Repulsionforce_Used, size_matrix, stateGetNedToBodyEulers_f(), stereo_fow, V_hys_high, V_hys_low, VECT2_NORM2, VECT3_ADD, VECT3_COPY, VECT3_SMUL, FloatVect3::x, FloatVect3::y, and FloatVect3::z.
Referenced by serial_update().
void matrix_2_pingpong | ( | float * | distancesMeters, |
uint16_t * | size_matrix, | ||
float * | distances_hor | ||
) |
Definition at line 237 of file obstacle_avoidance.c.
References AVOIDANCES_DISTANCES_HOR_COUNT.
Referenced by serial_update().
void pingpong_euler | ( | float * | distances_hor, |
float * | horizontalAnglesMeasurements, | ||
int | horizontalAmountOfMeasurements, | ||
float | attitude_reference_pitch, | ||
float | attitude_reference_roll, | ||
float | dist_treshold | ||
) |
Definition at line 357 of file obstacle_avoidance.c.
References ref_pitch, and ref_roll.
Referenced by serial_update().
void serial_init | ( | void | ) |
Definition at line 146 of file obstacle_avoidance.c.
References AVOIDANCE_AMOUNT_OF_BOARDS, AVOIDANCE_HEIGHT_IN_MEASUREMENT_VALUES, AVOIDANCE_WIDTH_IN_MEASUREMENT_VALUES, butter_old, Pest_new, and Xest_new.
void serial_start | ( | void | ) |
Definition at line 159 of file obstacle_avoidance.c.
void serial_update | ( | void | ) |
Definition at line 176 of file obstacle_avoidance.c.
References angle_hor_board, AVOIDANCE_AMOUNT_OF_BOARDS, CN_calculate_target(), CN_escape_velocity(), CN_potential_heading(), CN_potential_velocity(), CN_vector_escape_velocity(), CN_vector_velocity(), DefaultChannel, DefaultDevice, dist_treshold, distances_hor, LOGICBASED, matrix_2_pingpong(), OA_method_flag, PINGPONG, pingpong_euler(), POT_HEADING, POT_VEL, reference_pitch, reference_roll, SAFETYZONE, setAnglesMeasurements(), size_matrix, and stereo_fow.
void setAnglesMeasurements | ( | float * | anglesMeasurements, |
float * | centersensorRad, | ||
float * | fieldOfViewRad, | ||
uint16_t * | size_matrix_local | ||
) |
Definition at line 164 of file obstacle_avoidance.c.
Referenced by serial_update().
float b_damp |
Definition at line 110 of file obstacle_avoidance.c.
Referenced by CN_potential_heading(), and CN_potential_velocity().
float c1_oa |
Definition at line 113 of file obstacle_avoidance.c.
Referenced by CN_potential_heading(), and CN_potential_velocity().
float c2_oa |
Definition at line 114 of file obstacle_avoidance.c.
Referenced by CN_potential_heading(), and CN_potential_velocity().
float c3_oa |
Definition at line 115 of file obstacle_avoidance.c.
Referenced by CN_potential_heading(), and CN_potential_velocity().
float c4_oa |
Definition at line 116 of file obstacle_avoidance.c.
Referenced by CN_potential_heading(), and CN_potential_velocity().
float c5_oa |
Definition at line 117 of file obstacle_avoidance.c.
float Cfreq |
Definition at line 101 of file obstacle_avoidance.c.
Referenced by CN_vector_escape_velocity(), and CN_vector_velocity().
int8_t dis_treshold |
Definition at line 105 of file obstacle_avoidance.c.
float Dist_offset |
Definition at line 104 of file obstacle_avoidance.c.
Referenced by CN_vector_escape_velocity(), and CN_vector_velocity().
float dx_ref |
Definition at line 80 of file obstacle_avoidance.c.
Referenced by CN_calculate_target().
float dy_ref |
Definition at line 81 of file obstacle_avoidance.c.
Referenced by CN_calculate_target().
float epsilon |
Definition at line 119 of file obstacle_avoidance.c.
Referenced by CN_potential_heading(), and CN_potential_velocity().
float F1 |
Definition at line 99 of file obstacle_avoidance.c.
Referenced by CN_vector_escape_velocity(), and CN_vector_velocity().
float F2 |
Definition at line 100 of file obstacle_avoidance.c.
Referenced by CN_vector_escape_velocity(), and CN_vector_velocity().
float K_goal |
Definition at line 111 of file obstacle_avoidance.c.
Referenced by CN_potential_heading(), and CN_potential_velocity().
float K_obst |
Definition at line 112 of file obstacle_avoidance.c.
Referenced by CN_potential_heading(), and CN_potential_velocity().
float Kg |
Definition at line 103 of file obstacle_avoidance.c.
Referenced by CN_vector_escape_velocity(), and CN_vector_velocity().
float Ko |
Definition at line 102 of file obstacle_avoidance.c.
Referenced by CN_vector_escape_velocity(), and CN_vector_velocity().
float kv |
Definition at line 118 of file obstacle_avoidance.c.
Referenced by CN_potential_heading(), and CN_potential_velocity().