|
Fawkes API
Fawkes Development Version
|
This time-source provides the simulation time from Gazebo in Fawkes. More...
#include <gazsim_timesource_source.h>

Public Member Functions | |
| GazsimTimesource (Clock *clock) | |
| Constructor. More... | |
| ~GazsimTimesource () | |
| Destructor. More... | |
| virtual void | get_time (timeval *tv) const |
| The Simulation time is estimated by looking at the timeinterval to the last received msg and the last real time factor. More... | |
| virtual timeval | conv_to_realtime (const timeval *tv) const |
| Convert a time given w.r.t. More... | |
| virtual timeval | conv_native_to_exttime (const timeval *tv) const |
| Convert a native time to the external time. More... | |
| void | on_time_sync_msg (ConstSimTimePtr &msg) |
| store data from gazebo time message More... | |
Public Member Functions inherited from fawkes::TimeSource | |
| virtual | ~TimeSource () |
| Destructor. More... | |
This time-source provides the simulation time from Gazebo in Fawkes.
Definition at line 40 of file gazsim_timesource_source.h.
| GazsimTimesource::GazsimTimesource | ( | Clock * | clock | ) |
Constructor.
| clock | pointer to fawkes clock |
Definition at line 31 of file gazsim_timesource_source.cpp.
References fawkes::Clock::get_systime().
| GazsimTimesource::~GazsimTimesource | ( | ) |
Destructor.
Definition at line 41 of file gazsim_timesource_source.cpp.
|
virtual |
Convert a native time to the external time.
When communicating with another instance which provides times in some timeformat native to the underlying time source (e.g. received from a simulation) it must be converted to a Fawkes time.
| tv | time in external time source native format |
Implements fawkes::TimeSource.
Definition at line 87 of file gazsim_timesource_source.cpp.
|
virtual |
Convert a time given w.r.t.
this time sources into system time.
| tv | the time to convert |
Implements fawkes::TimeSource.
Definition at line 71 of file gazsim_timesource_source.cpp.
|
virtual |
The Simulation time is estimated by looking at the timeinterval to the last received msg and the last real time factor.
With this method, I want to reduce the number of send messages from Gazebo
| tv | timeinterval |
Implements fawkes::TimeSource.
Definition at line 51 of file gazsim_timesource_source.cpp.
Referenced by on_time_sync_msg().
| void GazsimTimesource::on_time_sync_msg | ( | ConstSimTimePtr & | msg | ) |
store data from gazebo time message
| msg | message |
Definition at line 105 of file gazsim_timesource_source.cpp.
References fawkes::Clock::get_systime(), and get_time().