Drake
BodyNodeImpl< T, num_positions, num_velocities > Class Template Reference

For internal use only of the MultibodyTree implementation. More...

#include <multibody/multibody_tree/body_node_impl.h>

Inheritance diagram for BodyNodeImpl< T, num_positions, num_velocities >:
[legend]
Collaboration diagram for BodyNodeImpl< T, num_positions, num_velocities >:
[legend]

Public Types

enum  : int { nq = num_positions, nv = num_velocities }
 

Public Member Functions

 BodyNodeImpl (const internal::BodyNode< T > *parent_node, const Body< T > *body, const Mobilizer< T > *mobilizer)
 Given a body and its inboard mobilizer in a MultibodyTree this constructor creates the corresponding BodyNode. More...
 
- Public Member Functions inherited from BodyNode< T >
 BodyNode (const BodyNode< T > *parent_node, const Body< T > *body, const Mobilizer< T > *mobilizer)
 A node encompasses a Body in a MultibodyTree and the inboard Mobilizer that connects this body to the rest of tree. More...
 
void add_child_node (const BodyNode< T > *child)
 Method to update the list of child body nodes maintained by this node, outboard to this node. More...
 
const Body< T > & get_body () const
 Returns a constant reference to the body B associated with this node. More...
 
const Body< T > & get_parent_body () const
 Returns a constant reference to the unique parent body P of the body B associated with this node. More...
 
const Mobilizer< T > & get_mobilizer () const
 Returns a constant reference to the mobilizer associated with this node. More...
 
void CalcPositionKinematicsCache_BaseToTip (const MultibodyTreeContext< T > &context, PositionKinematicsCache< T > *pc) const
 This method is used by MultibodyTree within a base-to-tip loop to compute this node's kinematics that only depend on generalized positions. More...
 
void CalcVelocityKinematicsCache_BaseToTip (const MultibodyTreeContext< T > &context, const PositionKinematicsCache< T > &pc, const Eigen::Ref< const MatrixUpTo6< T >> &H_PB_W, VelocityKinematicsCache< T > *vc) const
 This method is used by MultibodyTree within a base-to-tip loop to compute this node's kinematics that depend on the generalized velocities. More...
 
void CalcSpatialAcceleration_BaseToTip (const MultibodyTreeContext< T > &context, const PositionKinematicsCache< T > &pc, const VelocityKinematicsCache< T > &vc, const VectorX< T > &mbt_vdot, std::vector< SpatialAcceleration< T >> *A_WB_array_ptr) const
 This method is used by MultibodyTree within a base-to-tip loop to compute this node's kinematics that depend on the generalized accelerations, i.e. More...
 
void CalcInverseDynamics_TipToBase (const MultibodyTreeContext< T > &context, const PositionKinematicsCache< T > &pc, const VelocityKinematicsCache< T > &vc, const std::vector< SpatialAcceleration< T >> &A_WB_array, const SpatialForce< T > &Fapplied_Bo_W, const Eigen::Ref< const VectorX< T >> &tau_applied, std::vector< SpatialForce< T >> *F_BMo_W_array_ptr, EigenPtr< VectorX< T >> tau_array) const
 Computes the generalized forces tau for a single BodyNode. More...
 
const BodyNodeTopologyget_topology () const
 Returns the topology information for this body node. More...
 
void CalcAcrossNodeGeometricJacobianExpressedInWorld (const MultibodyTreeContext< T > &context, const PositionKinematicsCache< T > &pc, EigenPtr< MatrixX< T >> H_PB_W) const
 Computes the geometric Jacobian H_PB_W which relates to the spatial velocity of a body B in its parent body P by V_PB_W = H_PB_W(q)⋅v_B, where v_B denotes the generalized velocities associated with body B's node. More...
 
Eigen::Map< const MatrixUpTo6< T > > GetJacobianFromArray (const std::vector< Vector6< T >> &H_array) const
 Helper method to retrieve a Jacobian matrix for this node from an array storing the columns of a set of Jacobian matrices for each node. More...
 
Eigen::Map< MatrixUpTo6< T > > GetMutableJacobianFromArray (std::vector< Vector6< T >> *H_array) const
 Mutable version of GetJacobianFromArray(). More...
 
 BodyNode (const BodyNode &)=delete
 
BodyNodeoperator= (const BodyNode &)=delete
 
 BodyNode (BodyNode &&)=delete
 
BodyNodeoperator= (BodyNode &&)=delete
 
int get_num_mobilizer_positions () const
 Returns the number of generalized positions for the Mobilizer in this node. More...
 
int get_num_mobilizer_velocites () const
 Returns the number of generalized velocities for the Mobilizer in this node. More...
 

Additional Inherited Members

- Protected Member Functions inherited from BodyNode< T >
const Frame< T > & get_inboard_frame () const
 Returns the inboard frame F of this node's mobilizer. More...
 
const Frame< T > & get_outboard_frame () const
 Returns the outboard frame M of this node's mobilizer. More...
 

Detailed Description

template<typename T, int num_positions, int num_velocities>
class drake::multibody::internal::BodyNodeImpl< T, num_positions, num_velocities >

For internal use only of the MultibodyTree implementation.

While all code that is common to any node can be placed in the BodyNode class, BodyNodeImpl provides compile-time fixed-size BodyNode implementations so that all operations can be perfomed with fixed-size stack-allocated Eigen variables. In particular, most of the across mobilizer code for velocity kinematics lives in this class since the across mobilizer Jacobian matrices H_FM(q) (defined such that the across mobilizer spatial velocity relates to the generalized velocities v by V_FM = H_FM(q) * v) have a compile-time fixed size. For a more detailed discussion of the role of a BodyNode in a MultibodyTree refer to the class documentation for BodyNode.

Member Enumeration Documentation

anonymous enum : int
Enumerator
nq 
nv 

Constructor & Destructor Documentation

BodyNodeImpl ( const internal::BodyNode< T > *  parent_node,
const Body< T > *  body,
const Mobilizer< T > *  mobilizer 
)
inline

Given a body and its inboard mobilizer in a MultibodyTree this constructor creates the corresponding BodyNode.

See the BodyNode class documentation for details on how a BodyNode is defined.

Parameters
[in]parent_nodeA const pointer to the parent BodyNode object in the tree structure of the owning MultibodyTree. It can be a nullptr only when body is the world body, otherwise the parent class constructor will abort.
[in]bodyThe body B associated with this node.
[in]mobilizerThe mobilizer associated with this node. It can only be a nullptr for the world body.

The documentation for this class was generated from the following file: