Gazebo: Q&A Forum - RSS feedhttp://answers.gazebosim.org/questions/Open source question and answer forum for GazeboenCopyright Askbot, 2010-2011.Mon, 02 Jan 2023 09:34:27 -0600Is it possible to synchronize Gazebo /clock with respect to node calculations?http://answers.gazebosim.org/question/28682/is-it-possible-to-synchronize-gazebo-clock-with-respect-to-node-calculations/Python calculations in the node take a long time, and Gazebo simulation is "faster".
As I understand it, with `rosparam set use_sim_time true` it is possible to enable synchronization of **moments of Python function calls in ROS**, for the frequency set by "rospy.Rate". And this is done based on the moments of time read from `/clock` generated by Gazebo. That means it's not what I need.
Is it possible to synchronize **the Gazebo to the moments of computation completion** in the node?
The only idea I found was to slow down the Gazebo calculations *by reducing the `real_time_factor` parameter*.
Edit: change `real_time_factor` does not work (Gazebo 9). You should instead change `max_step_size` or/and `real_time_update_rate`.
Then, using `rosparam set use_sim_time true` the ROS will synchronize with the corresponding moments of Gazebo time. However, this requires estimating the longest possible calculation time and is not particularly convenient. Can it be done more cleverly?
Generally, the question is about ROS1 and Gazebo classic.sendilkelmMon, 02 Jan 2023 09:34:27 -0600http://answers.gazebosim.org/question/28682/