DUNE: Uniform Navigational Environment
2016.09.0
|
Public Member Functions | |
Task (const std::string &name, Tasks::Context &ctx) | |
void | onUpdateParameters (void) |
void | onEntityResolution (void) |
void | onResourceAcquisition (void) |
void | onResourceRelease (void) |
void | onRequestActivation (void) |
void | onRequestDeactivation (void) |
void | consume (const IMC::LeaderState *msg) |
void | consume (const IMC::Formation *msg) |
void | consume (const IMC::PlanControl *msg) |
void | consume (const IMC::IndicatedSpeed *msg) |
void | consume (const IMC::EstimatedStreamVelocity *msg) |
void | consume (const IMC::Acceleration *msg) |
void | consume (const IMC::DesiredRoll *msg) |
void | consume (const IMC::DesiredSpeed *msg) |
void | consume (const IMC::DesiredZ *msg) |
void | consume (const IMC::EstimatedState *msg) |
void | task (void) |
void | dispatchAlias (IMC::Message *msg) |
void | dispatchLeader (IMC::Message *msg) |
bool | isControlActive (void) |
void | setLeaderState (const IMC::LeaderState *leader_state) |
void | leaderOutput (void) |
Matrix | matrixRotRbody2gnd (float roll, float pitch) |
template<typename Ta , typename Tb , typename Tc , typename Td , typename Te > | |
void | positionReframing (const Ta lat1, const Ta lon1, const Tb hei1, const Tc lat2, const Tc lon2, const Td hei2, Te *n, Te *e, Te *d) |
void | teamPeriodicUpdate (const double &d_time) |
void | teamUnevenUpdate (const double &d_time) |
void | formationControl (const Matrix &md_uav_state, const Matrix &md_vehicle_accel, const unsigned int &ind_uav, const double &d_time_step, Matrix *vd_cmd, const bool b_debug, FormMonitor *form_monitor) |
void | dispatchFormationParameters (void) |
void | formationEvaluation (void) |
void | printState (const std::string what, const Matrix pos, const Matrix vel) |
Public Member Functions inherited from DUNE::Tasks::Periodic | |
Periodic (const std::string &name, Context &ctx) | |
virtual | ~Periodic (void) |
void | setFrequency (double freq) |
double | getFrequency (void) const |
double | getRunTime (void) const |
unsigned | getRunCount (void) const |
Public Member Functions inherited from DUNE::Tasks::Task | |
Task (const std::string &name, Context &context) | |
virtual | ~Task (void) |
const char * | getName (void) const |
const char * | getSystemName (void) const |
unsigned int | getSystemId (void) const |
unsigned int | getEntityId (void) const |
unsigned int | resolveEntity (const std::string &label) const |
std::string | resolveEntity (unsigned int id) const |
DebugLevel | getDebugLevel (void) const |
uint16_t | getActivationTime (void) const |
uint16_t | getDeactivationTime (void) const |
unsigned int | resolveSystemName (const std::string &name) const |
const char * | resolveSystemId (unsigned int id) const |
void | loadConfig (void) |
void | setPriority (unsigned int value) |
unsigned int | getPriority (void) const |
void | inf (const char *format,...) DUNE_PRINTF_FORMAT(2 |
void void | war (const char *format,...) DUNE_PRINTF_FORMAT(2 |
void void void | err (const char *format,...) DUNE_PRINTF_FORMAT(2 |
void void void void | cri (const char *format,...) DUNE_PRINTF_FORMAT(2 |
void void void void void | debug (const char *format,...) DUNE_PRINTF_FORMAT(2 |
void void void void void void | trace (const char *format,...) DUNE_PRINTF_FORMAT(2 |
void void void void void void void | spew (const char *format,...) DUNE_PRINTF_FORMAT(2 |
void void void void void void void void | dispatch (IMC::Message *msg, unsigned int flags=0) |
void | dispatch (IMC::Message &msg, unsigned int flags=0) |
void | dispatchReply (const IMC::Message &original, IMC::Message &msg, unsigned int flags=0) |
void | receive (const IMC::Message *msg) |
void | reserveEntities (void) |
void | resolveEntities (void) |
void | acquireResources (void) |
void | releaseResources (void) |
void | initializeResources (void) |
void | updateParameters (bool act_deact=true) |
void | writeParamsXML (std::ostream &os) const |
const char * | getEntityLabel (void) const |
void | setEntityLabel (const std::string &label) |
Public Member Functions inherited from DUNE::Tasks::AbstractTask | |
AbstractTask (void) | |
virtual | ~AbstractTask (void) |
Public Member Functions inherited from DUNE::Concurrency::Thread | |
Thread (void) | |
virtual | ~Thread (void) |
int | getProcessorUsage (void) |
Public Member Functions inherited from DUNE::Concurrency::Runnable | |
Runnable (void) | |
virtual | ~Runnable (void) |
void | start (void) |
void | stop (void) |
void | join (void) |
void | stopAndJoin (void) |
void | setPriority (Scheduler::Policy policy, unsigned priority) |
unsigned | getPriority (void) |
State | getState (void) |
bool | isCreated (void) |
bool | isStopping (void) |
bool | isRunning (void) |
bool | isStarting (void) |
bool | isDead (void) |
Additional Inherited Members | |
Public Types inherited from DUNE::Concurrency::Runnable | |
enum | State { StateStarting, StateRunning, StateStopping, StateDead, StateUnknown } |
Protected Member Functions inherited from DUNE::Tasks::Task | |
void | setEntityState (IMC::EntityState::StateEnum state, Status::Code code) |
void | setEntityState (IMC::EntityState::StateEnum state, const std::string &description) |
IMC::EntityState::StateEnum | getEntityState (void) const |
unsigned int | reserveEntity (const std::string &label) |
template<typename E > | |
E * | reserveEntity (const std::string &label) |
bool | stopping (void) |
bool | isActive (void) const |
bool | isActivating (void) const |
bool | isDeactivating (void) const |
void | waitForMessages (double timeout) |
void | consumeMessages (void) |
template<typename T > | |
Parameter & | param (const std::string &name, T &var) |
template<typename Y , typename T > | |
Parameter & | param (const std::string &name, T &var) |
template<typename T > | |
bool | paramChanged (T &var) |
void | paramActive (Parameter::Scope def_scope, Parameter::Visibility def_visibility, bool def_value=false) |
void | setParamSectionEditor (const std::string &name) |
template<typename M , typename T > | |
void | bind (T *task_obj, void(T::*consumer)(const M *)=&T::consume) |
template<typename T > | |
void | bind (T *task_obj, const std::vector< uint32_t > &list) |
template<typename T , typename M > | |
void | bind (T *task_obj, const std::vector< uint32_t > &list, void(T::*consumer)(const M *)=&T::consume) |
template<typename T > | |
void | bind (T *task_obj, const std::vector< std::string > &list) |
void | requestActivation (void) |
void | requestDeactivation (void) |
void | activate (void) |
void | activationFailed (const std::string &reason) |
void | deactivate (void) |
void | deactivationFailed (const std::string &reason) |
virtual bool | onWriteParamsXML (std::ostream &os) const |
virtual void | onEntityReservation (void) |
virtual void | onReportEntityState (void) |
virtual void | onResourceInitialization (void) |
virtual void | onActivation (void) |
virtual void | onDeactivation (void) |
virtual void | onQueryEntityParameters (const IMC::QueryEntityParameters *msg) |
virtual void | onSetEntityParameters (const IMC::SetEntityParameters *msg) |
virtual void | onPushEntityParameters (const IMC::PushEntityParameters *msg) |
virtual void | onPopEntityParameters (const IMC::PopEntityParameters *msg) |
Protected Member Functions inherited from DUNE::Concurrency::Thread | |
void | startImpl (void) |
void | stopImpl (void) |
void | joinImpl (void) |
void | setPriorityImpl (Scheduler::Policy policy, unsigned priority) |
unsigned | getPriorityImpl (void) |
Protected Attributes inherited from DUNE::Tasks::Task | |
Context & | m_ctx |
std::vector < Entities::BasicEntity * > | m_entities |
|
inline |
References Maneuver::VehicleFormation::FormCollAvoid::Arguments::acc_safety_marg, Maneuver::VehicleFormation::FormCollAvoid::Arguments::alt_max, Maneuver::VehicleFormation::FormCollAvoid::Arguments::alt_min, Maneuver::VehicleFormation::FormCollAvoid::Arguments::bank_lim, Maneuver::VehicleFormation::FormCollAvoid::Arguments::c_alt, Maneuver::VehicleFormation::FormCollAvoid::Arguments::c_bank, Maneuver::VehicleFormation::FormCollAvoid::Arguments::c_speed, Maneuver::VehicleFormation::FormCollAvoid::Arguments::cmd_src, Maneuver::VehicleFormation::FormCollAvoid::Arguments::ctrl_frequency, Maneuver::VehicleFormation::FormCollAvoid::Arguments::debug, Maneuver::VehicleFormation::FormCollAvoid::Arguments::deconfliction_offset, Maneuver::VehicleFormation::FormCollAvoid::Arguments::default_alt, Maneuver::VehicleFormation::FormCollAvoid::Arguments::default_speed, DUNE::Tasks::Parameter::defaultValue(), Maneuver::VehicleFormation::FormCollAvoid::Arguments::flow_accel_max, Maneuver::VehicleFormation::FormCollAvoid::Arguments::k_boundary, Maneuver::VehicleFormation::FormCollAvoid::Arguments::k_deconfliction, Maneuver::VehicleFormation::FormCollAvoid::Arguments::k_lateral, Maneuver::VehicleFormation::FormCollAvoid::Arguments::k_leader, Maneuver::VehicleFormation::FormCollAvoid::Arguments::k_longitudinal, Maneuver::VehicleFormation::FormCollAvoid::Arguments::l_accel_x, Maneuver::VehicleFormation::FormCollAvoid::Arguments::l_bank_rate, Maneuver::VehicleFormation::FormCollAvoid::Arguments::l_vert_slope, Maneuver::VehicleFormation::FormCollAvoid::Arguments::leader_alias, Maneuver::VehicleFormation::FormCollAvoid::Arguments::leader_frequency, m_args, DUNE::Math::min(), DUNE::Tasks::Task::param(), Maneuver::VehicleFormation::FormCollAvoid::Arguments::safe_dist, Maneuver::VehicleFormation::FormCollAvoid::Arguments::sim_frequency, Maneuver::VehicleFormation::FormCollAvoid::Arguments::sim_type, Maneuver::VehicleFormation::FormCollAvoid::Arguments::speed_max, Maneuver::VehicleFormation::FormCollAvoid::Arguments::speed_min, Maneuver::VehicleFormation::FormCollAvoid::Arguments::src_alias, and Maneuver::VehicleFormation::FormCollAvoid::Arguments::wind_average_window.
|
inline |
References DUNE::Tasks::Task::debug(), and setLeaderState().
|
inline |
References DUNE::Tasks::Task::debug(), dispatchLeader(), DUNE::Tasks::Task::getEntityId(), DUNE::Tasks::Task::getSystemId(), DUNE::Tasks::Task::inf(), DUNE::Tasks::Task::isActive(), m_current_plan, m_formation_frame, m_formation_pos, m_formation_systems, m_leader_alt_max, m_leader_alt_min, m_leader_bank_lim, m_leader_id, m_leader_speed_max, m_leader_speed_min, m_uav_id, m_uav_ind, m_uav_n, onUpdateParameters(), DUNE::Tasks::Task::requestActivation(), DUNE::Tasks::Task::requestDeactivation(), DUNE::Math::Matrix::resizeAndKeep(), DUNE::Tasks::Task::resolveSystemId(), DUNE::Tasks::Task::war(), and DUNE::Math::Matrix::~Matrix().
|
inline |
|
inline |
|
inline |
References DUNE::Tasks::Task::getSystemId(), m_wind, m_wind_avg_x, m_wind_avg_y, and m_wind_avg_z.
|
inline |
References DUNE::Tasks::Task::getSystemId(), m_uav_ind, m_vehicle_accel, and DUNE::Math::Matrix::set().
|
inline |
References DUNE::Simulation::UAVSimulation::commandBank(), DUNE::Math::Angles::degrees(), DUNE::Simulation::UAVSimulation::getBankCmd(), DUNE::Tasks::Task::isActive(), m_filtered_ent, m_filtered_sys, m_leader_bank_lim, m_model, DUNE::Tasks::Task::resolveEntity(), DUNE::Tasks::Task::resolveSystemId(), DUNE::Tasks::Task::spew(), DUNE::Tasks::Task::trace(), DUNE::Math::trimValue(), and DUNE::Tasks::Task::war().
|
inline |
References DUNE::Simulation::UAVSimulation::commandAirspeed(), DUNE::Tasks::Task::isActive(), m_filtered_ent, m_filtered_sys, m_leader_speed_max, m_leader_speed_min, m_model, m_speed_cmd_leader, m_speed_units_leader, DUNE::Tasks::Task::resolveEntity(), DUNE::Tasks::Task::resolveSystemId(), DUNE::Tasks::Task::spew(), DUNE::Tasks::Task::trace(), DUNE::Math::trimValue(), and DUNE::Tasks::Task::war().
|
inline |
References DUNE::Simulation::UAVSimulation::commandAlt(), DUNE::Tasks::Task::isActive(), m_alt_cmd_leader, m_alt_units_leader, m_filtered_ent, m_filtered_sys, m_leader_alt_max, m_leader_alt_min, m_llh_ref_pos, m_model, DUNE::Tasks::Task::resolveEntity(), DUNE::Tasks::Task::resolveSystemId(), DUNE::Tasks::Task::spew(), DUNE::Tasks::Task::trace(), DUNE::Math::trimValue(), and DUNE::Tasks::Task::war().
|
inline |
References Maneuver::VehicleFormation::FormCollAvoid::FormMonitor::ax_cmd, Maneuver::VehicleFormation::FormCollAvoid::FormMonitor::ax_des, Maneuver::VehicleFormation::FormCollAvoid::RelState::ctrl_imp, dispatchAlias(), Maneuver::VehicleFormation::FormCollAvoid::RelState::dist, Maneuver::VehicleFormation::FormCollAvoid::RelState::err, Maneuver::VehicleFormation::FormCollAvoid::RelState::err_x, Maneuver::VehicleFormation::FormCollAvoid::RelState::err_y, Maneuver::VehicleFormation::FormCollAvoid::RelState::err_z, formationControl(), DUNE::Math::Matrix::get(), DUNE::Tasks::Task::getSystemId(), DUNE::Tasks::Task::isActive(), isControlActive(), m_airspeed_cmd, m_alias_id, m_alt_units_leader, m_altitude_cmd, m_bank_cmd, m_debug, m_dist_min_abs, m_dist_min_mean, m_err_mean, m_form_monitor, m_formation_pos, m_last_simctrl_update, m_last_state_estim, m_last_state_update, m_llh_ref_pos, m_mean_first, m_mean_time, m_mean_time_start, m_models, m_timestep_ctrl, m_uav_ctrl, m_uav_id, m_uav_ind, m_uav_n, m_vehicle_accel, m_vehicle_state, m_vehicle_state_flag, m_wind, DUNE::Math::Matrix::norm_2(), positionReframing(), Maneuver::VehicleFormation::FormCollAvoid::RelState::rel_dir_x, Maneuver::VehicleFormation::FormCollAvoid::RelState::rel_dir_y, Maneuver::VehicleFormation::FormCollAvoid::RelState::rel_dir_z, Maneuver::VehicleFormation::FormCollAvoid::FormMonitor::rel_state, DUNE::Tasks::Task::resolveSystemId(), Maneuver::VehicleFormation::FormCollAvoid::RelState::rf_err_vx, Maneuver::VehicleFormation::FormCollAvoid::RelState::rf_err_vy, Maneuver::VehicleFormation::FormCollAvoid::RelState::rf_err_vz, Maneuver::VehicleFormation::FormCollAvoid::RelState::rf_err_x, Maneuver::VehicleFormation::FormCollAvoid::RelState::rf_err_y, Maneuver::VehicleFormation::FormCollAvoid::RelState::rf_err_z, Maneuver::VehicleFormation::FormCollAvoid::RelState::s_id, DUNE::Math::Matrix::set(), DUNE::Tasks::Task::spew(), Maneuver::VehicleFormation::FormCollAvoid::RelState::ss_x, Maneuver::VehicleFormation::FormCollAvoid::FormMonitor::ss_x, Maneuver::VehicleFormation::FormCollAvoid::RelState::ss_y, Maneuver::VehicleFormation::FormCollAvoid::FormMonitor::ss_y, Maneuver::VehicleFormation::FormCollAvoid::RelState::ss_z, Maneuver::VehicleFormation::FormCollAvoid::FormMonitor::surf_fdbk_x, Maneuver::VehicleFormation::FormCollAvoid::FormMonitor::surf_fdbk_y, Maneuver::VehicleFormation::FormCollAvoid::FormMonitor::surf_unkn_x, Maneuver::VehicleFormation::FormCollAvoid::FormMonitor::surf_unkn_y, teamPeriodicUpdate(), teamUnevenUpdate(), Maneuver::VehicleFormation::FormCollAvoid::RelState::virt_err_x, Maneuver::VehicleFormation::FormCollAvoid::FormMonitor::virt_err_x, Maneuver::VehicleFormation::FormCollAvoid::RelState::virt_err_y, Maneuver::VehicleFormation::FormCollAvoid::FormMonitor::virt_err_y, Maneuver::VehicleFormation::FormCollAvoid::RelState::virt_err_z, and DUNE::Tasks::Task::war().
|
inline |
References DUNE::Tasks::Task::dispatch(), and m_alias_id.
Referenced by consume(), dispatchFormationParameters(), and formationEvaluation().
|
inline |
References dispatchAlias(), m_acc_safety_marg, m_accel_lim_x, m_deconfliction_offset, m_flow_accel_max, m_formation_ctrl_params, m_k_boundary, m_k_deconfliction, m_k_lateral, m_k_leader, m_k_longitudinal, and m_safe_dist.
Referenced by onRequestActivation(), and onUpdateParameters().
|
inline |
References DUNE::Tasks::Task::dispatch(), and m_leader_id.
Referenced by consume(), leaderOutput(), and onRequestActivation().
|
inline |
References Maneuver::VehicleFormation::FormCollAvoid::FormMonitor::ax_cmd, Maneuver::VehicleFormation::FormCollAvoid::FormMonitor::ax_des, Maneuver::VehicleFormation::FormCollAvoid::FormMonitor::ay_cmd, Maneuver::VehicleFormation::FormCollAvoid::FormMonitor::ay_des, DUNE::Math::Matrix::column(), Maneuver::VehicleFormation::FormCollAvoid::RelState::dist, Maneuver::VehicleFormation::FormCollAvoid::RelState::err, Maneuver::VehicleFormation::FormCollAvoid::RelState::err_x, Maneuver::VehicleFormation::FormCollAvoid::RelState::err_y, DUNE::Math::Matrix::get(), m_acc_safety_marg, m_accel_lim_x, m_alt_max, m_alt_min, m_bank_lim, m_deconfliction_offset, m_flow_accel_max, m_formation_frame, m_formation_pos, m_formation_systems, m_g, m_k_boundary, m_k_deconfliction, m_k_lateral, m_k_leader, m_k_longitudinal, m_safe_dist, m_speed_cmd_leader, m_speed_max, m_speed_min, m_uav_n, m_wind, DUNE::Math::Matrix::norm_2(), Maneuver::VehicleFormation::FormCollAvoid::RelState::rel_dir_x, Maneuver::VehicleFormation::FormCollAvoid::RelState::rel_dir_y, Maneuver::VehicleFormation::FormCollAvoid::FormMonitor::rel_state, Maneuver::VehicleFormation::FormCollAvoid::RelState::rf_err_vx, Maneuver::VehicleFormation::FormCollAvoid::RelState::rf_err_vy, Maneuver::VehicleFormation::FormCollAvoid::RelState::rf_err_x, Maneuver::VehicleFormation::FormCollAvoid::RelState::rf_err_y, DUNE::Math::Matrix::row(), Maneuver::VehicleFormation::FormCollAvoid::RelState::s_id, DUNE::Math::Matrix::set(), Maneuver::VehicleFormation::FormCollAvoid::RelState::ss_x, Maneuver::VehicleFormation::FormCollAvoid::FormMonitor::ss_x, Maneuver::VehicleFormation::FormCollAvoid::RelState::ss_y, Maneuver::VehicleFormation::FormCollAvoid::FormMonitor::ss_y, DUNE::Math::sum(), Maneuver::VehicleFormation::FormCollAvoid::FormMonitor::surf_fdbk_x, Maneuver::VehicleFormation::FormCollAvoid::FormMonitor::surf_fdbk_y, Maneuver::VehicleFormation::FormCollAvoid::FormMonitor::surf_unkn_x, Maneuver::VehicleFormation::FormCollAvoid::FormMonitor::surf_unkn_y, DUNE::Math::transpose(), DUNE::Math::trimValue(), Maneuver::VehicleFormation::FormCollAvoid::RelState::virt_err_x, Maneuver::VehicleFormation::FormCollAvoid::FormMonitor::virt_err_x, Maneuver::VehicleFormation::FormCollAvoid::RelState::virt_err_y, Maneuver::VehicleFormation::FormCollAvoid::FormMonitor::virt_err_y, and DUNE::Tasks::Task::war().
Referenced by consume(), and teamPeriodicUpdate().
|
inline |
References dispatchAlias(), m_dist_min_abs, m_dist_min_mean, m_err_mean, m_formation_eval, and m_mean_time.
Referenced by onRequestDeactivation(), and onUpdateParameters().
|
inline |
References DUNE::Tasks::Task::activate(), DUNE::Tasks::Task::deactivate(), DUNE::Tasks::Task::isActivating(), DUNE::Tasks::Task::isDeactivating(), m_ctrl_active, m_last_time_verb_ctrlactiv, m_team_leader_init, m_team_state_init, m_timestep_trace, m_uav_n, m_valid_airspeed, m_vehicle_state_flag, and DUNE::Tasks::Task::war().
Referenced by consume(), onRequestActivation(), onRequestDeactivation(), and task().
|
inline |
References dispatchLeader(), DUNE::Math::Matrix::get(), DUNE::Simulation::UAVSimulation::getAirspeed(), m_debug, m_estate_leader, m_last_leader_output, m_model, m_position, m_vehicle_accel, m_velocity, m_wind, DUNE::Simulation::UAVSimulation::m_wind, DUNE::Math::Matrix::norm_2(), DUNE::Math::Matrix::toDCM(), and DUNE::Math::transpose().
Referenced by setLeaderState(), and teamPeriodicUpdate().
|
inline |
|
inlinevirtual |
Called when the task is instructed to resolve all the entity identifiers it needs for normal execution.
See resolveEntity(). Derived classes that need to resolve entity identifiers should override this function.
Reimplemented from DUNE::Tasks::Task.
References Maneuver::VehicleFormation::FormCollAvoid::Arguments::cmd_src, DUNE::Tasks::Task::debug(), m_args, m_current_plan, m_filtered_ent, m_filtered_sys, DUNE::Tasks::Task::resolveEntity(), DUNE::Tasks::Task::resolveSystemName(), DUNE::Tasks::Task::spew(), and DUNE::Tasks::Task::war().
|
inlinevirtual |
Called when an external activation request is received.
Derived classes that need to perform extra steps to prepare normal execution should replace the default behaviour of immediate activation with calls to activate() when the request is completed or activationFailed() if the request cannot be honoured.
Reimplemented from DUNE::Tasks::Task.
References dispatchFormationParameters(), dispatchLeader(), DUNE::Tasks::Task::inf(), isControlActive(), m_current_plan, m_debug, m_team_leader_init, and DUNE::Tasks::Task::spew().
Referenced by setLeaderState().
|
inlinevirtual |
Called when an external deactivation request is received.
Derived classes that need to perform extra steps to prepare normal execution should replace the default behaviour of immediate deactivation with calls to deactivate() when the request is completed or deactivationFailed() if the request cannot be honoured.
Reimplemented from DUNE::Tasks::Task.
References formationEvaluation(), isControlActive(), m_debug, m_mean_first, m_team_leader_init, and DUNE::Tasks::Task::spew().
|
inlinevirtual |
Called when the task is instructed to acquire resources whose configuration is defined by run-time parameters.
Reimplemented from DUNE::Tasks::Task.
References DUNE::Tasks::Task::setEntityState().
|
inlinevirtual |
Called when the task is instructed to release resources.
Derived classes that override this function must not assume that any resource was previously acquired. This function must be implemented in such a way that it can be called at any time.
Reimplemented from DUNE::Tasks::Task.
|
inlinevirtual |
Called when the task is instructed to update its run-time parameters.
Derived classes that need to compute auxiliary values based on run-time parameters should override this function.
Reimplemented from DUNE::Tasks::Task.
References Maneuver::VehicleFormation::FormCollAvoid::Arguments::acc_safety_marg, Maneuver::VehicleFormation::FormCollAvoid::Arguments::alt_max, Maneuver::VehicleFormation::FormCollAvoid::Arguments::alt_min, Maneuver::VehicleFormation::FormCollAvoid::Arguments::bank_lim, Maneuver::VehicleFormation::FormCollAvoid::Arguments::c_bank, Maneuver::VehicleFormation::FormCollAvoid::Arguments::c_speed, DUNE::Simulation::UAVSimulation::command(), Maneuver::VehicleFormation::FormCollAvoid::Arguments::ctrl_frequency, Maneuver::VehicleFormation::FormCollAvoid::Arguments::debug, DUNE::Tasks::Task::debug(), Maneuver::VehicleFormation::FormCollAvoid::Arguments::deconfliction_offset, Maneuver::VehicleFormation::FormCollAvoid::Arguments::default_alt, Maneuver::VehicleFormation::FormCollAvoid::Arguments::default_speed, dispatchFormationParameters(), DUNE::Tasks::Task::err(), Maneuver::VehicleFormation::FormCollAvoid::Arguments::flow_accel_max, formationEvaluation(), DUNE::Math::Matrix::get(), DUNE::Tasks::Periodic::getFrequency(), DUNE::Tasks::Task::getSystemId(), DUNE::Tasks::Task::inf(), Maneuver::VehicleFormation::FormCollAvoid::Arguments::k_boundary, Maneuver::VehicleFormation::FormCollAvoid::Arguments::k_deconfliction, Maneuver::VehicleFormation::FormCollAvoid::Arguments::k_lateral, Maneuver::VehicleFormation::FormCollAvoid::Arguments::k_leader, Maneuver::VehicleFormation::FormCollAvoid::Arguments::k_longitudinal, Maneuver::VehicleFormation::FormCollAvoid::Arguments::l_accel_x, Maneuver::VehicleFormation::FormCollAvoid::Arguments::l_bank_rate, Maneuver::VehicleFormation::FormCollAvoid::Arguments::leader_alias, Maneuver::VehicleFormation::FormCollAvoid::Arguments::leader_frequency, m_acc_safety_marg, m_accel_lim_x, m_airspeed, m_airspeed_cmd, m_alias_id, m_alt_cmd_leader, m_alt_max, m_alt_min, m_altitude_cmd, m_args, m_bank_lim, m_debug, m_deconfliction_offset, m_flow_accel_max, m_form_monitor, m_formation_pos, m_frequency, m_k_boundary, m_k_deconfliction, m_k_lateral, m_k_leader, m_k_longitudinal, m_last_simctrl_update, m_last_state_estim, m_last_state_update, m_leader_alt_max, m_leader_alt_min, m_leader_bank_lim, m_leader_id, m_leader_speed_max, m_leader_speed_min, m_llh_ref_pos, m_mean_first, m_model, m_models, m_param_update_first, m_position, m_safe_dist, DUNE::Simulation::UAVSimulation::m_sim_type, m_speed_cmd_leader, m_speed_max, m_speed_min, m_team_state_init, m_timestep_ctrl, m_timestep_leader, m_timestep_sim, m_uav_ctrl, m_uav_id, m_uav_id_last, m_uav_ind, m_uav_n, m_vehicle_accel, m_vehicle_state, m_vehicle_state_flag, m_velocity, m_wind_avg_x, m_wind_avg_y, m_wind_avg_z, DUNE::Math::Matrix, DUNE::Tasks::Task::paramChanged(), DUNE::Math::Angles::radians(), Maneuver::VehicleFormation::FormCollAvoid::FormMonitor::rel_state, DUNE::Math::Matrix::resizeAndKeep(), DUNE::Tasks::Task::resolveSystemId(), DUNE::Tasks::Task::resolveSystemName(), Maneuver::VehicleFormation::FormCollAvoid::Arguments::safe_dist, DUNE::Math::Matrix::set(), DUNE::Simulation::UAVSimulation::setAccelLim(), DUNE::Simulation::UAVSimulation::setBankRateLim(), DUNE::Simulation::UAVSimulation::setCtrl(), Maneuver::VehicleFormation::FormCollAvoid::Arguments::sim_frequency, Maneuver::VehicleFormation::FormCollAvoid::Arguments::sim_type, Maneuver::VehicleFormation::FormCollAvoid::Arguments::speed_max, Maneuver::VehicleFormation::FormCollAvoid::Arguments::speed_min, DUNE::Tasks::Task::spew(), Maneuver::VehicleFormation::FormCollAvoid::Arguments::src_alias, DUNE::Simulation::UAVSimulation, DUNE::Math::Matrix::vertCat(), DUNE::Tasks::Task::war(), and Maneuver::VehicleFormation::FormCollAvoid::Arguments::wind_average_window.
Referenced by consume().
|
inline |
Adjust offset position from a reference frame to a new reference frame.
[in] | lat1 | new reference latitude (rad). |
[in] | lon1 | new reference longitude (rad). |
[in] | hei1 | new reference height (m). |
[in] | lat2 | old reference latitude (rad). |
[in] | lon2 | old reference longitude (rad). |
[in] | hei2 | old reference height (m). |
[in,out] | n | North offset (m). |
[in,out] | e | East offset (m). |
[in,out] | d | Down offset (m). |
Referenced by consume(), and setLeaderState().
|
inline |
References DUNE::Tasks::Task::inf().
|
inline |
References DUNE::Math::Angles::degrees(), DUNE::Math::Matrix::get(), DUNE::Tasks::Task::isActivating(), leaderOutput(), m_estate_leader, m_init_leader, m_last_state_estim, m_leader_bank_lim, m_llh_ref_pos, m_model, m_position, m_team_leader_init, m_vehicle_state, m_velocity, DUNE::Simulation::UAVSimulation::m_wind, onRequestActivation(), positionReframing(), DUNE::Math::Matrix::set(), DUNE::Simulation::UAVSimulation::setPosition(), DUNE::Simulation::UAVSimulation::setVelocity(), DUNE::Tasks::Task::trace(), DUNE::Math::trimValue(), and DUNE::Math::Matrix::vertCat().
Referenced by consume().
|
inlinevirtual |
The task to be executed on each cycle.
Implements DUNE::Tasks::Periodic.
References DUNE::Tasks::Task::consumeMessages(), DUNE::Tasks::Task::getSystemName(), DUNE::Tasks::Task::isActivating(), DUNE::Tasks::Task::isActive(), isControlActive(), m_last_time_verb_task, m_timestep_trace, DUNE::Tasks::Task::spew(), teamPeriodicUpdate(), and DUNE::Tasks::Task::trace().
|
inline |
Update team simulated state for standard time periods.
References formationControl(), DUNE::Math::Matrix::get(), DUNE::Simulation::UAVSimulation::getPosition(), DUNE::Simulation::UAVSimulation::getVelocity(), leaderOutput(), m_form_monitor, m_last_leader_output, m_last_simctrl_update, m_last_state_estim, m_model, m_models, m_position, m_team_leader_init, m_timestep_ctrl, m_timestep_leader, m_timestep_sim, m_uav_ctrl, m_uav_n, m_vehicle_accel, m_vehicle_state, m_vehicle_state_flag, m_velocity, DUNE::Math::Matrix::set(), DUNE::Tasks::Task::spew(), teamUnevenUpdate(), DUNE::Simulation::UAVSimulation::update(), and DUNE::Tasks::Task::war().
|
inline |
Update team simulated state for uneven time periods.
References DUNE::Math::Matrix::get(), DUNE::Simulation::UAVSimulation::getPosition(), DUNE::Simulation::UAVSimulation::getVelocity(), m_g, m_last_state_estim, m_model, m_models, m_team_leader_init, m_uav_ind, m_uav_n, m_vehicle_accel, m_vehicle_state, m_vehicle_state_flag, DUNE::Math::Matrix::set(), DUNE::Tasks::Task::spew(), and DUNE::Simulation::UAVSimulation::update().
Referenced by consume(), and teamPeriodicUpdate().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_acc_safety_marg |
Referenced by dispatchFormationParameters(), formationControl(), and onUpdateParameters().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_accel_lim_x |
Referenced by dispatchFormationParameters(), formationControl(), and onUpdateParameters().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_airspeed |
Referenced by onUpdateParameters().
IMC::DesiredSpeed Maneuver::VehicleFormation::FormCollAvoid::Task::m_airspeed_cmd |
Referenced by consume(), and onUpdateParameters().
uint32_t Maneuver::VehicleFormation::FormCollAvoid::Task::m_alias_id |
Referenced by consume(), dispatchAlias(), and onUpdateParameters().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_alt_cmd_leader |
Leader commanded altitude.
Referenced by consume(), and onUpdateParameters().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_alt_max |
Referenced by formationControl(), and onUpdateParameters().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_alt_min |
Referenced by formationControl(), and onUpdateParameters().
uint8_t Maneuver::VehicleFormation::FormCollAvoid::Task::m_alt_units_leader |
Referenced by consume().
IMC::DesiredZ Maneuver::VehicleFormation::FormCollAvoid::Task::m_altitude_cmd |
Referenced by consume(), and onUpdateParameters().
Arguments Maneuver::VehicleFormation::FormCollAvoid::Task::m_args |
Task arguments.
Referenced by onEntityResolution(), onUpdateParameters(), and Task().
IMC::DesiredRoll Maneuver::VehicleFormation::FormCollAvoid::Task::m_bank_cmd |
Vehicle commands.
Referenced by consume().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_bank_lim |
Vehicle command limits.
Referenced by formationControl(), and onUpdateParameters().
bool Maneuver::VehicleFormation::FormCollAvoid::Task::m_ctrl_active |
Process logic control variables.
Referenced by isControlActive().
IMC::PlanControl Maneuver::VehicleFormation::FormCollAvoid::Task::m_current_plan |
Referenced by consume(), onEntityResolution(), and onRequestActivation().
bool Maneuver::VehicleFormation::FormCollAvoid::Task::m_debug |
Referenced by consume(), leaderOutput(), onRequestActivation(), onRequestDeactivation(), and onUpdateParameters().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_deconfliction_offset |
Referenced by dispatchFormationParameters(), formationControl(), and onUpdateParameters().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_dist_min_abs |
Referenced by consume(), and formationEvaluation().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_dist_min_mean |
Referenced by consume(), and formationEvaluation().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_err_mean |
Referenced by consume(), and formationEvaluation().
IMC::EstimatedState Maneuver::VehicleFormation::FormCollAvoid::Task::m_estate_leader |
Leader's estimated state.
Referenced by leaderOutput(), and setLeaderState().
std::map<uint32_t, Entities> Maneuver::VehicleFormation::FormCollAvoid::Task::m_filtered_ent |
List of entities allowed to define a command.
Referenced by consume(), and onEntityResolution().
std::map<uint32_t, Systems> Maneuver::VehicleFormation::FormCollAvoid::Task::m_filtered_sys |
List of systems allowed to define a command.
Referenced by consume(), and onEntityResolution().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_flow_accel_max |
Referenced by dispatchFormationParameters(), formationControl(), and onUpdateParameters().
FormMonitor* Maneuver::VehicleFormation::FormCollAvoid::Task::m_form_monitor |
Referenced by consume(), onUpdateParameters(), and teamPeriodicUpdate().
IMC::FormationControlParams Maneuver::VehicleFormation::FormCollAvoid::Task::m_formation_ctrl_params |
Controller parameters.
Referenced by dispatchFormationParameters().
IMC::FormationEvaluation Maneuver::VehicleFormation::FormCollAvoid::Task::m_formation_eval |
Controller evaluation data.
Referenced by formationEvaluation().
unsigned int Maneuver::VehicleFormation::FormCollAvoid::Task::m_formation_frame |
Referenced by consume(), and formationControl().
Matrix Maneuver::VehicleFormation::FormCollAvoid::Task::m_formation_pos |
Referenced by consume(), formationControl(), and onUpdateParameters().
std::vector<std::string> Maneuver::VehicleFormation::FormCollAvoid::Task::m_formation_systems |
Referenced by consume(), and formationControl().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_frequency |
Simulation process frequency.
Referenced by onUpdateParameters().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_g |
Referenced by formationControl(), and teamUnevenUpdate().
IMC::LeaderState Maneuver::VehicleFormation::FormCollAvoid::Task::m_init_leader |
Leader initial state.
Referenced by setLeaderState().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_k_boundary |
Referenced by dispatchFormationParameters(), formationControl(), and onUpdateParameters().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_k_deconfliction |
Referenced by dispatchFormationParameters(), formationControl(), and onUpdateParameters().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_k_lateral |
Referenced by dispatchFormationParameters(), formationControl(), and onUpdateParameters().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_k_leader |
Referenced by dispatchFormationParameters(), formationControl(), and onUpdateParameters().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_k_longitudinal |
Referenced by dispatchFormationParameters(), formationControl(), and onUpdateParameters().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_last_leader_output |
Referenced by leaderOutput(), and teamPeriodicUpdate().
Matrix Maneuver::VehicleFormation::FormCollAvoid::Task::m_last_simctrl_update |
Referenced by consume(), onUpdateParameters(), and teamPeriodicUpdate().
Matrix Maneuver::VehicleFormation::FormCollAvoid::Task::m_last_state_estim |
Referenced by consume(), onUpdateParameters(), setLeaderState(), teamPeriodicUpdate(), and teamUnevenUpdate().
Matrix Maneuver::VehicleFormation::FormCollAvoid::Task::m_last_state_update |
Synchronization, simulation and control time variables.
Referenced by consume(), and onUpdateParameters().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_last_time_verb_ctrlactiv |
Referenced by isControlActive().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_last_time_verb_formctrl |
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_last_time_verb_leaderspew |
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_last_time_verb_leadertrace |
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_last_time_verb_task |
Last time debug information was shown.
Referenced by task().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_leader_alt_max |
Referenced by consume(), and onUpdateParameters().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_leader_alt_min |
Referenced by consume(), and onUpdateParameters().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_leader_bank_lim |
Leader command limits.
Referenced by consume(), onUpdateParameters(), and setLeaderState().
uint32_t Maneuver::VehicleFormation::FormCollAvoid::Task::m_leader_id |
Referenced by consume(), dispatchLeader(), and onUpdateParameters().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_leader_speed_max |
Referenced by consume(), and onUpdateParameters().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_leader_speed_min |
Referenced by consume(), and onUpdateParameters().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_llh_ref_pos[3] |
Vehicle's referential position (Latitude, Longitude, and height).
Referenced by consume(), onUpdateParameters(), and setLeaderState().
bool Maneuver::VehicleFormation::FormCollAvoid::Task::m_mean_first |
Referenced by consume(), onRequestDeactivation(), and onUpdateParameters().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_mean_time |
Referenced by consume(), and formationEvaluation().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_mean_time_start |
Referenced by consume().
UAVSimulation* Maneuver::VehicleFormation::FormCollAvoid::Task::m_model |
Leader vehicle model.
Referenced by consume(), leaderOutput(), onUpdateParameters(), setLeaderState(), teamPeriodicUpdate(), and teamUnevenUpdate().
std::vector<UAVSimulation*> Maneuver::VehicleFormation::FormCollAvoid::Task::m_models |
Simulated vehicles' models.
Referenced by consume(), onUpdateParameters(), teamPeriodicUpdate(), and teamUnevenUpdate().
bool Maneuver::VehicleFormation::FormCollAvoid::Task::m_param_update_first |
Referenced by onUpdateParameters().
Matrix Maneuver::VehicleFormation::FormCollAvoid::Task::m_position |
Leader's simulated position (X,Y,Z,phi,theta,psi).
Referenced by leaderOutput(), onUpdateParameters(), setLeaderState(), and teamPeriodicUpdate().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_safe_dist |
Referenced by dispatchFormationParameters(), formationControl(), and onUpdateParameters().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_speed_cmd_leader |
Leader commanded true airspeed.
Referenced by consume(), formationControl(), and onUpdateParameters().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_speed_max |
Referenced by formationControl(), and onUpdateParameters().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_speed_min |
Referenced by formationControl(), and onUpdateParameters().
uint8_t Maneuver::VehicleFormation::FormCollAvoid::Task::m_speed_units_leader |
Referenced by consume().
bool Maneuver::VehicleFormation::FormCollAvoid::Task::m_team_leader_init |
Referenced by isControlActive(), onRequestActivation(), onRequestDeactivation(), setLeaderState(), teamPeriodicUpdate(), and teamUnevenUpdate().
bool Maneuver::VehicleFormation::FormCollAvoid::Task::m_team_plan_init |
bool Maneuver::VehicleFormation::FormCollAvoid::Task::m_team_state_init |
Referenced by isControlActive(), and onUpdateParameters().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_timestep_ctrl |
Referenced by consume(), onUpdateParameters(), and teamPeriodicUpdate().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_timestep_leader |
Referenced by onUpdateParameters(), and teamPeriodicUpdate().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_timestep_sim |
Referenced by onUpdateParameters(), and teamPeriodicUpdate().
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_timestep_spew |
double Maneuver::VehicleFormation::FormCollAvoid::Task::m_timestep_trace |
Referenced by isControlActive(), and task().
Matrix Maneuver::VehicleFormation::FormCollAvoid::Task::m_uav_ctrl |
System command variables.
Referenced by consume(), onUpdateParameters(), and teamPeriodicUpdate().
Systems Maneuver::VehicleFormation::FormCollAvoid::Task::m_uav_id |
Referenced by consume(), and onUpdateParameters().
Systems Maneuver::VehicleFormation::FormCollAvoid::Task::m_uav_id_last |
Referenced by onUpdateParameters().
unsigned int Maneuver::VehicleFormation::FormCollAvoid::Task::m_uav_ind |
Referenced by consume(), onUpdateParameters(), and teamUnevenUpdate().
unsigned int Maneuver::VehicleFormation::FormCollAvoid::Task::m_uav_n |
Formation configuration.
Referenced by consume(), formationControl(), isControlActive(), onUpdateParameters(), teamPeriodicUpdate(), and teamUnevenUpdate().
bool Maneuver::VehicleFormation::FormCollAvoid::Task::m_valid_airspeed |
Referenced by consume(), and isControlActive().
Matrix Maneuver::VehicleFormation::FormCollAvoid::Task::m_vehicle_accel |
Referenced by consume(), leaderOutput(), onUpdateParameters(), teamPeriodicUpdate(), and teamUnevenUpdate().
Matrix Maneuver::VehicleFormation::FormCollAvoid::Task::m_vehicle_state |
System state variables.
Referenced by consume(), onUpdateParameters(), setLeaderState(), teamPeriodicUpdate(), and teamUnevenUpdate().
std::vector<bool> Maneuver::VehicleFormation::FormCollAvoid::Task::m_vehicle_state_flag |
Referenced by consume(), isControlActive(), onUpdateParameters(), teamPeriodicUpdate(), and teamUnevenUpdate().
Matrix Maneuver::VehicleFormation::FormCollAvoid::Task::m_velocity |
Leader's simulated velocity (u,v,w,p,q,r).
Referenced by leaderOutput(), onUpdateParameters(), setLeaderState(), and teamPeriodicUpdate().
Matrix Maneuver::VehicleFormation::FormCollAvoid::Task::m_wind |
Environment variables.
Referenced by consume(), formationControl(), and leaderOutput().
Math::MovingAverage<fp64_t>* Maneuver::VehicleFormation::FormCollAvoid::Task::m_wind_avg_x |
Referenced by consume(), and onUpdateParameters().
Math::MovingAverage<fp64_t>* Maneuver::VehicleFormation::FormCollAvoid::Task::m_wind_avg_y |
Referenced by consume(), and onUpdateParameters().
Math::MovingAverage<fp64_t>* Maneuver::VehicleFormation::FormCollAvoid::Task::m_wind_avg_z |
Referenced by consume(), and onUpdateParameters().