Class robot_dart::Scheduler¶
ClassList > robot_dart > Scheduler
Public Functions¶
Type | Name |
---|---|
Scheduler (double dt, bool sync=false) |
|
double | current_time () const current time according to the simulation (simulation clock) |
double | dt () const dt used by the simulation (simulation clock) |
double | it_duration () const |
double | last_it_duration () const |
double | next_time () const next time according to the simulation (simulation clock) |
bool | operator() (int frequency) |
double | real_time () const time according to the clock's computer (wall clock) |
double | real_time_factor () const |
void | reset (double dt, bool sync=false, double current_time=0., double real_time=0.) |
bool | schedule (int frequency) |
void | set_sync (bool enable) |
double | step () |
bool | sync () const |
Protected Types¶
Type | Name |
---|---|
typedef std::chrono::high_resolution_clock | clock_t |
Protected Attributes¶
Type | Name |
---|---|
double | _average_it_duration = = 0. |
int | _current_step = = 0 |
double | _current_time = = 0. |
double | _dt |
double | _it_duration = = 0. |
clock_t::time_point | _last_iteration_time |
int | _max_frequency = = -1 |
double | _real_start_time = = 0. |
double | _real_time = = 0. |
double | _simu_start_time = = 0. |
clock_t::time_point | _start_time |
bool | _sync |
Public Functions Documentation¶
function Scheduler¶
function current_time¶
function dt¶
function it_duration¶
function last_it_duration¶
function next_time¶
function operator()¶
function real_time¶
function real_time_factor¶
function reset¶
void robot_dart::Scheduler::reset (
double dt,
bool sync=false,
double current_time=0.,
double real_time=0.
)
function schedule¶
function set_sync¶
synchronize the simulation clock with the wall clock (when possible, i.e. when the simulation is faster than real time)
function step¶
call this at the end of the loop (see examples) this will synchronize with real time if requested and increase the counter; returns the real-time (in seconds)
function sync¶
Protected Types Documentation¶
typedef clock_t¶
Protected Attributes Documentation¶
variable _average_it_duration¶
variable _current_step¶
variable _current_time¶
variable _dt¶
variable _it_duration¶
variable _last_iteration_time¶
variable _max_frequency¶
variable _real_start_time¶
variable _real_time¶
variable _simu_start_time¶
variable _start_time¶
variable _sync¶
The documentation for this class was generated from the following file robot_dart/scheduler.hpp