|
mc_rtc
2.14.0
|
#include <mc_control/Ticker.h>

Classes | |
| struct | Configuration |
Public Member Functions | |
| Ticker (const Configuration &config) | |
| void | reset () |
| bool | step () |
| void | run () |
| double | elapsed_time () const noexcept |
| const mc_control::MCGlobalController & | controller () const noexcept |
| mc_control::MCGlobalController & | controller () noexcept |
Protected Member Functions | |
| void | simulate_sensors () |
| void | setup_gui () |
| void | set_time (double t) |
Protected Attributes | |
| Configuration | config_ |
| mc_control::MCGlobalController | gc_ |
| std::shared_ptr< mc_rtc::log::FlatLog > | log_ |
| size_t | iters_ = 0 |
| double | sim_real_ratio_ = 1.0 |
| std::atomic< bool > | do_reset_ = false |
| bool | running_ = true |
| bool | replay_done_ = false |
| int64_t | rem_steps_ = 0 |
A ticker runs a (potentially infinite) loop of MCGlobalController
The default behavior is to run in open-loop mode where the outputs of mc_rtc are used to feed the inputs of MCGlobalController
It also supports loading log files to replay inputs, in replay we can:
| mc_control::Ticker::Ticker | ( | const Configuration & | config | ) |
Initialize the ticker with the given configuration, this also initialize the controller
|
inlinenoexcept |
Access the controller (const)
|
inlinenoexcept |
Access the controller
|
inlinenoexcept |
Elapsed simulation time since the last reset
| void mc_control::Ticker::reset | ( | ) |
Reset the ticker to the initial configuration
Note: the reset happes on the next call to step()
| void mc_control::Ticker::run | ( | ) |
Run as many iterations as configured
|
protected |
|
protected |
|
protected |
| bool mc_control::Ticker::step | ( | ) |
Run one step
This function does not do any time synchronization
|
protected |
|
protected |
Do a reset on the next iteration
|
protected |
|
protected |
Number of steps taken since the last reset
|
protected |
|
protected |
Number of steps remaning before going back to pause
|
protected |
True when the replay is done
|
protected |
True while running
|
protected |
Current sim/real ratio