33 #ifndef DART_COLLISION_COLLISIONDETECTOR_HPP_
34 #define DART_COLLISION_COLLISIONDETECTOR_HPP_
39 #include <Eigen/Dense>
67 template <
typename Derived>
82 virtual const std::string&
getType()
const = 0;
103 template <
typename... Args>
107 template <
typename... Args>
109 const Args&... args);
276 std::weak_ptr<CollisionObject>>;
const CollisionOption & option
Collision option of DART.
Definition: FCLCollisionDetector.cpp:154
CollisionResult * result
Collision result of DART.
Definition: FCLCollisionDetector.cpp:157
Definition: CollisionDetector.hpp:191
virtual std::shared_ptr< CollisionObject > claimCollisionObject(const dynamics::ShapeFrame *shapeFrame)=0
Claim CollisionObject associated with shapeFrame.
CollisionObjectManager(CollisionDetector *cd)
Constructor.
Definition: CollisionDetector.cpp:77
CollisionDetector * getCollisionDetector()
Returns collision detector.
Definition: CollisionDetector.cpp:86
CollisionDetector * mCollisionDetector
Definition: CollisionDetector.hpp:210
virtual ~CollisionObjectManager()=default
Virtual destructor.
Definition: CollisionDetector.hpp:247
CollisionObjectMap mCollisionObjectMap
Definition: CollisionDetector.hpp:278
ManagerForSharableCollisionObjects(CollisionDetector *cd)
Constructor.
Definition: CollisionDetector.cpp:135
std::shared_ptr< CollisionObject > claimCollisionObject(const dynamics::ShapeFrame *shapeFrame)
Claim CollisionObject associated with shapeFrame.
Definition: CollisionDetector.cpp:152
std::map< const dynamics::ShapeFrame *, std::weak_ptr< CollisionObject > > CollisionObjectMap
Definition: CollisionDetector.hpp:276
virtual ~ManagerForSharableCollisionObjects()
Destructor.
Definition: CollisionDetector.cpp:145
const CollisionObjectDeleter mCollisionObjectDeleter
Definition: CollisionDetector.hpp:273
Definition: CollisionDetector.hpp:217
ManagerForUnsharableCollisionObjects(CollisionDetector *cd)
Constructor.
Definition: CollisionDetector.cpp:93
std::shared_ptr< CollisionObject > claimCollisionObject(const dynamics::ShapeFrame *shapeFrame)
Claim CollisionObject associated with shapeFrame.
Definition: CollisionDetector.cpp:103
const CollisionObjectDeleter mCollisionObjectDeleter
Definition: CollisionDetector.hpp:240
Definition: CollisionDetector.hpp:56
virtual double distance(CollisionGroup *group, const DistanceOption &option=DistanceOption(false, 0.0, nullptr), DistanceResult *result=nullptr)=0
Get the minimum signed distance between the Shape pairs in the given CollisionGroup.
CollisionDetector()=default
Constructor.
std::shared_ptr< CollisionObject > claimCollisionObject(const dynamics::ShapeFrame *shapeFrame)
Claim CollisionObject associated with shapeFrame.
Definition: CollisionDetector.cpp:60
virtual void notifyCollisionObjectDestroying(CollisionObject *object)
Notify that a CollisionObject is destroying. Do nothing by default.
Definition: CollisionDetector.cpp:70
virtual bool collide(CollisionGroup *group, const CollisionOption &option=CollisionOption(false, 1u, nullptr), CollisionResult *result=nullptr)=0
Perform collision check for a single group.
virtual std::unique_ptr< CollisionObject > createCollisionObject(const dynamics::ShapeFrame *shapeFrame)=0
Create CollisionObject.
std::shared_ptr< CollisionGroup > createCollisionGroupAsSharedPtr()
Helper function that creates and returns CollisionGroup as a shared_ptr.
Definition: CollisionDetector.cpp:54
virtual const std::string & getType() const =0
Return collision detection engine type as a std::string.
virtual std::shared_ptr< CollisionDetector > cloneWithoutCollisionObjects()=0
Create a clone of this CollisionDetector.
static Factory * getFactory()
Returns the singleton factory.
Definition: CollisionDetector.cpp:47
virtual ~CollisionDetector()=default
Destructor.
virtual void refreshCollisionObject(CollisionObject *object)=0
Update the collision geometry of a ShapeFrame.
virtual bool collide(CollisionGroup *group1, CollisionGroup *group2, const CollisionOption &option=CollisionOption(false, 1u, nullptr), CollisionResult *result=nullptr)=0
Perform collision check for two groups.
std::unique_ptr< CollisionObjectManager > mCollisionObjectManager
Definition: CollisionDetector.hpp:185
virtual std::unique_ptr< CollisionGroup > createCollisionGroup()=0
Create a collision group.
virtual double distance(CollisionGroup *group1, CollisionGroup *group2, const DistanceOption &option=DistanceOption(false, 0.0, nullptr), DistanceResult *result=nullptr)=0
Get the minimum signed distance between the Shape pairs where a pair consist of two shapes from each ...
Definition: CollisionGroup.hpp:51
Definition: CollisionObject.hpp:45
Definition: CollisionResult.hpp:52
Helper class to register a object creator function to the Singleton.
Definition: Factory.hpp:121
Implementation of the Abstract Factory Pattern.
Definition: Factory.hpp:62
Singleton template class.
Definition: Singleton.hpp:51
Definition: ShapeFrame.hpp:164
::fcl::CollisionObject CollisionObject
Definition: BackwardCompatibility.hpp:152
Definition: BulletCollisionDetector.cpp:63
This deleter is responsible for deleting CollisionObject and removing it from mCollisionObjectMap whe...
Definition: CollisionDetector.hpp:265
void operator()(CollisionObject *object) const
Definition: CollisionDetector.cpp:188
ManagerForSharableCollisionObjects * mCollisionObjectManager
Definition: CollisionDetector.hpp:266
CollisionObjectDeleter(ManagerForSharableCollisionObjects *mgr)
Definition: CollisionDetector.cpp:178
This deleter is responsible for deleting CollisionObject and removing it from mCollisionObjectMap whe...
Definition: CollisionDetector.hpp:232
CollisionObjectDeleter(ManagerForUnsharableCollisionObjects *mgr)
Definition: CollisionDetector.cpp:115
ManagerForUnsharableCollisionObjects * mCollisionObjectManager
Definition: CollisionDetector.hpp:233
void operator()(CollisionObject *object) const
Definition: CollisionDetector.cpp:125
Definition: CollisionOption.hpp:45
Definition: DistanceOption.hpp:45
Definition: DistanceResult.hpp:47