PPL API Reference
Overview Core Algorithm Abstractions Utilities Parallel Methods
Modules Class Hierarchy Classes Functions
Todo List Bug List Dead Code
List of all members
Connection Class Referencefinal

Public Member Functions

Construction
 Connection (MultiBody *const _owner)
 
 Connection (MultiBody *const _owner, XMLNode &_node)
 
 Connection (const Connection &)
 Copy. More...
 
 Connection (Connection &&)
 Move.
 
Assignment
Connectionoperator= (const Connection &)
 Copy.
 
Connectionoperator= (Connection &&)
 Move.
 
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.
 
bool IsRevolute () const noexcept
 Check if this is a revolute joint.
 
bool IsSpherical () const noexcept
 Check if this is a spherical joint.
 
bool IsNonActuated () const noexcept
 Check if this is a non-actuated joint.
 
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.
 
BodyGetPreviousBody () noexcept
 
size_t GetPreviousBodyIndex () const noexcept
 Get the index of the parent Body within the parent multibody.
 
const BodyGetNextBody () const noexcept
 Get a pointer to the child Body.
 
BodyGetNextBody () noexcept
 
size_t GetNextBodyIndex () const noexcept
 Get the index of the child Body within the parent multibody.
 
Transformation information
DHParametersGetDHParameters () noexcept
 
const DHParametersGetDHParameters () const noexcept
 
Transformation & GetTransformationToBody2 () noexcept
 
const Transformation & GetTransformationToBody2 () const noexcept
 
Transformation & GetTransformationToDHFrame () noexcept
 
const Transformation & GetTransformationToDHFrame () const noexcept
 

Public Types

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

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 class Connection::JointType
strong

The supported connection types.

Enumerator
Revolute 

1 DOF

Spherical 

2 DOF

NonActuated 

0 DOF

Constructor & Destructor Documentation

◆ Connection() [1/3]

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

◆ Connection() [2/3]

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/3]

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.

Member Function Documentation

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ GetDHParameters()

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

◆ GetTransformationToBody2()

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

◆ GetTransformationToDHFrame()

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

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