Skip to content

Fix delta_time being 0 resulting in incorrect simulation#660

Merged
sebcrozet merged 7 commits intodimforge:masterfrom
ThierryBerger:659-fix_delta_time_0_NaN
Jun 23, 2024
Merged

Fix delta_time being 0 resulting in incorrect simulation#660
sebcrozet merged 7 commits intodimforge:masterfrom
ThierryBerger:659-fix_delta_time_0_NaN

Conversation

@ThierryBerger
Copy link
Copy Markdown
Contributor

@ThierryBerger ThierryBerger commented Jun 21, 2024

Fixes #659.

Bug introduced by #635.

Disclaimer: I am NOT confident about the correction, but I'm confident it's the correct place to fix :).

@ThierryBerger ThierryBerger marked this pull request as ready for review June 21, 2024 09:38
@@ -221,7 +221,11 @@ impl IntegrationParameters {
pub fn joint_cfm_coeff(&self) -> Real {
// Compute CFM assuming a critically damped spring multiplied by the damping ratio.
// The logic is similar to `Self::cfm_factor`.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

should a similar correction be applied to cfm_factor ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

also, the correct function referred to is probably contact_cfm_factor ?

@ThierryBerger ThierryBerger force-pushed the 659-fix_delta_time_0_NaN branch from d613e64 to e4e3135 Compare June 21, 2024 10:13
@ThierryBerger ThierryBerger requested a review from sebcrozet June 21, 2024 10:18
@ThierryBerger ThierryBerger force-pushed the 659-fix_delta_time_0_NaN branch from 90736e3 to 4dcd38e Compare June 21, 2024 15:40
@ThierryBerger ThierryBerger requested a review from sebcrozet June 21, 2024 15:41
@sebcrozet sebcrozet merged commit 3e8650f into dimforge:master Jun 23, 2024
@sebcrozet
Copy link
Copy Markdown
Member

Thanks!

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.

delta_time being 0 results in incorrect simulation

2 participants