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
MultiBody Class Reference

Public Member Functions

Construction
 MultiBody (const MultiBody::Type _type)
 
 MultiBody (XMLNode &_node)
 Parse a multibody from an XML node.
 
 MultiBody (const MultiBody &)
 Copy.
 
 MultiBody (MultiBody &&)
 Move.
 
 ~MultiBody ()
 
void InitializeDOFs (const Boundary *const _b)
 
Assignment
MultiBodyoperator= (const MultiBody &)
 Copy.
 
MultiBodyoperator= (MultiBody &&)
 Move.
 
MultiBody Properties
MultiBody::Type GetType () const noexcept
 Get the type for this MultiBody.
 
bool IsActive () const noexcept
 Is this MultiBody an active type?
 
bool IsPassive () const noexcept
 Is this MultiBody a non-active type?
 
bool IsInternal () const noexcept
 Is this MultiBody an internal type?
 
bool IsComposite () const noexcept
 
size_t DOF () const noexcept
 Get the number of DOF for this multibody.
 
size_t PosDOF () const noexcept
 Get the number of positional DOF for this multibody's base.
 
size_t OrientationDOF () const noexcept
 Get the number of orientational DOF for this multibody's base.
 
size_t JointDOF () const noexcept
 Get the number of joint DOF for this multibody.
 
const std::vector< double > & GetCurrentDOFs () const noexcept
 Get the current DOFs for this configuration, as set by Configure().
 
std::vector< double > GetCurrentCfg () noexcept
 Get the current configuration dofs (no velocity), as set by Configure().
 
Body Accessors
size_t GetNumBodies () const noexcept
 Get the number of bodies in this multibody.
 
const std::vector< Body > & GetBodies () const noexcept
 Get all of the internal bodies.
 
std::vector< const Body * > GetEndEffectors () const noexcept
 
BodyGetBody (const size_t _i) noexcept
 
const BodyGetBody (const size_t _i) const noexcept
 
size_t AddBody (Body &&_body)
 
BodyGetBase () noexcept
 Get the base body.
 
const BodyGetBase () const noexcept
 
void SetBaseBody (const size_t _index)
 
Body::Type GetBaseType () const noexcept
 Get the body type of the base body.
 
Body::MovementType GetBaseMovementType () const noexcept
 Get the movement type of the base body.
 
Geometric Properties
const Vector3d & GetCenterOfMass () const noexcept
 Get the center of mass.
 
double GetBoundingSphereRadius () const noexcept
 Get the bounding sphere radius.
 
Connections
const std::vector< std::unique_ptr< Connection > > & GetJoints () const noexcept
 Get the Connections in this multibody.
 
ConnectionGetJoint (const size_t _i) noexcept
 
const DofType & GetDOFType (const size_t _i) const noexcept
 Get the DOF type for a specific degree of freedom.
 
const std::vector< DofInfo > & GetDofInfo () const noexcept
 Get the DOF info for a specific degree of freedom.
 
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
 

Public Types

Local Types
enum class  Type { Active , Passive , Internal }
 The types of MultiBody that we can support. More...
 

Detailed Description

A geometric object in workspace (such as an obstacle or robot) with one or more sub-components, referred to as Bodies.

Member Enumeration Documentation

◆ Type

enum class MultiBody::Type
strong

The types of MultiBody that we can support.

Enumerator
Active 

Movable object.

Passive 

Static visible object.

Internal 

Static invisible object.

Constructor & Destructor Documentation

◆ MultiBody()

MultiBody::MultiBody ( const MultiBody::Type  _type)

Construct a multibody.

Parameters
_typeThe multibody type.

Member Function Documentation

◆ InitializeDOFs()

void MultiBody::InitializeDOFs ( const Boundary *const  _b)

Initialize the DOF information for this multibody.

Parameters
_bThe Boundary for DOF ranges.

◆ IsComposite()

bool MultiBody::IsComposite ( ) const
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.

◆ GetEndEffectors()

std::vector< const Body * > MultiBody::GetEndEffectors ( ) const
noexcept

Get the set of bodies which are end-effectors (i.e., have no forward connections).

◆ GetBody()

Body * MultiBody::GetBody ( const size_t  _i)
noexcept

Get an internal body.

Parameters
_iThe index of the body.

◆ AddBody()

size_t MultiBody::AddBody ( Body &&  _body)

Add a body.

Parameters
_bodyThe body to add.
Returns
The index of the added body.

◆ SetBaseBody()

void MultiBody::SetBaseBody ( const size_t  _index)

Set the base body.

Parameters
_indexThe index of the body to use as the base.

◆ GetJoint()

Connection * MultiBody::GetJoint ( const size_t  _i)
noexcept

Get a specific Connection.

Parameters
_iThe connection index.

◆ UpdateJointLimits()

void MultiBody::UpdateJointLimits ( )
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.

◆ Configure() [1/2]

void MultiBody::Configure ( const Cfg _c)

Place a robot at a given configuration.

Parameters
_cThe configuration to use.

◆ Configure() [2/2]

void MultiBody::Configure ( const std::vector< double > &  _v)

Place a robot at a given configuration.

Parameters
_vThe DOF values to use.

◆ PushToNearestValidConfiguration()

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.

Note
In this context, 'valid' means with respect to the joint limits only. It does not consider collisions or any other validity.

◆ Read()

void MultiBody::Read ( std::istream &  _is,
CountingStreamBuffer _cbs 
)

Read a MultiBody from an input stream and compute information.

Parameters
_isThe input stream to read from.
_cbsCounting stream buffer

◆ Write()

void MultiBody::Write ( std::ostream &  _os) const

Write the MultiBody to an output stream.

Parameters
_osThe output stream to write to.

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