|
Easy Navigation
|
Turns the safety channel's SafetyStatus messages into what EasyNav applies. More...
#include <SafetyChannelMonitor.hpp>
Classes | |
| struct | Evaluation |
Public Types | |
| using | Clock = std::chrono::steady_clock |
| enum class | Condition : uint8_t { VALID , NO_STATUS , STALE , INVALID } |
| Why the state is what it is. More... | |
| using | Status = easynav_interfaces::msg::SafetyStatus |
Public Member Functions | |
| void | configure (double timeout) |
Sets the timeout (s, > 0) and forgets any status. | |
| Evaluation | evaluate (Clock::time_point now) const |
The state to apply at now. | |
| std::optional< Status > | last_status () const |
| The last status received, if any. | |
| void | received (const Status &msg, Clock::time_point now) |
A status msg was received at now. | |
Static Public Member Functions | |
| static std::string | invalid_reason (const Status &msg) |
Why msg is invalid, or "". | |
Turns the safety channel's SafetyStatus messages into what EasyNav applies.
With no valid status received within the last timeout seconds, the status is lost, and that is treated as a protective stop. Times are reception times on the monotonic clock, so they do not depend on the publisher's clock. received() and evaluate() may run in different threads.
| using Clock = std::chrono::steady_clock |
| using Status = easynav_interfaces::msg::SafetyStatus |
|
strong |
| void configure | ( | double | timeout | ) |
Sets the timeout (s, > 0) and forgets any status.
| SafetyChannelMonitor::Evaluation evaluate | ( | Clock::time_point | now | ) | const |
The state to apply at now.
|
static |
Why msg is invalid, or "".
| std::optional< SafetyChannelMonitor::Status > last_status | ( | ) | const |
The last status received, if any.
| void received | ( | const Status & | msg, |
| Clock::time_point | now ) |
A status msg was received at now.