|
bitsim
Model, simulate, estimate and control robots in C++
|
The radio link to a simulated quadrotor: the transmitter end sends commands, and the simulated receiver reads the latest one. More...
#include <sim_rc_link.h>


Public Member Functions | |
| SIM_RCLink (real_t timeout=0.5) | |
| void | send (const control::RCCommand &command, real_t time) override |
| Send a command at time [s], the clock of the application. | |
| std::string | backend_type_str () const override |
| The name of the backend, such as SIMULATION. | |
| control::RCCommand | receive (real_t time) const |
| What the receiver passes to the flight controller at time [s]: the last command, clamped, or the failsafe command. | |
| bool | in_failsafe (real_t time) const noexcept |
| True when the receiver has heard nothing for longer than the timeout at time [s]. | |
| real_t | timeout () const noexcept |
| Public Member Functions inherited from bitsim::boards::RCTransmitterBase | |
| virtual | ~RCTransmitterBase ()=default |
The radio link to a simulated quadrotor: the transmitter end sends commands, and the simulated receiver reads the latest one.
Like a real receiver, it goes into failsafe when it has heard nothing for longer than the timeout, or before the first command: it then gives control::failsafe_command(), which disarms the drone so that its motors stop.
|
explicit |
| timeout | How long the receiver waits for a command before it goes into failsafe [s] |
|
inlineoverridevirtual |
The name of the backend, such as SIMULATION.
Implements bitsim::boards::RCTransmitterBase.
|
noexcept |
True when the receiver has heard nothing for longer than the timeout at time [s].
| control::RCCommand bitsim::boards::SIM_RCLink::receive | ( | real_t | time | ) | const |
What the receiver passes to the flight controller at time [s]: the last command, clamped, or the failsafe command.
|
overridevirtual |
Send a command at time [s], the clock of the application.
Implements bitsim::boards::RCTransmitterBase.
|
inlinenoexcept |