Parasol Planning Library (PPL)
Data Structures
Robot Class Referencefinal

#include <Robot.h>

Public Member Functions

Construction
 Robot (MPProblem *const _p, XMLNode &_node)
 
 Robot (MPProblem *const _p, std::unique_ptr< MultiBody > &&_mb, const std::string &_label)
 
 Robot (MPProblem *const _p, const Robot &_r)
 
 ~Robot () noexcept
 
Disabled Functions

Regular copy/move is not allowed because we require a permanent MPProblem for the robot to belong to. Assignment is disabled because we should never need to re-assign entire robots. Destruct the old one and create a new one instead.

 Robot (const Robot &)=delete
 
 Robot (Robot &&)=delete
 
Robotoperator= (const Robot &)=delete
 
Robotoperator= (Robot &&)=delete
 
Planning Interface
void InitializePlanningSpaces ()
 Compute the configuration and velocity spaces for this robot. More...
 
const CSpaceBoundingBoxGetCSpace () const noexcept
 Get the configuration space boundary for this robot. More...
 
const CSpaceBoundingBoxGetVSpace () const noexcept
 Get the velocity space boundary for this robot. More...
 
MPProblemGetMPProblem () const noexcept
 Get the owning MPProblem. More...
 
Geometry Accessors

Access the robot's geometric representation. The robot will take ownership of its MultiBody and delete it when necessary.

MultiBodyGetMultiBody () noexcept
 
const MultiBodyGetMultiBody () const noexcept
 
const EndEffector & GetEndEffector () const noexcept
 Access the robot manipulator's end effector, if it exists. More...
 
Actuator Accessors

Access the robot's actuators. These are set during input file parsing and cannot be changed otherwise.

ActuatorGetActuator (const std::string &_label) noexcept
 
const std::unordered_map< std::string, std::unique_ptr< Actuator > > & GetActuators () const noexcept
 Get set of all actuators mapped by label. More...
 
Other Properties
bool IsVirtual () const noexcept
 
void SetVirtual (const bool _v) noexcept
 
bool IsNonholonomic () const noexcept
 Check if the robot is nonholonomic. More...
 
bool IsCarlike () const noexcept
 Check if the robot is car-like. More...
 
double GetMaxLinearVelocity () const noexcept
 Get the maximum translational velocity for this robot. More...
 
double GetMaxAngularVelocity () const noexcept
 Get the maximum angular velocity for this robot. More...
 
const std::string & GetLabel () const noexcept
 Get the unique label for this robot. More...
 
const std::string & GetDefaultStrategyLabel () const noexcept
 Get the default strategy label for this robot. More...
 
const std::string & GetCapability () const noexcept
 Get the capability for this robot. More...
 
void SetCapability (const std::string &_capability)
 Set the capability for this robot. More...
 
bool IsManipulator () const noexcept
 Check if the robot is a manipulator. More...
 
bool IsFixed () const noexcept
 Check if the robot has a fixed base. More...
 
Cfg GetInitialCfg ()
 Get initial configuration for the robot (not implemented) More...
 
void SetInitialCfg (Cfg _cfg)
 Set initial configuration for the robot (not implemented) More...
 

Protected Member Functions

I/O
void ReadXMLFile (const std::string &_filename)
 
void ReadXMLNode (XMLNode &_node)
 
void ReadMultiBodyXML (XMLNode &_node)
 
void ReadMultibodyFile (const std::string &_filename)
 

Detailed Description

Complete representation of a robot.

A robot has many components, including:

Todo:
Come up with a nice way to support both real and emulated hardware.
Examples
MPLibrary_UseCase.cpp, and PathModifiers_UseCase.cpp.

Constructor & Destructor Documentation

◆ Robot() [1/5]

Robot::Robot ( MPProblem *const  _p,
XMLNode _node 
)

Construct a robot from an XML node.

Parameters
_pThe owning MPProblem.
_nodeThe XML node to parse.

◆ Robot() [2/5]

Robot::Robot ( MPProblem *const  _p,
std::unique_ptr< MultiBody > &&  _mb,
const std::string &  _label 
)

Construct a robot from a multibody.

Parameters
_pThe owning MPProblem.
_labelThe unique label for this robot.

◆ Robot() [3/5]

Robot::Robot ( MPProblem *const  _p,
const Robot _r 
)

Copy a robot to another MPProblem.

Parameters
_pThe destination MPProblem.
_rThe source robot to copy.

◆ ~Robot()

Robot::~Robot ( )
defaultnoexcept

