Simox  2.3.74.0
VirtualRobot::SceneObjectSet Class Reference
Inheritance diagram for VirtualRobot::SceneObjectSet:
VirtualRobot::RobotNodeSet VirtualRobot::KinematicChain

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW SceneObjectSet (const std::string &name="", CollisionCheckerPtr colChecker=CollisionCheckerPtr())
 
virtual ~SceneObjectSet ()
 
std::string getName () const
 
virtual bool addSceneObject (SceneObjectPtr sceneObject)
 store axis aligned bounding box covering all CollisionModels to store_aabb More...
 
virtual bool addSceneObjects (SceneObjectSetPtr sceneObjectSet)
 append a set of collision models More...
 
virtual bool addSceneObjects (RobotNodeSetPtr robotNodeSet)
 
virtual bool addSceneObjects (std::vector< RobotNodePtr > robotNodes)
 
virtual void addSceneObjects (std::vector< SceneObjectPtr > sceneObjects)
 
virtual void addSceneObjects (std::vector< ManipulationObjectPtr > sceneObjects)
 
virtual bool removeSceneObject (SceneObjectPtr sceneObject)
 remove a single col model from this Set More...
 
CollisionCheckerPtr getCollisionChecker ()
 
std::vector< CollisionModelPtrgetCollisionModels ()
 
std::vector< SceneObjectPtrgetSceneObjects ()
 
virtual unsigned int getSize () const
 
virtual SceneObjectPtr getSceneObject (unsigned int nr)
 
virtual bool hasSceneObject (SceneObjectPtr sceneObject)
 Returns true, if sceneObject is part of this set. More...
 
virtual bool getCurrentSceneObjectConfig (std::map< SceneObjectPtr, Eigen::Matrix4f > &storeConfig)
 fills the current globalPose of all associated sceneobjects to map. More...
 
virtual std::string toXML (int tabs)
 
SceneObjectSetPtr clone (const std::string &newName="")
 
SceneObjectSetPtr clone (const std::string &newName, CollisionCheckerPtr newColChecker)
 
ObstaclePtr createStaticObstacle (const std::string &name)
 

Protected Member Functions

void destroyData ()
 delete all data More...
 

Protected Attributes

std::string name
 
std::vector< SceneObjectPtrsceneObjects
 
CollisionCheckerPtr colChecker
 

Constructor & Destructor Documentation

◆ SceneObjectSet()

VirtualRobot::SceneObjectSet::SceneObjectSet ( const std::string &  name = "",
CollisionCheckerPtr  colChecker = CollisionCheckerPtr() 
)

Standard Constructor.

Parameters
nameA name string.
colCheckerCan be used to link this object to different instances of the collision checker. If NULL, the global collision checker singleton is used.

◆ ~SceneObjectSet()

VirtualRobot::SceneObjectSet::~SceneObjectSet ( )
virtual

Standard Destructor.

Member Function Documentation

◆ addSceneObject()

bool VirtualRobot::SceneObjectSet::addSceneObject ( SceneObjectPtr  sceneObject)
virtual

store axis aligned bounding box covering all CollisionModels to store_aabb

store axis aligned bounding boxes to store_aabbs store object oriented bounding boxes of contained models to store_oobbs along with iv model append a single object

Reimplemented in VirtualRobot::RobotNodeSet.

◆ addSceneObjects() [1/5]

bool VirtualRobot::SceneObjectSet::addSceneObjects ( SceneObjectSetPtr  sceneObjectSet)
virtual

append a set of collision models

Reimplemented in VirtualRobot::RobotNodeSet.

◆ addSceneObjects() [2/5]

bool VirtualRobot::SceneObjectSet::addSceneObjects ( RobotNodeSetPtr  robotNodeSet)
virtual

Append all associated object of the given robotNodeSet.

Reimplemented in VirtualRobot::RobotNodeSet.

◆ addSceneObjects() [3/5]

