RoboCup-SSL / grSim

RoboCup Small Size Robot Soccer Simulator
https://ssl.robocup.org/league-software/
Other
130 stars 133 forks source link

Issue 124 - Added concept of simulation time. #139

Closed bucefalog closed 3 years ago

bucefalog commented 3 years ago

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.

g3force commented 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.