Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "firmwares/rover/guidance/rover_guidance_holonomic.h"
#include "generated/airframe.h"
#include "generated/autopilot_core_guidance.h"
#include "state.h"
#include "subsystems/datalink/telemetry.h"
Go to the source code of this file.
Macros | |
#define | AUTOPILOT_CORE_GUIDANCE_C |
#define | MAX_POS_ERR 10.f |
#define | MAX_SPEED_ERR 10.f |
#define | MAX_INTEGRAL_CMD (MAX_PPRZ / 10.f) |
#define | PROXIMITY_DIST 0.2f |
Functions | |
void | rover_holo_guidance_init (void) |
void | rover_holo_guidance_periodic (void) |
static float | compute_pid (struct RoverHoloGuidancePID *pid) |
void | rover_holo_guidance_run (float *heading_sp) |
void | rover_holo_guidance_enter (void) |
void | rover_guidance_holonomic_set_speed_igain (float igain) |
void | rover_guidance_holonomic_set_turn_igain (float igain) |
Variables | |
struct RoverHoloGuidance | rover_holo_guidance |
Basic guidance for rover. Implement standard PID control loop to track a navigation target. Guidance "modes" are using the autopilot generation with the "guidance" state machine.
Definition in file rover_guidance_holonomic.c.
#define AUTOPILOT_CORE_GUIDANCE_C |
Definition at line 29 of file rover_guidance_holonomic.c.
Definition at line 81 of file rover_guidance_holonomic.c.
#define MAX_POS_ERR 10.f |
Definition at line 79 of file rover_guidance_holonomic.c.
#define MAX_SPEED_ERR 10.f |
Definition at line 80 of file rover_guidance_holonomic.c.
#define PROXIMITY_DIST 0.2f |
Definition at line 82 of file rover_guidance_holonomic.c.
|
static |
Definition at line 74 of file rover_guidance_holonomic.c.
References RoverHoloGuidancePID::d, RoverHoloGuidancePID::d_err, RoverHoloGuidancePID::err, RoverHoloGuidancePID::i, RoverHoloGuidancePID::p, and RoverHoloGuidancePID::sum_err.
Referenced by rover_holo_guidance_run().
void rover_guidance_holonomic_set_speed_igain | ( | float | igain | ) |
Definition at line 141 of file rover_guidance_holonomic.c.
References RoverHoloGuidancePID::i, rover_holo_guidance, RoverHoloGuidance::speed_pid, and RoverHoloGuidancePID::sum_err.
void rover_guidance_holonomic_set_turn_igain | ( | float | igain | ) |
Definition at line 147 of file rover_guidance_holonomic.c.
References RoverHoloGuidancePID::i, rover_holo_guidance, RoverHoloGuidancePID::sum_err, and RoverHoloGuidance::turn_pid.
void rover_holo_guidance_enter | ( | void | ) |
Definition at line 131 of file rover_guidance_holonomic.c.
References RoverHoloGuidanceSetpoint::heading, RoverHoloGuidanceSetpoint::mask, FloatEulers::psi, rover_holo_guidance, RoverHoloGuidance::sp, and stateGetNedToBodyEulers_f().
void rover_holo_guidance_init | ( | void | ) |
Definition at line 43 of file rover_guidance_holonomic.c.
References RoverHoloGuidancePID::d, RoverHoloGuidancePID::d_err, RoverHoloGuidancePID::err, FLOAT_VECT2_ZERO, RoverHoloGuidanceSetpoint::heading, RoverHoloGuidancePID::i, RoverHoloGuidancePID::p, RoverHoloGuidanceSetpoint::pos, rover_holo_guidance, RoverHoloGuidance::sp, RoverHoloGuidance::speed_pid, RoverHoloGuidancePID::sum_err, and RoverHoloGuidance::turn_pid.
void rover_holo_guidance_periodic | ( | void | ) |
Definition at line 68 of file rover_guidance_holonomic.c.
void rover_holo_guidance_run | ( | float * | heading_sp | ) |
Definition at line 84 of file rover_guidance_holonomic.c.
References RoverHoloGuidance::cmd, compute_pid(), RoverHoloGuidancePID::d_err, RoverHoloGuidancePID::err, float_vect2_norm(), RoverHoloGuidanceSetpoint::heading, MAX_POS_ERR, MAX_PPRZ, MAX_SPEED_ERR, RoverHoloGuidanceControl::motor_speed_x, RoverHoloGuidanceControl::motor_speed_y, RoverHoloGuidanceControl::motor_turn, RoverHoloGuidanceSetpoint::pos, PROXIMITY_DIST, FloatEulers::psi, FloatRates::r, rover_holo_guidance, RoverHoloGuidance::sp, RoverHoloGuidance::speed_pid, stateGetBodyRates_f(), stateGetHorizontalSpeedNorm_f(), stateGetNedToBodyEulers_f(), stateGetPositionNed_f(), RoverHoloGuidancePID::sum_err, TRIM_PPRZ, RoverHoloGuidance::turn_pid, VECT2_DIFF, FloatVect2::x, and FloatVect2::y.
struct RoverHoloGuidance rover_holo_guidance |
Definition at line 36 of file rover_guidance_holonomic.c.
Referenced by rover_guidance_holonomic_set_speed_igain(), rover_guidance_holonomic_set_turn_igain(), rover_holo_guidance_enter(), rover_holo_guidance_init(), and rover_holo_guidance_run().