◆ Robot() [4/5]

Robot::Robot ( const Robot )
delete

◆ Robot() [5/5]

Robot::Robot ( Robot &&  )
delete

Member Function Documentation

◆ GetActuator()

Actuator * Robot::GetActuator ( const std::string &  _label)
noexcept

Get actuator using label

Parameters
_labelLabel of actuator to retrieve

◆ GetActuators()

const std::unordered_map< std::string, std::unique_ptr< Actuator > > & Robot::GetActuators ( ) const
noexcept

Get set of all actuators mapped by label.

◆ GetCapability()

const std::string & Robot::GetCapability ( ) const
noexcept

Get the capability for this robot.

◆ GetCSpace()

const CSpaceBoundingBox * Robot::GetCSpace ( ) const
noexcept

Get the configuration space boundary for this robot.

◆ GetDefaultStrategyLabel()

const std::string & Robot::GetDefaultStrategyLabel ( ) const
noexcept

Get the default strategy label for this robot.

◆ GetEndEffector()

const Robot::EndEffector & Robot::GetEndEffector ( ) const
noexcept

Access the robot manipulator's end effector, if it exists.

◆ GetInitialCfg()

Cfg Robot::GetInitialCfg ( )

Get initial configuration for the robot (not implemented)

◆ GetLabel()

const std::string & Robot::GetLabel ( ) const
noexcept

Get the unique label for this robot.

◆ GetMaxAngularVelocity()

double Robot::GetMaxAngularVelocity ( ) const
noexcept

Get the maximum angular velocity for this robot.

◆ GetMaxLinearVelocity()

double Robot::GetMaxLinearVelocity ( ) const
noexcept

Get the maximum translational velocity for this robot.

◆ GetMPProblem()

MPProblem * Robot::GetMPProblem ( ) const
noexcept

Get the owning MPProblem.

◆ GetMultiBody() [1/2]

const MultiBody * Robot::GetMultiBody ( ) const
noexcept

◆ GetMultiBody() [2/2]

MultiBody * Robot::GetMultiBody ( )
noexcept

◆ GetVSpace()

const CSpaceBoundingBox * Robot::GetVSpace ( ) const
noexcept

Get the velocity space boundary for this robot.

◆ InitializePlanningSpaces()

void Robot::InitializePlanningSpaces ( )

Compute the configuration and velocity spaces for this robot.

Todo:
Set up a way to specify velocity limits for each joint.

◆ IsCarlike()

bool Robot::IsCarlike ( ) const
noexcept

Check if the robot is car-like.

◆ IsFixed()

bool Robot::IsFixed ( ) const
noexcept

Check if the robot has a fixed base.

◆ IsManipulator()

bool Robot::IsManipulator ( ) const
noexcept

Check if the robot is a manipulator.

◆ IsNonholonomic()

bool Robot::IsNonholonomic ( ) const
noexcept

Check if the robot is nonholonomic.

◆ IsVirtual()

bool Robot::IsVirtual ( ) const
noexcept

Check if this is a 'virtual' robot. These do not represent physical robots, and will be ignored by other robots in collision detection. Virtual robots will not appear in simulations.

◆ operator=() [1/2]

Robot& Robot::operator= ( const Robot )
delete

◆ operator=() [2/2]

Robot& Robot::operator= ( Robot &&  )
delete

◆ ReadMultibodyFile()

void Robot::ReadMultibodyFile ( const std::string &  _filename)
protected

Parse a multibody file describing this robot.

Parameters
_filenameThe file name.

◆ ReadMultiBodyXML()

void Robot::ReadMultiBodyXML ( XMLNode _node)
protected

Parse multibody information from robot's XML file.

Parameters
_nodeThe XML node to parse

◆ ReadXMLFile()

void Robot::ReadXMLFile ( const std::string &  _filename)
protected

Parse an XML robot file.

Parameters
_filenameThe file name.

◆ ReadXMLNode()

void Robot::ReadXMLNode ( XMLNode _node)
protected

Parse an XML robot node.

Parameters
_nodeThe SML node.

◆ SetCapability()

void Robot::SetCapability ( const std::string &  _capability)

Set the capability for this robot.

◆ SetInitialCfg()

void Robot::SetInitialCfg ( Cfg  _cfg)

Set initial configuration for the robot (not implemented)

◆ SetVirtual()

void Robot::SetVirtual ( const bool  _v)
noexcept

Set the robot's virtual flag.

Parameters
_vThe new value for the virtual flag.

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