![]() |
Parasol Planning Library (PPL)
|
#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 | |
| Connection & | operator= (const Connection &) |
| Copy. More... | |
| Connection & | operator= (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 Body * | GetPreviousBody () const noexcept |
| Get a pointer to the child Body. More... | |
| Body * | GetPreviousBody () noexcept |
| size_t | GetPreviousBodyIndex () const noexcept |
| Get the index of the parent Body within the parent multibody. More... | |
| const Body * | GetNextBody () const noexcept |
| Get a pointer to the child Body. More... | |
| Body * | GetNextBody () noexcept |
| size_t | GetNextBodyIndex () const noexcept |
| Get the index of the child Body within the parent multibody. More... | |
Transformation information | |
| DHParameters & | GetDHParameters () noexcept |
| const DHParameters & | GetDHParameters () const noexcept |
| Transformation & | GetTransformationToBody2 () noexcept |
| const Transformation & | GetTransformationToBody2 () const noexcept |
| Transformation & | GetTransformationToDHFrame () noexcept |
| const Transformation & | GetTransformationToDHFrame () const noexcept |
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.
|
strong |
| Connection::Connection | ( | MultiBody *const | _owner | ) |
| _owner | MultiBody who owns this Connection |
Parse connection info from an XML node.
| _owner | MultiBody who owns this Connection |
| _node | The input XML node to read. |
| 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.
|
default |
Move.
|
noexcept |
Get the connection type.
|
noexcept |
|
noexcept |
|
noexcept |
Get a joint range.
| _i | The range to get (0 normally, 1 for second spherical range). |
|
noexcept |
|
noexcept |
Get the index of the child Body within the parent multibody.
|
noexcept |
|
noexcept |
Get the index of the parent Body within the parent multibody.
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
Check if this is a non-actuated joint.
|
noexcept |
Check if this is a revolute joint.
|
noexcept |
Check if this is a spherical joint.
|
default |
Move.
| Connection & Connection::operator= | ( | const Connection & | _other | ) |
Copy.
| void Connection::Read | ( | istream & | _is, |
| CountingStreamBuffer & | _cbs | ||
| ) |
Parse connection info from an old-style env/robot file.
| _is | The input stream to read. |
| _cbs | The input counting stream buffer. |
| 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.
| _owner | The owning multibody. |
| _parentIndex | The parent body index. |
| _childIndex | The child body index. |
| 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.
| _owner | The owning multibody, or null to use the current. |
| _parentIndex | The parent body index. |
| _childIndex | The child body index. |
| 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.
|
noexcept |
Set a joint range. Note this will NOT re-initialize the owning robot's configuration space.
| _i | The range to set (0 normally, 1 for second spherical range). |
| _r | The new joint range. |