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

Skip some camera updates to reach a higher RTF #43

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

ch-MEIJIE
Copy link
Contributor

Based on the discussions in issue #42, here is a minor improvement.

The camera update consumes a significant amount of time (~16ms) and has become a bottleneck, causing the simulation RTF (real-time factor) to always be below 0.5. We observed that every control step (120Hz) calls a camera update, taking up 1920ms of CPU time (ideally, it should be under 1000ms). To address this, we decided to skip some camera steps (the default value was set to 4), which helps ensure an RTF close to 1.

@jjshoots jjshoots changed the base branch from master to staggered_render June 24, 2024 01:37
@jjshoots
Copy link
Owner

Thanks for the improvement! I will make some minor changes before this goes into the main branch. Should be out by end of today in PyFlyt 0.22.0. :)

@jjshoots jjshoots merged commit 7f72be7 into jjshoots:staggered_render Jun 24, 2024
6 of 10 checks passed
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.

2 participants