Reputation: 59
Does anyone know how to synchronize the 2 clocks of Webots? the one of the console and the environment clock? because I am trying to use the internal python clock to define rotational movements and I cannot rotate at the desired angles because of the asynchronous clocks
Upvotes: 0
Views: 136
Reputation: 1834
Webots does not use the environment clock, it computes a "simulated time" based on the simulation events (mainly the physics discrete steps asked by the controller). Therefore, the controller and any library used by a Webots controller should use only the simulated time provided by Webots.
This can be achieved by calling the wb_robot_get_time function which changes at each wb_robot_step calls.
Upvotes: 1