|
| CollisionDetector (rw::core::Ptr< rw::models::WorkCell > workcell) |
| Collision detector for a workcell with only broad-phase collision checking. More...
|
|
| CollisionDetector (rw::core::Ptr< rw::models::WorkCell > workcell, rw::core::Ptr< rw::proximity::CollisionStrategy > strategy) |
| Collision detector for a workcell. More...
|
|
| CollisionDetector (rw::core::Ptr< rw::models::WorkCell > workcell, rw::core::Ptr< rw::proximity::CollisionStrategy > strategy, rw::core::Ptr< ProximityFilterStrategy > filter) |
| Collision detector for a workcell. Collision checking is done for the provided collision setup alone. More...
|
|
bool | inCollision (const kinematics::State &state, QueryResult *result=0, bool stopAtFirstContact=false) const |
| Check the workcell for collisions. More...
|
|
bool | inCollision (const kinematics::State &state, rw::proximity::ProximityData &data) const |
| Check the workcell for collisions. More...
|
|
bool | inCollision (const rw::kinematics::State &state, std::vector< std::pair< rw::kinematics::Frame *, rw::kinematics::Frame * >> &result, bool stopAtFirstContact=false) |
| Check the workcell for collisions. More...
|
|
rw::core::Ptr< rw::proximity::CollisionStrategy > | getCollisionStrategy () const |
| Get the narrow-phase collision strategy. More...
|
|
bool | addGeometry (rw::core::Ptr< rw::kinematics::Frame > frame, const rw::core::Ptr< rw::geometry::Geometry > geometry) |
| Add Geometry associated to frame. More...
|
|
void | removeGeometry (rw::core::Ptr< rw::kinematics::Frame > frame, const rw::core::Ptr< rw::geometry::Geometry > geometry) |
| Removes geometry from CollisionDetector. More...
|
|
void | removeGeometry (rw::core::Ptr< rw::kinematics::Frame > frame, const std::string geometryId) |
| Removes geometry from CollisionDetector. More...
|
|
std::vector< std::string > | getGeometryIDs (rw::core::Ptr< rw::kinematics::Frame > frame) |
| return the ids of all the geometries of this frames.
|
|
bool | hasGeometry (rw::core::Ptr< rw::kinematics::Frame > frame, const std::string &geometryId) |
| Returns whether frame has an associated geometry with geometryId. More...
|
|
rw::core::Ptr< rw::geometry::Geometry > | getGeometry (rw::core::Ptr< rw::kinematics::Frame > frame, const std::string &geometryId) |
| Get the geometry from its ID. More...
|
|
| ProximityCalculator (rw::core::Ptr< rw::kinematics::Frame > root, rw::core::Ptr< rw::models::WorkCell > workcell, rw::core::Ptr< Strategy > strategy, const rw::kinematics::State &initial_state) |
| Proximity calculations for a given tree, collision setup and primitive Proximity calculator. Uses proximity strategy given by the workcell. More...
|
|
| ProximityCalculator (rw::core::Ptr< rw::models::WorkCell > workcell, rw::core::Ptr< Strategy > strategy) |
| Construct proximity calculator for a WorkCell with an associated proximity strategy. More...
|
|
| ProximityCalculator (const ProximityCalculator &)=delete |
| Copy constructor is non-existent. Copying is not possible!
|
|
ProximityCalculator & | operator= (const ProximityCalculator &)=delete |
| Assignment operator is non-existent. Copying is not possible!
|
|
ProximityStrategyData | calculate (const rw::kinematics::State &state, rw::core::Ptr< ProximityStrategyData > settings=rw::core::Ptr< ProximityStrategyData >(), rw::core::Ptr< std::vector< ProximityStrategyData >> results=rw::core::Ptr< std::vector< ProximityStrategyData >>()) |
| Performece the Proximity calculation based on the chosen strategy type. As the varius strategies usese differenct settings all settings will be extracted from settings. If more then the default result is needed (first collision or shortest distance) result can given to get the extra info. More...
|
|
rw::core::Ptr< ProximityFilterStrategy > | getProximityFilterStrategy () const |
| The Proximity Filter strategy of the ProximityCalculator.
|
|
void | setProximityFilterStrategy (rw::core::Ptr< ProximityFilterStrategy > proxStrategy) |
| Set the Proximity Filter strategy of the ProximityCalculator. More...
|
|
void | setStrategy (rw::core::Ptr< Strategy > strategy) |
| Set a new strategy. OBS. models are stored in the strategy, so make sure that the new strategy includes all nessesary models. More...
|
|
rw::core::Ptr< Strategy > | getStrategy () const |
| Get the ProximityStrategy. More...
|
|
bool | addGeometry (rw::core::Ptr< rw::kinematics::Frame > frame, const rw::core::Ptr< rw::geometry::Geometry > &geometry) |
| Add Geometry associated to frame. More...
|
|
void | removeGeometry (rw::core::Ptr< rw::kinematics::Frame > frame, const rw::core::Ptr< rw::geometry::Geometry > &geometry) |
| Removes geometry from ProximityCalculator. More...
|
|
void | removeGeometry (rw::core::Ptr< rw::kinematics::Frame > frame, const std::string geometryId) |
| Removes geometry from ProximityCalculator. More...
|
|
void | addRule (const rw::proximity::ProximitySetupRule &rule) |
| Adds rule specifying inclusion/exclusion of frame pairs in Proximity calculation.
|
|
void | removeRule (const rw::proximity::ProximitySetupRule &rule) |
| Removes rule specifying inclusion/exclusion of frame pairs in Proximity calculation.
|
|
double | getComputationTime () const |
| Get the computation time used in the inCollision functions. More...
|
|
size_t | getNoOfCalls () const |
| Get the number of times the inCollision functions have been called. More...
|
|
void | resetComputationTimeAndCount () |
| Reset the counter for inCollision invocations and the computation timer.
|
|
std::vector< std::string > | getGeometryIDs (rw::core::Ptr< rw::kinematics::Frame > frame) |
| return the ids of all the geometries of this frames.
|
|
bool | hasGeometry (rw::core::Ptr< rw::kinematics::Frame > frame, const std::string &geometryId) |
| Returns whether frame has an associated geometry with geometryId. More...
|
|
rw::core::Ptr< rw::geometry::Geometry > | getGeometry (rw::core::Ptr< rw::kinematics::Frame > frame, const std::string &geometryId) |
| Get the geometry from its ID. More...
|
|
The CollisionDetector implements an efficient way of checking a complete frame tree for collisions.
It relies on a BroadPhaseDetector to do initial filtering which removes obviously not colliding frame pairs.
After the filtering the remaining frame pairs are tested for collision using an CollisionStrategy which is a narrow phase collision detector.
The collision detector does not dictate a specific detection strategy or algorithm, instead it relies on the CollisionStrategy interface for the actual collision checking between two frames.
- Note
- The collision detector is not thread safe and as such should not be used by multiple threads at a time.