RobWorkProject
Classes | Public Types | Public Member Functions | List of all members
BasicFilterStrategy Class Reference

a simple rule based broadphase filter strategy. A static frame pair list of frame pairs that is to be checked for collision is maintained. The list is static in the sense that it is not optimized to be changed. However the user can both add and remove new geometries and rules. More...

#include <BasicFilterStrategy.hpp>

Inherits ProximityFilterStrategy.

Public Types

typedef rw::common::Ptr< BasicFilterStrategyPtr
 smart pointer type to this class
 
typedef rw::common::Ptr< const BasicFilterStrategyCPtr
 smart pointer type to this const class
 
- Public Types inherited from ProximityFilterStrategy
typedef rw::common::Ptr< ProximityFilterStrategyPtr
 smart pointer type to this class
 
typedef rw::common::Ptr< const ProximityFilterStrategyCPtr
 smart pointer type to this const class
 

Public Member Functions

 BasicFilterStrategy (rw::common::Ptr< rw::models::WorkCell > workcell)
 constructor - the ProximitySetup will be extracted from the workcell description if possible. More...
 
 BasicFilterStrategy (rw::common::Ptr< rw::models::WorkCell > workcell, const ProximitySetup &setup)
 constructor - constructs frame pairs based on the setup More...
 
virtual ~BasicFilterStrategy ()
 destructor
 
virtual void reset (const rw::kinematics::State &state)
 Reset. More...
 
virtual ProximityCache::Ptr createProximityCache ()
 creates a FilterData object. This is used for caching relavant data between calls to update More...
 
virtual ProximityFilter::Ptr update (const rw::kinematics::State &state)
 Do an update. More...
 
virtual ProximityFilter::Ptr update (const rw::kinematics::State &state, ProximityCache::Ptr data)
 creates a FilterData object. This is used for caching relavant data between calls to update More...
 
ProximitySetupgetProximitySetup ()
 
virtual void addGeometry (rw::kinematics::Frame *frame, const rw::common::Ptr< rw::geometry::Geometry >)
 Adds geometry associated to frame. More...
 
virtual void removeGeometry (rw::kinematics::Frame *frame, const rw::common::Ptr< rw::geometry::Geometry >)
 Removes the geometric model geo associated with Frame frame from this strategy. More...
 
virtual void removeGeometry (rw::kinematics::Frame *frame, const std::string &geometryId)
 Removes the geometric model with name geoName and which is associated with frame. More...
 
virtual void addRule (const ProximitySetupRule &rule)
 Adds a ProximitySetupRule. More...
 
virtual void removeRule (const ProximitySetupRule &rule)
 Removes a ProximitySetupRule If the rule cannot be found, then noting happens. More...
 
- Public Member Functions inherited from ProximityFilterStrategy
virtual ~ProximityFilterStrategy ()
 Destructor.
 

Detailed Description

a simple rule based broadphase filter strategy. A static frame pair list of frame pairs that is to be checked for collision is maintained. The list is static in the sense that it is not optimized to be changed. However the user can both add and remove new geometries and rules.

Note
The framepair list is explicitly kept in this class which makes this broadphase strategy infeasible for workcells with many objects. Consider a workcell with 100 objects, this will in worst case make a list of 10000 framepairs.

Constructor & Destructor Documentation

◆ BasicFilterStrategy() [1/2]

constructor - the ProximitySetup will be extracted from the workcell description if possible.

Parameters
workcell[in] the workcell.

◆ BasicFilterStrategy() [2/2]

constructor - constructs frame pairs based on the setup

Parameters
workcell[in] the workcell
setup[in] the ProximitySetup describing exclude/include relations

Member Function Documentation

◆ addGeometry()

virtual void addGeometry ( rw::kinematics::Frame frame,
const rw::common::Ptr< rw::geometry::Geometry  
)
virtual

Adds geometry associated to frame.

Parameters
frame[in] Frame which has the geometry associated
geo[in] Geometry

Implements ProximityFilterStrategy.

◆ addRule()

virtual void addRule ( const ProximitySetupRule rule)
virtual

Adds a ProximitySetupRule.

Parameters
rule[in] the rule to add.

Implements ProximityFilterStrategy.

◆ createProximityCache()

virtual ProximityCache::Ptr createProximityCache ( )
inlinevirtual

creates a FilterData object. This is used for caching relavant data between calls to update

Returns

Implements ProximityFilterStrategy.

◆ getProximitySetup()

ProximitySetup& getProximitySetup ( )
virtual

◆ removeGeometry() [1/2]

virtual void removeGeometry ( rw::kinematics::Frame frame,
const rw::common::Ptr< rw::geometry::Geometry  
)
virtual

Removes the geometric model geo associated with Frame frame from this strategy.

Parameters
frame[in] Frame which has the geometry associated
geo[in] Geometry

Implements ProximityFilterStrategy.

◆ removeGeometry() [2/2]

virtual void removeGeometry ( rw::kinematics::Frame frame,
const std::string &  geometryId 
)
virtual

Removes the geometric model with name geoName and which is associated with frame.

Parameters
frame[in] Frame which has the geometry associated
geoName[in] Name of geometry

Implements ProximityFilterStrategy.

◆ removeRule()

virtual void removeRule ( const ProximitySetupRule rule)
virtual

Removes a ProximitySetupRule If the rule cannot be found, then noting happens.

Parameters
rule[in] the rule to remove.

Implements ProximityFilterStrategy.

◆ reset()

virtual void reset ( const rw::kinematics::State state)
virtual

Reset.

Parameters
state[in] the state.

Implements ProximityFilterStrategy.

◆ update() [1/2]

virtual ProximityFilter::Ptr update ( const rw::kinematics::State state)
virtual

Do an update.

Parameters
state[in] the state.
Returns

Implements ProximityFilterStrategy.

◆ update() [2/2]

virtual ProximityFilter::Ptr update ( const rw::kinematics::State state,
ProximityCache::Ptr  data 
)
virtual

creates a FilterData object. This is used for caching relavant data between calls to update

Returns

Implements ProximityFilterStrategy.


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