DUNE: Uniform Navigational Environment
2019.02.0
|
Public Member Functions | |
Task (const std::string &name, Tasks::Context &ctx) | |
void | onUpdateParameters (void) |
void | onEntityResolution (void) |
void | onResourceRelease (void) |
void | onResourceAcquisition (void) |
void | onResourceInitialization (void) |
void | consume (const IMC::ServoPosition *msg) |
void | consume (const IMC::SetServoPosition *msg) |
void | consume (const IMC::Current *msg) |
void | testPositionFaults (const IMC::ServoPosition *msg) |
void | testCurrentFaults (float value, unsigned i) |
void | updateState (unsigned id) |
void | onMain (void) |
Public Attributes | |
Arguments | m_args |
ServoPositionMonitor< float > * | m_pos_monitor [c_servo_count] |
float | m_servo_pos [c_servo_count] |
float | m_set_servo [c_servo_count] |
ServoCurrentMonitor< float > * | m_curr_monitor [c_servo_count] |
unsigned | m_curr_ents [c_servo_count] |
std::string | m_error_str |
uint8_t | m_on_fault [c_servo_count] |
Time::Counter< float > | m_timer |
std::queue< double > | m_queue [c_servo_count] |
bool | m_servo_fail |
|
inline |
References Monitors::Servos::Arguments::curr_fault_detect, Monitors::Servos::Arguments::curr_lower, Monitors::Servos::Arguments::curr_upper, Monitors::Servos::Arguments::elabel_ampg, Monitors::Servos::Arguments::error_count, Monitors::Servos::Arguments::error_time, Monitors::Servos::Arguments::fault_cooldown, m_args, m_curr_monitor, m_pos_monitor, Monitors::Servos::Arguments::max_lfaults, Monitors::Servos::Arguments::max_rotation_rate, Monitors::Servos::Arguments::max_ufaults, Monitors::Servos::Arguments::pos_error_delay, Monitors::Servos::Arguments::pos_error_samples, Monitors::Servos::Arguments::pos_error_threshold, Monitors::Servos::Arguments::pos_fault_detect, and Monitors::Servos::Arguments::rate_factor.
|
inline |
References m_args, m_timer, Monitors::Servos::Arguments::pos_fault_detect, and testPositionFaults().
|
inline |
References m_set_servo.
|
inline |
References Monitors::Servos::Arguments::curr_fault_detect, m_args, m_curr_ents, and testCurrentFaults().
|
inline |
References Monitors::Servos::Arguments::elabel_ampg, m_args, and m_curr_ents.
|
inline |
References m_args, m_servo_fail, m_timer, and Monitors::Servos::Arguments::pos_fault_detect.
|
inline |
|
inline |
|
inline |
References m_curr_monitor, and m_pos_monitor.
|
inline |
|
inline |
This method will attempt to detect faults in the servo using electric current readings.
[in] | value | electric current value received |
[in] | i | number of the servo to test for faults |
References Monitors::Servos::FT_CURRENT, m_curr_monitor, m_error_str, m_on_fault, and updateState().
Referenced by consume().
|
inline |
Test for fault in servo positioning.
[in] | msg | pointer to ServoPosition message |
References Monitors::Servos::Arguments::error_time, Monitors::Servos::FT_POSITION, m_args, m_error_str, m_on_fault, m_pos_monitor, m_queue, m_set_servo, Monitors::Servos::Arguments::max_rotation_rate, Monitors::Servos::Arguments::pos_error_delay, Monitors::Servos::Arguments::pos_error_samples, Monitors::Servos::Arguments::pos_error_threshold, Monitors::Servos::Arguments::rate_factor, and updateState().
Referenced by consume().
|
inline |
Update entity state according to fault states.
[in] | id | number id of the servo |
References Monitors::Servos::Arguments::error_count, Monitors::Servos::FT_NONE, m_args, m_error_str, m_on_fault, m_queue, and m_servo_fail.
Referenced by testCurrentFaults(), and testPositionFaults().
Arguments Monitors::Servos::Task::m_args |
Task arguments.
Referenced by consume(), onEntityResolution(), onMain(), onResourceAcquisition(), onResourceInitialization(), onUpdateParameters(), Task(), testPositionFaults(), and updateState().
unsigned Monitors::Servos::Task::m_curr_ents[c_servo_count] |
Electric current entity ids.
Referenced by consume(), and onEntityResolution().
ServoCurrentMonitor<float>* Monitors::Servos::Task::m_curr_monitor[c_servo_count] |
Servo Current Fault Monitors.
Referenced by onResourceAcquisition(), onResourceRelease(), Task(), and testCurrentFaults().
std::string Monitors::Servos::Task::m_error_str |
String to hold the last error.
Referenced by testCurrentFaults(), testPositionFaults(), and updateState().
uint8_t Monitors::Servos::Task::m_on_fault[c_servo_count] |
Fault mask to keep track of fault types.
Referenced by onResourceInitialization(), testCurrentFaults(), testPositionFaults(), and updateState().
ServoPositionMonitor<float>* Monitors::Servos::Task::m_pos_monitor[c_servo_count] |
Position fault detection array.
Referenced by onResourceRelease(), Task(), and testPositionFaults().
std::queue<double> Monitors::Servos::Task::m_queue[c_servo_count] |
Queue for error reports.
Referenced by testPositionFaults(), and updateState().
bool Monitors::Servos::Task::m_servo_fail |
Major failure in one of the servos.
Referenced by onMain(), and updateState().
float Monitors::Servos::Task::m_servo_pos[c_servo_count] |
Servo position.
float Monitors::Servos::Task::m_set_servo[c_servo_count] |
Set Servo position values.
Referenced by consume(), onResourceInitialization(), and testPositionFaults().
Time::Counter<float> Monitors::Servos::Task::m_timer |
Timer for error timeout.
Referenced by consume(), onMain(), and onResourceInitialization().