Public Member Functions | Protected Attributes | List of all members
CetiRobot Class Reference

Concrete Ceti-Robot. More...

#include <ceti_robot.h>

Inheritance diagram for CetiRobot:
Inheritance graph
[legend]

Public Member Functions

std::vector< tf2::Transform > & bounds () override
 
 CetiRobot (std::string &name, tf2::Transform tf, tf2::Vector3 size)
 Ceti robot constructor. More...
 
bool checkSingleObjectCollision (tf2::Transform &obj, std::string &robot_element, std::bitset< 3 > &panel_mask) override
 Collsion calculation for single objects. More...
 
bool inCollision (CetiRobot *R)
 Collsion calculation. More...
 
std::string & name () override
 
void notify () override
 Observer pattern. More...
 
std::bitset< 3 > observerMask ()
 
std::vector< std::unique_ptr< AbstractRobotElementDecorator > > & observers ()
 Get observers. More...
 
void reset ()
 Resset all robot properties. More...
 
std::vector< tf2::Transform > & robotRootBounds () override
 
tf2::Transform & rootTf () override
 
void setObserverMask (int i)
 
void setObservers (std::vector< std::unique_ptr< AbstractRobotElementDecorator >> &observer)
 Set observers. More...
 
tf2::Vector3 & size () override
 
tf2::Transform & tf () override
 
- Public Member Functions inherited from AbstractRobot
 AbstractRobot (std::string name, tf2::Transform tf, tf2::Vector3 size)
 
float areaCalculation (tf2::Transform &A, tf2::Transform &B, tf2::Transform &C)
 Triangle area calculator. More...
 
void rotate (float deg)
 
void setTf (tf2::Transform &t)
 
void size (tf2::Vector3 &s)
 
void translate (tf2::Vector3 t)
 

Protected Attributes

std::bitset< 3 > observer_mask_
 Bitmap to set observers. More...
 
std::vector< std::unique_ptr< AbstractRobotElementDecorator > > observers_
 Wing shared pointers. More...
 
- Protected Attributes inherited from AbstractRobot
std::vector< tf2::Transform > bounds_
 Bounds of table top surface. More...
 
std::string name_
 Name of robot. More...
 
std::vector< tf2::Transform > robot_root_bounds_
 Bounds of robot arm as sub-region of table top. More...
 
tf2::Transform root_tf_
 Robot root on table top. More...
 
tf2::Vector3 size_
 Size of table. More...
 
tf2::Transform tf_
 Pose of table. More...
 

Detailed Description

Concrete Ceti-Robot.

Refers especially to Robot-Arms mounted on a table of variable size.

Definition at line 14 of file ceti_robot.h.

Constructor & Destructor Documentation

◆ CetiRobot()

CetiRobot::CetiRobot ( std::string &  name,
tf2::Transform  tf,
tf2::Vector3  size 
)

Ceti robot constructor.

Initializes Ceti-Robot, calculates bounds out of arm and table size.

Parameters
namestd::string as Robot name, following the Robotarm([0-9]+) pattern
tfTable center pose
sizeTable size

Definition at line 4 of file ceti_robot.cpp.

Member Function Documentation

◆ bounds()

std::vector<tf2::Transform>& CetiRobot::bounds ( )
inlineoverridevirtual

Implements AbstractRobot.

Definition at line 36 of file ceti_robot.h.

◆ checkSingleObjectCollision()

bool CetiRobot::checkSingleObjectCollision ( tf2::Transform &  obj,
std::string &  robot_element,
std::bitset< 3 > &  panel_mask 
)
overridevirtual

Collsion calculation for single objects.

Calculates collision between objects and robot_elemets, which are defined by the robot and its panels. Provides collision surface

Parameters
[IN]obj pose to check
[IN]panel_mask discribing panels to check
[OUT]robot_element std::string describing the collision surface
Returns
true if collsision on robot or wings

Implements AbstractRobot.

Definition at line 10 of file ceti_robot.cpp.

◆ inCollision()

bool CetiRobot::inCollision ( CetiRobot R)

Collsion calculation.

Iterates over Robot to calculate area und check collisions by other robot bounds

Parameters
RRobot which bounds are to check for collisions
Returns
bool true if collision, false otherwise

Definition at line 73 of file ceti_robot.cpp.

◆ name()

std::string& CetiRobot::name ( )
inlineoverridevirtual

Implements AbstractRobot.

Definition at line 32 of file ceti_robot.h.

◆ notify()

void CetiRobot::notify ( )
overridevirtual

Observer pattern.

When changing pose, any observer calculates its new position in world frame

Implements AbstractRobot.

Definition at line 68 of file ceti_robot.cpp.

◆ observerMask()

std::bitset<3> CetiRobot::observerMask ( )
inline

Definition at line 82 of file ceti_robot.h.

◆ observers()

std::vector<std::unique_ptr<AbstractRobotElementDecorator> >& CetiRobot::observers ( )
inline

Get observers.

Returns
observer vector

Definition at line 53 of file ceti_robot.h.

◆ reset()

void CetiRobot::reset ( )

Resset all robot properties.

Definition at line 63 of file ceti_robot.cpp.

◆ robotRootBounds()

std::vector<tf2::Transform>& CetiRobot::robotRootBounds ( )
inlineoverridevirtual

Implements AbstractRobot.

Definition at line 37 of file ceti_robot.h.

◆ rootTf()

tf2::Transform& CetiRobot::rootTf ( )
inlineoverridevirtual

Implements AbstractRobot.

Definition at line 35 of file ceti_robot.h.

◆ setObserverMask()

void CetiRobot::setObserverMask ( int  i)
inline

Definition at line 83 of file ceti_robot.h.

◆ setObservers()

void CetiRobot::setObservers ( std::vector< std::unique_ptr< AbstractRobotElementDecorator >> &  observer)
inline

Set observers.

Parameters
observervector

Definition at line 43 of file ceti_robot.h.

◆ size()

tf2::Vector3& CetiRobot::size ( )
inlineoverridevirtual

Implements AbstractRobot.

Definition at line 34 of file ceti_robot.h.

◆ tf()

tf2::Transform& CetiRobot::tf ( )
inlineoverridevirtual

Implements AbstractRobot.

Definition at line 33 of file ceti_robot.h.

Member Data Documentation

◆ observer_mask_

std::bitset<3> CetiRobot::observer_mask_
protected

Bitmap to set observers.

Definition at line 17 of file ceti_robot.h.

◆ observers_

std::vector<std::unique_ptr<AbstractRobotElementDecorator> > CetiRobot::observers_
protected

Wing shared pointers.

Definition at line 16 of file ceti_robot.h.


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


multi_cell_builder
Author(s): Matteo Anedda
autogenerated on Sun Apr 9 2023 23:59:51