Parasol Planning Library (PPL)
RobotGroup Class Referencefinal

A group of one or more robots. More...

#include <RobotGroup.h>

Public Types

Local Types
typedef std::vector< Robot * >::iterator iterator
 
typedef std::vector< Robot * >::const_iterator const_iterator
 

Public Member Functions

Construction
 RobotGroup (MPProblem *const _problem, const std::string &_label, const std::vector< Robot * > &_robots)
 
 RobotGroup (MPProblem *const _problem, XMLNode &_node)
 
Accessors
std::string GetLabel () const noexcept
 Get the group label. More...
 
RobotGetRobot (const size_t _index) const noexcept
 Get a robot by index. More...
 
RobotGetRobot (const std::string &_label) const noexcept
 Get a robot by label. More...
 
const std::vector< Robot * > & GetRobots () const noexcept
 Get all robots. More...
 
size_t GetGroupIndex (Robot *const _robot) const noexcept
 
bool VerifyRobotInGroup (Robot *const _robot) const noexcept
 Check whether the robot is in the group or not. More...
 
size_t Size () const noexcept
 Get the number of robots in the group. More...
 
size_t TotalDofs () const noexcept
 Get the number of DOFs accumulated over all robots. More...
 
Iteration

Iterate over the robots in the group.

iterator begin () noexcept
 
iterator end () noexcept
 
const_iterator begin () const noexcept
 
const_iterator end () const noexcept
 

Detailed Description

A group of one or more robots.

Member Typedef Documentation

◆ const_iterator

◆ iterator

typedef std::vector<Robot*>::iterator RobotGroup::iterator

Constructor & Destructor Documentation

◆ RobotGroup() [1/2]

RobotGroup::RobotGroup ( MPProblem *const  _problem,
const std::string &  _label,
const std::vector< Robot * > &  _robots 
)

Construct a group from a set of robots.

Parameters
_problemThe owning MPProblem.
_labelThe group label.
_robotThe set of robots in this group.

◆ RobotGroup() [2/2]

RobotGroup::RobotGroup ( MPProblem *const  _problem,
XMLNode _node 
)

Construct a group from an XML node. The referenced robots must be specified before the group in the XML file.

Parameters
_problemThe owning MPProblem.
_nodeThe XML node.

Member Function Documentation

◆ begin() [1/2]

RobotGroup::const_iterator RobotGroup::begin ( ) const
noexcept

◆ begin() [2/2]

RobotGroup::iterator RobotGroup::begin ( )
noexcept

◆ end() [1/2]

RobotGroup::const_iterator RobotGroup::end ( ) const
noexcept

◆ end() [2/2]

RobotGroup::iterator RobotGroup::end ( )
noexcept

◆ GetGroupIndex()

size_t RobotGroup::GetGroupIndex ( Robot *const  _robot) const
noexcept

Get the group index for a robot.

Note
This is NOT the index in the MPProblem.

◆ GetLabel()

std::string RobotGroup::GetLabel ( ) const
noexcept

Get the group label.

◆ GetRobot() [1/2]

Robot * RobotGroup::GetRobot ( const size_t  _index) const
noexcept

Get a robot by index.

◆ GetRobot() [2/2]

Robot * RobotGroup::GetRobot ( const std::string &  _label) const
noexcept

Get a robot by label.

◆ GetRobots()

const std::vector< Robot * > & RobotGroup::GetRobots ( ) const
noexcept

Get all robots.

◆ Size()

size_t RobotGroup::Size ( ) const
noexcept

Get the number of robots in the group.

◆ TotalDofs()

size_t RobotGroup::TotalDofs ( ) const
noexcept

Get the number of DOFs accumulated over all robots.

◆ VerifyRobotInGroup()

bool RobotGroup::VerifyRobotInGroup ( Robot *const  _robot) const
noexcept

Check whether the robot is in the group or not.


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