DUNE: Uniform Navigational Environment
2020.01.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, 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 Monitors::Servos::Arguments::pos_fault_detect.
|
inline |
|
inline |
References Monitors::Servos::Arguments::curr_fault_detect.
|
inline |
References Monitors::Servos::Arguments::elabel_ampg.
|
inline |
References Monitors::Servos::Arguments::pos_fault_detect.
|
inline |
|
inline |
|
inline |
|
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.
|
inline |
Test for fault in servo positioning.
[in] | msg | pointer to ServoPosition message |
References Monitors::Servos::Arguments::error_time, Monitors::Servos::FT_POSITION, Monitors::Servos::Arguments::max_rotation_rate, Monitors::Servos::Arguments::pos_error_delay, Monitors::Servos::Arguments::pos_error_samples, Monitors::Servos::Arguments::pos_error_threshold, and Monitors::Servos::Arguments::rate_factor.
|
inline |
Update entity state according to fault states.
[in] | id | number id of the servo |
References Monitors::Servos::Arguments::error_count, and Monitors::Servos::FT_NONE.
unsigned Monitors::Servos::Task::m_curr_ents[c_servo_count] |
Electric current entity ids.
ServoCurrentMonitor<float>* Monitors::Servos::Task::m_curr_monitor[c_servo_count] |
Servo Current Fault Monitors.
std::string Monitors::Servos::Task::m_error_str |
String to hold the last error.
uint8_t Monitors::Servos::Task::m_on_fault[c_servo_count] |
Fault mask to keep track of fault types.
ServoPositionMonitor<float>* Monitors::Servos::Task::m_pos_monitor[c_servo_count] |
Position fault detection array.
std::queue<double> Monitors::Servos::Task::m_queue[c_servo_count] |
Queue for error reports.
bool Monitors::Servos::Task::m_servo_fail |
Major failure in one of the servos.
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.
Time::Counter<float> Monitors::Servos::Task::m_timer |
Timer for error timeout.