Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Guidance for the obstacle avoidance methods. More...
#include "std.h"
#include "modules/computer_vision/lib/v4l/v4l2.h"
#include "math/pprz_algebra_int.h"
Go to the source code of this file.
Data Structures | |
struct | opticflow_stab_t |
Enumerations | |
enum | oa_method { NO_OBSTACLE_AVOIDANCE , PINGPONG , POT_HEADING , POT_VEL , VECTOR , SAFETYZONE , LOGICBASED } |
Functions | |
void | guidance_module_enter (void) |
Entering the module (user switched to module) More... | |
void | guidance_module_run (bool in_flight) |
Main guidance loop. More... | |
void | OA_update (void) |
Update the controls based on a vision result. More... | |
Variables | |
struct opticflow_stab_t | opticflow_stab |
int8_t | filter_flag |
int8_t | repulsionforce_filter_flag |
oa_method | OA_method_flag |
int8_t | opti_speed_flag |
float | vref_max |
float | ref_pitch |
float | ref_roll |
float | r_dot_new |
float | speed_pot |
Guidance for the obstacle avoidance methods.
Definition in file guidance_OA.h.
struct opticflow_stab_t |
Definition at line 37 of file guidance_opticflow_hover.h.
Data Fields | ||
---|---|---|
struct Int32Eulers | cmd | The commands that are send to the hover loop. |
float | desired_vx | The desired velocity in the x direction (cm/s) |
float | desired_vy | The desired velocity in the y direction (cm/s) |
float | err_vx_int | The integrated velocity error in x direction (m/s) |
float | err_vy_int | The integrated velocity error in y direction (m/s) |
int32_t | phi_igain | The roll I gain on the err_vx_int. |
int32_t | phi_pgain | The roll P gain on the err_vx. |
int32_t | theta_igain | The pitch I gain on the err_vy_int. |
int32_t | theta_pgain | The pitch P gain on the err_vy. |
enum oa_method |
Enumerator | |
---|---|
NO_OBSTACLE_AVOIDANCE | |
PINGPONG | |
POT_HEADING | |
POT_VEL | |
VECTOR | |
SAFETYZONE | |
LOGICBASED |
Definition at line 52 of file guidance_OA.h.
void guidance_module_enter | ( | void | ) |
Entering the module (user switched to module)
Entering the module (user switched to module)
Definition at line 77 of file ctrl_module_innerloop_demo.c.
References autopilot_in_flight(), Stabilization::cmd, ctrl_module_demo_struct::cmd, opticflow_stab_t::cmd, ctrl, ctrl_module_init(), ctrl_windtunnel, des_inputs, opticflow_stab_t::err_vx_int, opticflow_stab_t::err_vy_int, guidance_h_mode_changed(), GUIDANCE_H_MODE_HOVER, guidance_v_mode_changed(), GUIDANCE_V_MODE_HOVER, MAX_PPRZ, new_heading, OpticalFlowLanding::nominal_thrust, OpticalFlowHoverControl::nominal_value, of_hover_ctrl_Z, of_hover_ref_pos, of_landing_ctrl, ofh_sp_eu, opticflow_stab, Int32Eulers::phi, Int32Eulers::psi, radio_control, ctrl_windtunnel_struct::rc_pitch, ctrl_windtunnel_struct::rc_roll, ctrl_module_demo_struct::rc_sp, ctrl_windtunnel_struct::rc_throttle, ctrl_windtunnel_struct::rc_yaw, reset_all_vars(), reset_horizontal_vars(), reset_vertical_vars(), stabilization, stabilization_attitude_read_rc_setpoint_eulers(), stateGetNedToBodyEulers_i(), stateGetPositionNed_i(), VerticalCtrlDemo::sum_err, Int32Eulers::theta, DesiredInputs::thrust, thrust_set, v_ctrl, and VECT2_COPY.
void guidance_module_run | ( | bool | in_flight | ) |
Main guidance loop.
[in] | in_flight | Whether we are in flight or not |
Definition at line 82 of file ctrl_module_innerloop_demo.c.
References AP_MODE_NAV, autopilot_set_mode(), Electrical::bat_low, Stabilization::cmd, opticflow_stab_t::cmd, ctrl_module_demo, ctrl_module_run(), ctrl_windtunnel, des_inputs, electrical, guidance_h_run(), guidance_v_run(), horizontal_ctrl_module_run(), OA_update(), ofh_sp_eu, opticflow_stab, radio_control, RADIO_PITCH, RADIO_ROLL, RADIO_THROTTLE, RADIO_YAW, ctrl_windtunnel_struct::rc_pitch, ctrl_windtunnel_struct::rc_roll, ctrl_module_demo_struct::rc_t, ctrl_windtunnel_struct::rc_throttle, ctrl_module_demo_struct::rc_x, ctrl_module_demo_struct::rc_y, ctrl_windtunnel_struct::rc_yaw, ctrl_module_demo_struct::rc_z, StabilizationSetpoint::sp, ThrustSetpoint::sp, stab_sp_from_eulers_i(), stabilization, stabilization_attitude_run(), stabilization_run(), th_sp_from_thrust_i(), DesiredInputs::thrust, THRUST_AXIS_Z, RadioControl::values, and vertical_ctrl_module_run().
void OA_update | ( | void | ) |
Update the controls based on a vision result.
[in] | *result | The opticflow calculation result used for control |
Definition at line 177 of file guidance_OA.c.
References alpha_fil, ANGLE_BFP_OF_REAL, opticflow_stab_t::cmd, CMD_OF_SAT, opticflow_stab_t::desired_vx, opticflow_stab_t::desired_vy, err_vx, opticflow_stab_t::err_vx_int, err_vy, opticflow_stab_t::err_vy_int, INT32_ANGLE_NORMALIZE, LOGICBASED, new_heading, NO_OBSTACLE_AVOIDANCE, OA_method_flag, opti_speed_flag, opti_speed_read, opticflow_stab, Int32Eulers::phi, opticflow_stab_t::phi_igain, opticflow_stab_t::phi_pgain, PINGPONG, POT_HEADING, FloatEulers::psi, Int32Eulers::psi, r_dot_new, ref_pitch, ref_roll, SAFETYZONE, speed_pot, stateGetNedToBodyEulers_f(), stateGetNedToBodyEulers_i(), stateGetSpeedNed_f(), Int32Eulers::theta, opticflow_stab_t::theta_igain, opticflow_stab_t::theta_pgain, Total_Kan_x, Total_Kan_y, vref_max, FloatVect2::x, NedCoor_f::x, FloatVect2::y, NedCoor_f::y, and yaw_rate.
Referenced by guidance_module_run().
|
extern |
Definition at line 93 of file guidance_OA.c.
|
extern |
Definition at line 96 of file guidance_OA.c.
Referenced by CN_calculate_target(), OA_update(), and serial_update().
|
extern |
Definition at line 98 of file guidance_OA.c.
Referenced by OA_update().
|
extern |
Definition at line 87 of file guidance_opticflow_hover.c.
Referenced by guidance_module_enter(), guidance_module_run(), OA_update(), and stabilization_opticflow_vel_cb().
|
extern |
Definition at line 107 of file guidance_OA.c.
Referenced by CN_potential_heading(), CN_potential_velocity(), and OA_update().
|
extern |
Definition at line 103 of file guidance_OA.c.
|
extern |
Definition at line 104 of file guidance_OA.c.
|
extern |
Definition at line 94 of file guidance_OA.c.
Referenced by CN_vector_escape_velocity(), and CN_vector_velocity().
|
extern |
Definition at line 110 of file guidance_OA.c.
Referenced by CN_escape_velocity(), CN_potential_heading(), CN_potential_velocity(), CN_vector_escape_velocity(), and OA_update().
|
extern |
Definition at line 99 of file guidance_OA.c.
Referenced by CN_escape_velocity(), CN_potential_heading(), CN_potential_velocity(), CN_vector_escape_velocity(), and OA_update().