bool VirtualRobot::SceneObjectSet::addSceneObjects ( std::vector< RobotNodePtr robotNodes)
virtual

Reimplemented in VirtualRobot::RobotNodeSet.

◆ addSceneObjects() [4/5]

void VirtualRobot::SceneObjectSet::addSceneObjects ( std::vector< SceneObjectPtr sceneObjects)
virtual

◆ addSceneObjects() [5/5]

void VirtualRobot::SceneObjectSet::addSceneObjects ( std::vector< ManipulationObjectPtr sceneObjects)
virtual

◆ clone() [1/2]

VirtualRobot::SceneObjectSetPtr VirtualRobot::SceneObjectSet::clone ( const std::string &  newName = "")

Create a (shallow) copy of this set. The containing sceneobjects are not cloned, but referenced by the newly generated set.

Parameters
newNameThe name of the newly created set.

◆ clone() [2/2]

VirtualRobot::SceneObjectSetPtr VirtualRobot::SceneObjectSet::clone ( const std::string &  newName,
CollisionCheckerPtr  newColChecker 
)

Create a deep copy of this set, which means that all sceneobjects are cloned.

Parameters
newNameThe name of the newly created set.
newColCheckerA new collision checker instance.

◆ createStaticObstacle()

VirtualRobot::ObstaclePtr VirtualRobot::SceneObjectSet::createStaticObstacle ( const std::string &  name)

This method creates a new obstacle from all added SceneObjects. Note, that the resulting object is a rigid body that can be placed in the scene but the internal structure is fixed. This object can be useful when the SceneObjectSet consists of a large number of objects that do not change their relation to each other. When building a static obstacle collision detection can be performed much more efficient.

◆ destroyData()

void VirtualRobot::SceneObjectSet::destroyData ( )
protected

delete all data

◆ getCollisionChecker()

CollisionCheckerPtr VirtualRobot::SceneObjectSet::getCollisionChecker ( )
inline

◆ getCollisionModels()

std::vector< CollisionModelPtr > VirtualRobot::SceneObjectSet::getCollisionModels ( )

Returns all covered collision models.

◆ getCurrentSceneObjectConfig()

bool VirtualRobot::SceneObjectSet::getCurrentSceneObjectConfig ( std::map< SceneObjectPtr, Eigen::Matrix4f > &  storeConfig)
virtual

fills the current globalPose of all associated sceneobjects to map.

◆ getName()

std::string VirtualRobot::SceneObjectSet::getName ( ) const

Returns name of this model

◆ getSceneObject()

VirtualRobot::SceneObjectPtr VirtualRobot::SceneObjectSet::getSceneObject ( unsigned int  nr)
virtual

◆ getSceneObjects()

std::vector< SceneObjectPtr > VirtualRobot::SceneObjectSet::getSceneObjects ( )

◆ getSize()

unsigned int VirtualRobot::SceneObjectSet::getSize ( ) const
virtual

Reimplemented in VirtualRobot::RobotNodeSet.

◆ hasSceneObject()

bool VirtualRobot::SceneObjectSet::hasSceneObject ( SceneObjectPtr  sceneObject)
virtual

Returns true, if sceneObject is part of this set.

◆ removeSceneObject()

bool VirtualRobot::SceneObjectSet::removeSceneObject ( SceneObjectPtr  sceneObject)
virtual

remove a single col model from this Set

Reimplemented in VirtualRobot::RobotNodeSet.

◆ toXML()

std::string VirtualRobot::SceneObjectSet::toXML ( int  tabs)
virtual

Reimplemented in VirtualRobot::RobotNodeSet.

Field Documentation

◆ colChecker

CollisionCheckerPtr VirtualRobot::SceneObjectSet::colChecker
protected

◆ name

std::string VirtualRobot::SceneObjectSet::name
protected

◆ sceneObjects

std::vector< SceneObjectPtr > VirtualRobot::SceneObjectSet::sceneObjects
protected