![]() |
Parasol Planning Library (PPL)
|
#include <MultiBody.h>
Public Types | |
Local Types | |
enum class | Type { Active , Passive , Internal } |
The types of MultiBody that we can support. More... | |
Public Member Functions | |
Construction | |
MultiBody (const MultiBody::Type _type) | |
MultiBody (XMLNode &_node) | |
Parse a multibody from an XML node. More... | |
MultiBody (const MultiBody &) | |
Copy. More... | |
MultiBody (MultiBody &&) | |
Move. More... | |
~MultiBody () | |
void | InitializeDOFs (const Boundary *const _b) |
Assignment | |
MultiBody & | operator= (const MultiBody &) |
Copy. More... | |
MultiBody & | operator= (MultiBody &&) |
Move. More... | |
MultiBody Properties | |
MultiBody::Type | GetType () const noexcept |
Get the type for this MultiBody. More... | |
bool | IsActive () const noexcept |
Is this MultiBody an active type? More... | |
bool | IsPassive () const noexcept |
Is this MultiBody a non-active type? More... | |
bool | IsInternal () const noexcept |
Is this MultiBody an internal type? More... | |
bool | IsComposite () const noexcept |
size_t | DOF () const noexcept |
Get the number of DOF for this multibody. More... | |
size_t | PosDOF () const noexcept |
Get the number of positional DOF for this multibody's base. More... | |
size_t | OrientationDOF () const noexcept |
Get the number of orientational DOF for this multibody's base. More... | |
size_t | JointDOF () const noexcept |
Get the number of joint DOF for this multibody. More... | |
const std::vector< double > & | GetCurrentDOFs () const noexcept |
Get the current DOFs for this configuration, as set by Configure(). More... | |
std::vector< double > | GetCurrentCfg () noexcept |
Get the current configuration dofs (no velocity), as set by Configure(). More... | |
Body Accessors | |
size_t | GetNumBodies () const noexcept |
Get the number of bodies in this multibody. More... | |
const std::vector< Body > & | GetBodies () const noexcept |
Get all of the internal bodies. More... | |
std::vector< const Body * > | GetEndEffectors () const noexcept |
Body * | GetBody (const size_t _i) noexcept |
const Body * | GetBody (const size_t _i) const noexcept |
size_t | AddBody (Body &&_body) |
Body * | GetBase () noexcept |
Get the base body. More... | |
const Body * | GetBase () const noexcept |
void | SetBaseBody (const size_t _index) |
Body::Type | GetBaseType () const noexcept |
Get the body type of the base body. More... | |
Body::MovementType | GetBaseMovementType () const noexcept |
Get the movement type of the base body. More... | |
double | GetWeight () const |
Get the weight of the MultiBody. More... | |
Geometric Properties | |
const Vector3d & | GetCenterOfMass () const noexcept |
Get the center of mass. More... | |
double | GetBoundingSphereRadius () const noexcept |
Get the bounding sphere radius. More... | |
Connections | |
const std::vector< std::unique_ptr< Connection > > & | GetJoints () const noexcept |
Get the Connections in this multibody. More... | |
Connection * | GetJoint (const size_t _i) noexcept |
const DofType & | GetDOFType (const size_t _i) const noexcept |
Get the DOF type for a specific degree of freedom. More... | |
const std::vector< DofInfo > & | GetDofInfo () const noexcept |
Get the DOF info for a specific degree of freedom. More... | |
void | UpdateJointLimits () noexcept |
Configuration Methods | |
void | Configure (const Cfg &_c) |
void | Configure (const std::vector< double > &_v) |
void | PushToNearestValidConfiguration () |
I/O | |
void | Read (std::istream &_is, CountingStreamBuffer &_cbs) |
void | Write (std::ostream &_os) const |
A geometric object in workspace (such as an obstacle or robot) with one or more sub-components, referred to as Bodies.
|
strong |
The types of MultiBody that we can support.
Enumerator | |
---|---|
Active | Movable object. |
Passive | Static visible object. |
Internal | Static invisible object. |
MultiBody::MultiBody | ( | const MultiBody::Type | _type | ) |
Construct a multibody.
_type | The multibody type. |
MultiBody::MultiBody | ( | XMLNode & | _node | ) |
Parse a multibody from an XML node.
MultiBody::MultiBody | ( | const MultiBody & | _other | ) |
Copy.
MultiBody::MultiBody | ( | MultiBody && | _other | ) |
Move.
|
default |
size_t MultiBody::AddBody | ( | Body && | _body | ) |
Add a body.
_body | The body to add. |
@TODO Adjust our body tracking so that we don't have to add bodies in index order.
void MultiBody::Configure | ( | const Cfg & | _c | ) |
Place a robot at a given configuration.
_c | The configuration to use. |
void MultiBody::Configure | ( | const std::vector< double > & | _v | ) |
Place a robot at a given configuration.
_v | The DOF values to use. |
|
noexcept |
Get the number of DOF for this multibody.
|
noexcept |
|
noexcept |
Get the base body.
|
noexcept |
Get the movement type of the base body.
|
noexcept |
Get the body type of the base body.
|
noexcept |
Get all of the internal bodies.
|
noexcept |
|
noexcept |
Get an internal body.
_i | The index of the body. |
|
noexcept |
Get the bounding sphere radius.
|
noexcept |
Get the center of mass.
|
noexcept |
Get the current configuration dofs (no velocity), as set by Configure().
|
noexcept |
Get the current DOFs for this configuration, as set by Configure().
|
noexcept |
Get the DOF info for a specific degree of freedom.
|
noexcept |
Get the DOF type for a specific degree of freedom.
|
noexcept |
Get the set of bodies which are end-effectors (i.e., have no forward connections).
|
noexcept |
Get a specific Connection.
_i | The connection index. |
|
noexcept |
Get the Connections in this multibody.
|
noexcept |
Get the number of bodies in this multibody.
|
noexcept |
Get the type for this MultiBody.
double MultiBody::GetWeight | ( | ) | const |
Get the weight of the MultiBody.
void MultiBody::InitializeDOFs | ( | const Boundary *const | _b | ) |
Initialize the DOF information for this multibody.
_b | The Boundary for DOF ranges. |
|
noexcept |
Is this MultiBody an active type?
|
noexcept |
Is this MultiBody a composite body, i.e. having multiple decoupled bases? This is now ONLY used to check if an old version of disassembly planning problem modeling is used! Composite C-Space that conforms to this check is now depricated, and Group configurations should be used.
|
noexcept |
Is this MultiBody an internal type?
|
noexcept |
Is this MultiBody a non-active type?
|
noexcept |
Get the number of joint DOF for this multibody.
|
noexcept |
Get the number of orientational DOF for this multibody's base.
|
noexcept |
Get the number of positional DOF for this multibody's base.
void MultiBody::PushToNearestValidConfiguration | ( | ) |
Check if the DOF values are out-of-range. If so, push them to the nearest acceptable configuration and reconfigure the model.
void MultiBody::Read | ( | std::istream & | _is, |
CountingStreamBuffer & | _cbs | ||
) |
Read a MultiBody from an input stream and compute information.
_is | The input stream to read from. |
_cbs | Counting stream buffer |
void MultiBody::SetBaseBody | ( | const size_t | _index | ) |
Set the base body.
_index | The index of the body to use as the base. |
|
noexcept |
Update the DOF info from the current values in the connection objects. @TODO Fix this so that we do not double-store the limits both here and in connection.
void MultiBody::Write | ( | std::ostream & | _os | ) | const |
Write the MultiBody to an output stream.
_os | The output stream to write to. |