Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 124 - Added concept of simulation time. #139

Merged
merged 1 commit into from
Jan 24, 2021

Conversation

bucefalog
Copy link
Contributor

Issue or RFC Endorsed by GrSim's Maintainers

#124

Description of the Change

Added concept of simulation time.

  • Simulator now keeps track of simulated time.
  • SSL packages now report simulated time instead of wall 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.

Simulator now keeps track of simulated time.
SSL packages now report simulated time instead of wall time.
@g3force
Copy link
Member

g3force commented Jan 23, 2021

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.

@g3force g3force requested a review from mahi97 January 23, 2021 12:29
Copy link
Member

@mahi97 mahi97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me too.
Thanks for the PR.

@mahi97 mahi97 merged commit f3c6cfc into RoboCup-SSL:master Jan 24, 2021
@EtienneSchmitz EtienneSchmitz mentioned this pull request Jan 27, 2021
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants