23 #include <boost/asio.hpp> 24 #include <utils/time/timesource.h> 25 #include <utils/time/clock.h> 27 #include "../msgs/SimTime.pb.h" 29 #ifndef __GAZEBO_TIMESOURCE_H_ 30 #define __GAZEBO_TIMESOURCE_H_ 33 typedef const boost::shared_ptr<gazsim_msgs::SimTime const> ConstSimTimePtr;
49 virtual void get_time(timeval* tv)
const;
57 timeval get_system_time()
const;
58 timeval add(timeval a, timeval b)
const;
59 timeval subtract(timeval a, timeval b)
const;
65 timeval last_sim_time_;
66 timeval last_sys_recv_time_;
67 double last_real_time_factor_;
68 timeval last_native_sim_time_;
virtual timeval conv_to_realtime(const timeval *tv) const
Convert a time given w.r.t.
GazsimTimesource(Clock *clock)
Constructor.
Fawkes library namespace.
This is supposed to be the central clock in Fawkes.
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...
void on_time_sync_msg(ConstSimTimePtr &msg)
store data from gazebo time message
~GazsimTimesource()
Destructor.
This time-source provides the simulation time from Gazebo in Fawkes.
virtual timeval conv_native_to_exttime(const timeval *tv) const
Convert a native time to the external time.