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

Enhance documentation and tests for center of mass functions; clarify relationship to forward dynamics #21703

Merged

Conversation

mitiguy
Copy link
Contributor

@mitiguy mitiguy commented Jul 10, 2024

Work to enhance documentation and tests after PR #21599 recently merged.
Note: PR #21599 is work towards issue #14269.

This PR has the following.

  1. Better comments before each TEST_F function in multibody_plant_kinematics_test.cc

  2. Remove antiquated TODO(Mitiguy) commented-out block of code.

  3. Fix varios typos.

  4. Improve exception messages for the center of mass functions MultibodyPlant::CalcJacobianCenterOfMassTranslationalVelocity() and
    MultibodyPlant::CalcBiasCenterOfMassTranslationalAcceleration() so they match similar exceptions messages in other center of mass functions. Adds tests for those two exceptions messages (these tests were missing).

  5. Most importantly, added the following comment in rigidy_body.h to
    RigidBody:: CalcCenterOfMassTranslationalAccelerationInWorld()
    /// @note When cached values are out of sync with the state stored in context,
    /// this method performs an expensive forward dynamics computation, whereas
    /// once evaluated, successive calls to this method are inexpensive.

It is important to realize that calling MultibodyPlant::CalcSpatialAccelerationsFromVdot() does affect the results of
RigidBody:: CalcCenterOfMassTranslationalAccelerationInWorld(),
as that calculation is always associated with a forward dynamics analysis.


This change is Reviewable

@mitiguy mitiguy added priority: medium status: single reviewer ok https://drake.mit.edu/reviewable.html release notes: none This pull request should not be mentioned in the release notes labels Jul 10, 2024
@mitiguy mitiguy changed the title Enhance center of mass documentation to clarify relationship to forward dynamics Enhance documentation and tests for center of mass functions; clarify relationship to forward dynamics Jul 10, 2024
Copy link
Contributor Author

@mitiguy mitiguy left a comment

Choose a reason for hiding this comment

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

For both reviews
Feature review +@rpoyner-tri
Platform review +@rpoyner-tri

Reviewable status: LGTM missing from assignee rpoyner-tri(platform)

Copy link
Contributor

@rpoyner-tri rpoyner-tri left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: :shipit: complete! all discussions resolved, LGTM from assignee rpoyner-tri(platform)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: medium release notes: none This pull request should not be mentioned in the release notes status: single reviewer ok https://drake.mit.edu/reviewable.html
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants