Drake
MobilizerTopology Struct Reference

Data structure to store the topological information associated with a Mobilizer object. More...

#include <multibody/multibody_tree/multibody_tree_topology.h>

Collaboration diagram for MobilizerTopology:
[legend]

Public Member Functions

 MobilizerTopology ()
 Default construction to invalid configuration. More...
 
 MobilizerTopology (MobilizerIndex mobilizer_index, FrameIndex in_frame, FrameIndex out_frame, BodyIndex in_body, BodyIndex out_body, int num_positions_in, int num_velocities_in)
 Constructs a MobilizerTopology by specifying the the index mobilizer_index for this new topology, the indexes to the inboard and outboard frames the Mobilizer will connect, given by in_frame and out_frame respectively, and similarly the inboard and outboard bodies being connected, given by in_body and out_body, respectively. More...
 
bool operator== (const MobilizerTopology &other) const
 Returns true if all members of this topology are exactly equal to the members of other. More...
 
bool connects_frames (FrameIndex frame1, FrameIndex frame2) const
 Returns true if this MobilizerTopology connects frames identified by indexes frame1 and frame2. More...
 
bool connects_bodies (BodyIndex body1, BodyIndex body2) const
 Returns true if this MobilizerTopology connects bodies identified by indexes body1 and body2. More...
 
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 MobilizerTopology (const MobilizerTopology &)=default
 
MobilizerTopologyoperator= (const MobilizerTopology &)=default
 
 MobilizerTopology (MobilizerTopology &&)=default
 
MobilizerTopologyoperator= (MobilizerTopology &&)=default
 

Public Attributes

MobilizerIndex index
 Unique index in the set of mobilizers. More...
 
FrameIndex inboard_frame
 Index to the inboard frame. More...
 
FrameIndex outboard_frame
 Index to the outboard frame. More...
 
BodyIndex inboard_body
 Index to the inboard body. More...
 
BodyIndex outboard_body
 Index to the outboard body. More...
 
BodyNodeIndex body_node
 Index to the tree node in the MultibodyTree responsible for this mobilizer's computations. More...
 
int num_positions {0}
 Mobilizer indexing info: Set at Finalize() time. More...
 
int positions_start {0}
 First entry in the global array of states, x = [q v z], for the parent MultibodyTree. More...
 
int num_velocities {0}
 Number of generalized velocities granted by this mobilizer. More...
 
int velocities_start {0}
 First entry in the global array of states, x = [q v z], for the parent MultibodyTree. More...
 
int velocities_start_in_v {0}
 Start index in a vector containing only generalized velocities. More...
 

Detailed Description

Data structure to store the topological information associated with a Mobilizer object.

It stores:

  • Indexes to the inboard/outboard frames of this mobilizer.
  • Indexes to the inboard/outboard bodies of this mobilizer.
  • Numbers of dofs admitted by this mobilizer.
  • Indexing information to retrieve entries from the parent MultibodyTree Context. Additional information on topology classes is given in this file's documentation at the top.

Constructor & Destructor Documentation

MobilizerTopology ( const MobilizerTopology )
default
MobilizerTopology ( )
inline

Default construction to invalid configuration.

MobilizerTopology ( MobilizerIndex  mobilizer_index,
FrameIndex  in_frame,
FrameIndex  out_frame,
BodyIndex  in_body,
BodyIndex  out_body,
int  num_positions_in,
int  num_velocities_in 
)
inline

Constructs a MobilizerTopology by specifying the the index mobilizer_index for this new topology, the indexes to the inboard and outboard frames the Mobilizer will connect, given by in_frame and out_frame respectively, and similarly the inboard and outboard bodies being connected, given by in_body and out_body, respectively.

The constructed topology will correspond to that of a Mobilizer with num_positions_in generalized positions and num_velocities_in generalized velocities.

Member Function Documentation

bool connects_bodies ( BodyIndex  body1,
BodyIndex  body2 
) const
inline

Returns true if this MobilizerTopology connects bodies identified by indexes body1 and body2.

bool connects_frames ( FrameIndex  frame1,
FrameIndex  frame2 
) const
inline

Returns true if this MobilizerTopology connects frames identified by indexes frame1 and frame2.

MobilizerTopology& operator= ( MobilizerTopology &&  )
default
MobilizerTopology& operator= ( const MobilizerTopology )
default
bool operator== ( const MobilizerTopology other) const
inline

Returns true if all members of this topology are exactly equal to the members of other.

Member Data Documentation

BodyNodeIndex body_node

Index to the tree node in the MultibodyTree responsible for this mobilizer's computations.

See the documentation for BodyNodeTopology for further details on how these computations are organized.

BodyIndex inboard_body

Index to the inboard body.

FrameIndex inboard_frame

Index to the inboard frame.

Unique index in the set of mobilizers.

int num_positions {0}

Mobilizer indexing info: Set at Finalize() time.

Number of generalized coordinates granted by this mobilizer.

int num_velocities {0}

Number of generalized velocities granted by this mobilizer.

BodyIndex outboard_body

Index to the outboard body.

FrameIndex outboard_frame

Index to the outboard frame.

int positions_start {0}

First entry in the global array of states, x = [q v z], for the parent MultibodyTree.

int velocities_start {0}

First entry in the global array of states, x = [q v z], for the parent MultibodyTree.

int velocities_start_in_v {0}

Start index in a vector containing only generalized velocities.

It is also a valid index into a vector of generalized accelerations (which are the time derivatives of the generalized velocities) and into a vector of generalized forces.


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