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

Create missing method Multibody::CalcCenterOfMassTranslationalAcceleration() #14269

Closed
mitiguy opened this issue Oct 30, 2020 · 1 comment
Closed
Assignees

Comments

@mitiguy
Copy link
Contributor

mitiguy commented Oct 30, 2020

Vector3\<T\> CalcCenterOfMassTranslationalAccelerationInWorld(const systems::Context\<T\>& context) const;  and/or
Vector3\<T\> CalcCenterOfMassTranslationalAcceleration(const systems::Context\<T\>& context,  
                                                   const Frame\<T\>& frame_A, const Frame\<T\>& frame_E) const;
Note: This issue needs resolution of issue #13754 
------------------------------------------------------------------------------------------
Note: Two related MultibodyPlant methods are:
Vector3\<T\> CalcCenterOfMassPosition(const systems::Context\<T\>& context) const;
Vector3\<T\> CalcCenterOfMassPosition(const systems::Context\<T\>& context,
      const std::vector<ModelInstanceIndex>& model_instances) const;
-------------------------------------------------------------------------------------------
Note:  PR# #12839 added a similar MultibodyPlant method with signature:
Vector3\<T\> CalcBiasCenterOfMassTranslationalAcceleration( const systems::Context\<T\>& context, 
       JacobianWrtVariable with_respect_to,  const Frame\<T\>& frame_A, const Frame\<T\>& frame_E) const;
@mitiguy mitiguy added component: multibody plant MultibodyPlant and supporting code priority: medium labels Nov 2, 2020
@jwnimmer-tri jwnimmer-tri changed the title Create missing method Multibody::CalcCenterOfMassTranslationalAcceleration(). Create missing method Multibody::CalcCenterOfMassTranslationalAcceleration() Nov 12, 2021
mitiguy added a commit that referenced this issue Jul 8, 2024
…ards issue #14269. (#21599)

Co-Authored-By: mitiguy <paul.mitiguy@tri.global>
@mitiguy
Copy link
Contributor Author

mitiguy commented Jul 22, 2024

PR #21516, PR #21570, PR #21599, PR #21703, PR #21710, PR #21730, resolve issue #14269.

In multibody_plant.h, the following have been created in C++ (with Python bindings).
Vector3<T> CalcCenterOfMassTranslationalAccelerationInWorld(const systems::Context<T>& context) const;
Vector3<T> CalcCenterOfMassTranslationalAccelerationInWorld(const systems::Context<T>& context,
const std::vector& model_instances) const;

In rigid_body.h, the following has been created in C++ (Python bindings followed in PR #21926).
Vector3<T> CalcCenterOfMassTranslationalAccelerationInWorld(const systems::Context& context) const;

For the following pre-existing C++ functions, Python bindings were missing, hence they were created.
Vector3<T> Multibody::CalcCenterOfMassTranslationalVelocityInWorld(const systems::Context<T>& context) const;
Vector3<T> Multibody::CalcCenterOfMassTranslationalVelocityInWorld(const systems::Context<T>& context,
const std::vector& model_instances) const;

Related: In PR #21740, to help resolve issue #21711.
In multibody_plant.h, added the following function with model_instances argument (with Python binding).
Vector3<T> CalcBiasCenterOfMassTranslationalAcceleration(const systems::Context<T>& context,
const std::vector& model_instances,
JacobianWrtVariable with_respect_to, const Frame& frame_A,
const Frame& frame_E) const;

Note: The following have not been implemented in Drake:
Vector3<T> CalcCenterOfMassTranslationalVelocity(const systems::Context<T>& context,
const Frame<T>& frame_A, const Frame<T>& frame_E) const;
Vector3<T> CalcCenterOfMassTranslationalAcceleration(const systems::Context<T>& context,
const Frame<T>& frame_A, const Frame<T>& frame_E) const;

If these functions are desirable, a new issue may be opened or this issue can be re-opened to address this defect.
Request input from @rcory and @hongkai-dai if they want to be able to calculate velocity and/or acceleration of measured in a frame other than world.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants