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

Reset internal force of point mass before every simulation step #1372

Merged
merged 3 commits into from
Jul 14, 2019

Conversation

jslee02
Copy link
Member

@jslee02 jslee02 commented Jul 13, 2019

The soft body simulation behaves unexpectedly when the simulation option is resetCommand = false. The root cause was that the internal forces of point masses, which are used for soft body simulation, are not reset to zero in every simulation step. In the rigid body case, this issues doesn't happen because the internal forces are set to the control command. Soft body, however, doesn't have control command API so it keeps the previous value, and this leads to the unexpected behavior.

This PR fixes the issue by always setting the internal forces of point mass to zero regardless of the resetCommand option.

Resolves #1370


Before creating a pull request

  • Document new methods and classes
  • Format new code files using clang-format

Before merging a pull request

  • Set version target by selecting a milestone on the right side
  • Summarize this change in CHANGELOG.md
  • Add unit test(s) for this change

@jslee02 jslee02 added this to the DART 6.10.0 milestone Jul 13, 2019
@codecov
Copy link

codecov bot commented Jul 14, 2019

Codecov Report

Merging #1372 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff            @@
##           master   #1372      +/-   ##
=========================================
+ Coverage   56.89%   56.9%   +<.01%     
=========================================
  Files         366     366              
  Lines       27389   27390       +1     
=========================================
+ Hits        15584   15585       +1     
  Misses      11805   11805
Impacted Files Coverage Δ
dart/dynamics/SoftBodyNode.cpp 39.39% <100%> (+0.03%) ⬆️
dart/dynamics/PointMass.cpp 45.9% <100%> (ø) ⬆️

@jslee02 jslee02 merged commit 2466c01 into master Jul 14, 2019
@jslee02 jslee02 deleted the bugfix/point_mass_internal_force_reset branch July 14, 2019 19:34
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.

Simulation World resetCommand argument
1 participant