23 #include "../msgs/SimTime.pb.h" 25 #include <utils/time/clock.h> 26 #include <utils/time/timesource.h> 28 #include <boost/asio.hpp> 30 #ifndef _GAZEBO_TIMESOURCE_H_ 31 # define _GAZEBO_TIMESOURCE_H_ 33 typedef const boost::shared_ptr<gazsim_msgs::SimTime const> ConstSimTimePtr;
48 virtual void get_time(timeval *tv)
const;
56 timeval get_system_time()
const;
57 timeval add(timeval a, timeval b)
const;
58 timeval subtract(timeval a, timeval b)
const;
64 timeval last_sim_time_;
65 timeval last_sys_recv_time_;
66 double last_real_time_factor_;
67 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.