Parasol Planning Library (PPL)
Connection Class Referencefinal

#include <Connection.h>

Public Types

Local Types
enum class  JointType { Revolute , Spherical , NonActuated }
 The supported connection types. More...
 

Public Member Functions

Construction
 Connection (MultiBody *const _owner)
 
 Connection (MultiBody *const _owner, XMLNode &_node)
 
 Connection (const Connection &)
 Copy. More...
 
 Connection (Connection &&)
 Move. More...
 
Assignment
Connectionoperator= (const Connection &)
 Copy. More...
 
Connectionoperator= (Connection &&)
 Move. More...
 
I/O
void Read (istream &_is, CountingStreamBuffer &_cbs)
 
void SetBodies (MultiBody *const _owner, const size_t _parentIndex, const size_t _childIndex)
 
void SetBodies (MultiBody *const _owner=nullptr)
 
void SetAdjacentBodies (MultiBody *const _owner, const size_t _firstIndex, const size_t _secondIndex)
 
Joint Information
JointType GetConnectionType () const noexcept
 Get the connection type. More...
 
bool IsRevolute () const noexcept
 Check if this is a revolute joint. More...
 
bool IsSpherical () const noexcept
 Check if this is a spherical joint. More...
 
bool IsNonActuated () const noexcept
 Check if this is a non-actuated joint. More...
 
const Range< double > & GetJointRange (const size_t _i) const noexcept
 
void SetJointRange (const size_t _i, const Range< double > &_r) noexcept
 
Body information
const BodyGetPreviousBody () const noexcept
 Get a pointer to the child Body. More...
 
BodyGetPreviousBody () noexcept
 
size_t GetPreviousBodyIndex () const noexcept
 Get the index of the parent Body within the parent multibody. More...
 
const BodyGetNextBody () const noexcept
 Get a pointer to the child Body. More...
 
BodyGetNextBody () noexcept
 
size_t GetNextBodyIndex () const noexcept
 Get the index of the child Body within the parent multibody. More...
 
Transformation information
DHParametersGetDHParameters () noexcept
 
const DHParametersGetDHParameters () const noexcept
 
Transformation & GetTransformationToBody2 () noexcept
 
const Transformation & GetTransformationToBody2 () const noexcept
 
Transformation & GetTransformationToDHFrame () noexcept
 
const Transformation & GetTransformationToDHFrame () const noexcept
 

Detailed Description

Connection information between two Bodys in a MultiBody.

This class stores information about connection from one body to another one. The information stored in this class includes:

@TODO Need to generalize the connection relationship to handle closed chains and multiple backward connections.

Member Enumeration Documentation

◆ JointType

enum Connection::JointType
strong

The supported connection types.

Enumerator
Revolute 

1 DOF

Spherical 

2 DOF

NonActuated 

0 DOF

Constructor & Destructor Documentation

◆ Connection() [1/4]

Connection::Connection ( MultiBody *const  _owner)
Parameters
_ownerMultiBody who owns this Connection

◆ Connection() [2/4]

Connection::Connection ( MultiBody *const  _owner,
XMLNode _node 
)

Parse connection info from an XML node.

Parameters
_ownerMultiBody who owns this Connection
_nodeThe input XML node to read.

◆ Connection() [3/4]

Connection::Connection ( const Connection _other)

Copy.

Copying a connection does not copy the multibody and body pointers, as this would not be a usable object. Call SetBodies to attach a newly copied connection to another multibody.

◆ Connection() [4/4]

Connection::Connection ( Connection &&  )
default

Move.

Member Function Documentation

◆ GetConnectionType()

Connection::JointType Connection::GetConnectionType ( ) const
noexcept

Get the connection type.

◆ GetDHParameters() [1/2]

const DHParameters & Connection::GetDHParameters ( ) const
noexcept

◆ GetDHParameters() [2/2]

DHParameters & Connection::GetDHParameters ( )
noexcept
Returns
DH frame description

◆ GetJointRange()

const Range< double > & Connection::GetJointRange ( const size_t  _i) const
noexcept

Get a joint range.

Parameters
_iThe range to get (0 normally, 1 for second spherical range).
Returns
The corresponding range object.

◆ GetNextBody() [1/2]

const Body * Connection::GetNextBody ( ) const
noexcept

Get a pointer to the child Body.

◆ GetNextBody() [2/2]

Body * Connection::GetNextBody ( )
noexcept

◆ GetNextBodyIndex()

size_t Connection::GetNextBodyIndex ( ) const
noexcept

Get the index of the child Body within the parent multibody.

◆ GetPreviousBody() [1/2]

const Body * Connection::GetPreviousBody ( ) const
noexcept

Get a pointer to the child Body.

◆ GetPreviousBody() [2/2]

Body * Connection::GetPreviousBody ( )
noexcept

◆ GetPreviousBodyIndex()

size_t Connection::GetPreviousBodyIndex ( ) const
noexcept

Get the index of the parent Body within the parent multibody.

◆ GetTransformationToBody2() [1/2]

const Transformation & Connection::GetTransformationToBody2 ( ) const
noexcept

◆ GetTransformationToBody2() [2/2]

Transformation & Connection::GetTransformationToBody2 ( )
noexcept
Returns
Transformation to second body

◆ GetTransformationToDHFrame() [1/2]

const Transformation & Connection::GetTransformationToDHFrame ( ) const
noexcept

◆ GetTransformationToDHFrame() [2/2]

Transformation & Connection::GetTransformationToDHFrame ( )
noexcept
Returns
Transformation to DH frame

◆ IsNonActuated()

bool Connection::IsNonActuated ( ) const
noexcept

Check if this is a non-actuated joint.

◆ IsRevolute()

bool Connection::IsRevolute ( ) const
noexcept

Check if this is a revolute joint.

◆ IsSpherical()

bool Connection::IsSpherical ( ) const
noexcept

Check if this is a spherical joint.

◆ operator=() [1/2]

Connection & Connection::operator= ( Connection &&  )
default

Move.

◆ operator=() [2/2]

Connection & Connection::operator= ( const Connection _other)

Copy.

◆ Read()

void Connection::Read ( istream &  _is,
CountingStreamBuffer _cbs 
)

Parse connection info from an old-style env/robot file.

Parameters
_isThe input stream to read.
_cbsThe input counting stream buffer.

◆ SetAdjacentBodies()

void Connection::SetAdjacentBodies ( MultiBody *const  _owner,
const size_t  _firstIndex,
const size_t  _secondIndex 
)

Set the free bodies which are adjacent without an explicit connection.

Parameters
_ownerThe owning multibody.
_parentIndexThe parent body index.
_childIndexThe child body index.

◆ SetBodies() [1/2]

void Connection::SetBodies ( MultiBody *const  _owner,
const size_t  _parentIndex,
const size_t  _childIndex 
)

Set the free bodies which are joined by this connection and call their link functions.

Parameters
_ownerThe owning multibody, or null to use the current.
_parentIndexThe parent body index.
_childIndexThe child body index.

◆ SetBodies() [2/2]

void Connection::SetBodies ( MultiBody *const  _owner = nullptr)

This overload assumes that the parent/child indexes have already been set. This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ SetJointRange()

void Connection::SetJointRange ( const size_t  _i,
const Range< double > &  _r 
)
noexcept

Set a joint range. Note this will NOT re-initialize the owning robot's configuration space.

Parameters
_iThe range to set (0 normally, 1 for second spherical range).
_rThe new joint range.

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