DUNE: Uniform Navigational Environment
2016.03.0
|
Public Member Functions | |
Task (const std::string &name, Tasks::Context &ctx) | |
void | onUpdateParameters (void) |
void | onEntityResolution (void) |
void | onActivation (void) |
void | onDeactivation (void) |
void | reset (void) |
void | setup (void) |
void | onResourceInitialization (void) |
void | consume (const IMC::Abort *msg) |
void | consume (const IMC::EstimatedState *msg) |
void | consume (const IMC::DesiredHeading *msg) |
void | consume (const IMC::DesiredSpeed *msg) |
void | consume (const IMC::ControlLoops *msg) |
void | consume (const IMC::Rpm *msg) |
float | rpmToThrust (float rpm, float desired_rpm, double timestep) |
float | mpsToRpm (float vel, double timestep) |
void | dispatchThrust (float value, double timestep, uint8_t id) |
void | onMain (void) |
Public Attributes | |
DiscretePID | m_rpm_pid |
DiscretePID | m_mps_pid |
DiscretePID | m_yaw_pid |
IMC::ControlParcel | m_parcel_mps |
IMC::ControlParcel | m_parcel_rpm |
IMC::ControlParcel | m_parcel_yaw |
float | m_desired_yaw |
float | m_desired_speed |
uint8_t | m_speed_units |
Delta | m_delta |
IMC::SetThrusterActuation | m_act [2] |
IMC::SetThrusterActuation | m_last_act [2] |
IMC::Rpm | m_rpm [2] |
float | m_previous_rpm |
bool | m_common |
uint16_t | m_rpm_eid [2] |
uint32_t | m_scope_ref |
Arguments | m_args |
|
inline |
References Control::ASV::HeadingAndSpeed::Arguments::act_diff_max, Control::ASV::HeadingAndSpeed::Arguments::act_max, Control::ASV::HeadingAndSpeed::Arguments::act_ramp, Control::ASV::HeadingAndSpeed::Arguments::eid_port, Control::ASV::HeadingAndSpeed::Arguments::eid_starboard, Control::ASV::HeadingAndSpeed::Arguments::log_parcels, m_args, Control::ASV::HeadingAndSpeed::Arguments::max_accel, Control::ASV::HeadingAndSpeed::Arguments::max_rpm, Control::ASV::HeadingAndSpeed::Arguments::min_rpm, Control::ASV::HeadingAndSpeed::Arguments::mps_ffgain, Control::ASV::HeadingAndSpeed::Arguments::mps_gains, Control::ASV::HeadingAndSpeed::Arguments::mps_max_int, Control::ASV::HeadingAndSpeed::Arguments::rpm_eos, Control::ASV::HeadingAndSpeed::Arguments::rpm_ffgain, Control::ASV::HeadingAndSpeed::Arguments::rpm_gains, Control::ASV::HeadingAndSpeed::Arguments::rpm_hardware, Control::ASV::HeadingAndSpeed::Arguments::share, Control::ASV::HeadingAndSpeed::Arguments::yaw_gains, Control::ASV::HeadingAndSpeed::Arguments::yaw_max, and Control::ASV::HeadingAndSpeed::Arguments::yaw_max_hrate.
|
inline |
References reset().
|
inline |
References Control::ASV::HeadingAndSpeed::Arguments::act_diff_max, Control::ASV::HeadingAndSpeed::Arguments::act_max, dispatchThrust(), m_act, m_args, m_common, m_delta, m_desired_speed, m_desired_yaw, m_parcel_yaw, m_previous_rpm, m_rpm, m_speed_units, m_yaw_pid, mpsToRpm(), rpmToThrust(), Control::ASV::HeadingAndSpeed::Arguments::share, and Control::ASV::HeadingAndSpeed::Arguments::yaw_max.
|
inline |
References m_desired_yaw.
|
inline |
References m_desired_speed, and m_speed_units.
|
inline |
References m_scope_ref, and reset().
|
inline |
|
inline |
Dispatch to bus SetThrusterActuation message.
[in] | value | set thrust actuation value |
[in] | timestep | amount of time since last control step |
References Control::ASV::HeadingAndSpeed::Arguments::act_max, Control::ASV::HeadingAndSpeed::Arguments::act_ramp, m_act, m_args, m_last_act, and DUNE::Math::trimValue().
Referenced by consume().
|
inline |
Convert meters per second to a desired rpm value.
[in] | vel | absolute ground velocity. |
[in] | timestep | amount of time since last control step. |
References m_args, m_desired_speed, m_mps_pid, m_parcel_mps, m_previous_rpm, Control::ASV::HeadingAndSpeed::Arguments::max_accel, Control::ASV::HeadingAndSpeed::Arguments::max_rpm, Control::ASV::HeadingAndSpeed::Arguments::min_rpm, and Control::ASV::HeadingAndSpeed::Arguments::mps_ffgain.
Referenced by consume().
|
inline |
On activation.
|
inline |
On deactivation.
|
inline |
|
inline |
|
inline |
References reset().
|
inline |
References Control::ASV::HeadingAndSpeed::Arguments::log_parcels, m_args, Control::ASV::HeadingAndSpeed::Arguments::mps_ffgain, Control::ASV::HeadingAndSpeed::Arguments::mps_gains, Control::ASV::HeadingAndSpeed::Arguments::mps_max_int, reset(), Control::ASV::HeadingAndSpeed::Arguments::rpm_ffgain, Control::ASV::HeadingAndSpeed::Arguments::rpm_gains, setup(), Control::ASV::HeadingAndSpeed::Arguments::yaw_gains, Control::ASV::HeadingAndSpeed::Arguments::yaw_max, and Control::ASV::HeadingAndSpeed::Arguments::yaw_max_hrate.
|
inline |
References m_act, m_desired_speed, m_last_act, m_mps_pid, m_previous_rpm, m_rpm_pid, m_speed_units, and m_yaw_pid.
Referenced by consume(), onResourceInitialization(), and onUpdateParameters().
|
inline |
Convert rpm value to thrust actuation.
[in] | rpm | value of rpms currently in the motor |
[in] | desired_rpm | desired rpms for the motor |
[in] | timestep | amount of time since last control step |
References m_args, m_parcel_rpm, m_rpm_pid, Control::ASV::HeadingAndSpeed::Arguments::rpm_eos, Control::ASV::HeadingAndSpeed::Arguments::rpm_ffgain, and Control::ASV::HeadingAndSpeed::Arguments::rpm_hardware.
Referenced by consume().
|
inline |
References Control::ASV::HeadingAndSpeed::Arguments::act_max, Control::ASV::HeadingAndSpeed::Arguments::log_parcels, m_args, m_mps_pid, m_parcel_mps, m_parcel_rpm, m_parcel_yaw, m_rpm_pid, m_yaw_pid, Control::ASV::HeadingAndSpeed::Arguments::mps_gains, Control::ASV::HeadingAndSpeed::Arguments::mps_max_int, Control::ASV::HeadingAndSpeed::Arguments::rpm_gains, Control::ASV::HeadingAndSpeed::Arguments::yaw_gains, and Control::ASV::HeadingAndSpeed::Arguments::yaw_max_hrate.
Referenced by onUpdateParameters().
IMC::SetThrusterActuation Control::ASV::HeadingAndSpeed::Task::m_act[2] |
Current motor actuation.
Referenced by consume(), dispatchThrust(), and reset().
Arguments Control::ASV::HeadingAndSpeed::Task::m_args |
Task arguments.
Referenced by consume(), dispatchThrust(), mpsToRpm(), onEntityResolution(), onUpdateParameters(), rpmToThrust(), setup(), and Task().
bool Control::ASV::HeadingAndSpeed::Task::m_common |
Apply common actuation.
Referenced by consume().
Delta Control::ASV::HeadingAndSpeed::Task::m_delta |
Time of last estimated state message.
Referenced by consume().
float Control::ASV::HeadingAndSpeed::Task::m_desired_speed |
Desired speed.
Referenced by consume(), mpsToRpm(), and reset().
float Control::ASV::HeadingAndSpeed::Task::m_desired_yaw |
Desired heading.
Referenced by consume().
IMC::SetThrusterActuation Control::ASV::HeadingAndSpeed::Task::m_last_act[2] |
Last motor actuation.
Referenced by dispatchThrust(), and reset().
DiscretePID Control::ASV::HeadingAndSpeed::Task::m_mps_pid |
MPS PID controller.
Referenced by mpsToRpm(), reset(), and setup().
IMC::ControlParcel Control::ASV::HeadingAndSpeed::Task::m_parcel_mps |
Control Parcels for meters per second controller.
Referenced by mpsToRpm(), and setup().
IMC::ControlParcel Control::ASV::HeadingAndSpeed::Task::m_parcel_rpm |
Control Parcels for rpm controller.
Referenced by rpmToThrust(), and setup().
IMC::ControlParcel Control::ASV::HeadingAndSpeed::Task::m_parcel_yaw |
float Control::ASV::HeadingAndSpeed::Task::m_previous_rpm |
previous value of the desired rpm speed
Referenced by consume(), mpsToRpm(), and reset().
IMC::Rpm Control::ASV::HeadingAndSpeed::Task::m_rpm[2] |
Motor rpm.
Referenced by consume().
uint16_t Control::ASV::HeadingAndSpeed::Task::m_rpm_eid[2] |
Motor rpm entity id.
Referenced by consume(), and onEntityResolution().
DiscretePID Control::ASV::HeadingAndSpeed::Task::m_rpm_pid |
RPM PID controller.
Referenced by reset(), rpmToThrust(), and setup().
uint32_t Control::ASV::HeadingAndSpeed::Task::m_scope_ref |
uint8_t Control::ASV::HeadingAndSpeed::Task::m_speed_units |
DiscretePID Control::ASV::HeadingAndSpeed::Task::m_yaw_pid |