Closed bucefalog closed 3 years ago
Looks good to me. I've tested it and get the exact configured time step (0.016) as delta time between the frames, as expected.
When setting fps = 30 and keep time step = 0.01666, the calculated velocity is still correct, but the simulator will only send 30 frames per second and the simulation is running with half speed. That's what I would expect.
Issue or RFC Endorsed by GrSim's Maintainers
https://github.com/RoboCup-SSL/grSim/issues/124
Description of the Change
Added concept of simulation time.
Alternate Designs
Alternative was to report wall time instead of simulation time which makes simulation speed dependent of cpu performance and load.
Possible Drawbacks
None expected
Verification Process
Build grSim after changes. Compared desired vs measured robot speed from 3rd party software under different fps.
Release Notes
SSL packages now reports the simulation time which allows for correct readings of simulated speeds. Otherwise, the speed measured would depend on grSim's fps which would differ from the speed command sent to the robots.