Drake
BodyTopology Struct Reference

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

#include <drake/multibody/multibody_tree/multibody_tree_topology.h>

Collaboration diagram for BodyTopology:
[legend]

Public Member Functions

 BodyTopology ()
 Default construction to invalid configuration. More...
 
 BodyTopology (BodyIndex body_index, FrameIndex frame_index)
 Constructs a body topology struct with index body_index and a body frame with index frame_index. More...
 
bool operator== (const BodyTopology &other) const
 Returns true if all members of this topology are exactly equal to the members of other. More...
 
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 BodyTopology (const BodyTopology &)=default
 
BodyTopologyoperator= (const BodyTopology &)=default
 
 BodyTopology (BodyTopology &&)=default
 
BodyTopologyoperator= (BodyTopology &&)=default
 

Public Attributes

BodyIndex index {0}
 Unique index in the MultibodyTree. More...
 
MobilizerIndex inboard_mobilizer {}
 Unique index to the one and only inboard mobilizer a body can have. More...
 
BodyIndex parent_body {}
 Within the tree structure of a MultibodyTree, the immediate inboard (or "parent") body connected by the Mobilizer indexed by inboard_mobilizer. More...
 
std::vector< BodyIndexchild_bodies
 Within the tree structure of a MultibodyTree, the immediate outboard (or "child") bodies to this Body. More...
 
FrameIndex body_frame {0}
 Unique index to the frame associated with this body. More...
 
int level {-1}
 Depth level in the MultibodyTree, level = 0 for the world. More...
 
BodyNodeIndex body_node
 Index to the tree body node in the MultibodyTree. More...
 

Detailed Description

Data structure to store the topological information associated with a Body.

Constructor & Destructor Documentation

BodyTopology ( const BodyTopology )
default
BodyTopology ( BodyTopology &&  )
default
BodyTopology ( )
inline

Default construction to invalid configuration.

BodyTopology ( BodyIndex  body_index,
FrameIndex  frame_index 
)
inline

Constructs a body topology struct with index body_index and a body frame with index frame_index.

Member Function Documentation

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

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

Here is the call graph for this function:

Member Data Documentation

FrameIndex body_frame {0}

Unique index to the frame associated with this body.

BodyNodeIndex body_node

Index to the tree body node in the MultibodyTree.

std::vector<BodyIndex> child_bodies

Within the tree structure of a MultibodyTree, the immediate outboard (or "child") bodies to this Body.

MobilizerIndex inboard_mobilizer {}

Unique index to the one and only inboard mobilizer a body can have.

By default this is initialized to "invalid" so that we can detect graph loops within add_mobilizer(). This will remain "invalid" for the world body.

BodyIndex index {0}

Unique index in the MultibodyTree.

int level {-1}

Depth level in the MultibodyTree, level = 0 for the world.

Initialized to an invalid negative value so that we can detect at Finalize() when a user forgets to connect a body with a mobilizer.

BodyIndex parent_body {}

Within the tree structure of a MultibodyTree, the immediate inboard (or "parent") body connected by the Mobilizer indexed by inboard_mobilizer.

By default this is initialized to "invalid" so that we can assert (from within add_mobilizer()) that each body can have only one parent body. Also, this will remain "invalid" for the world body.


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