44 dispatcher_->registerCollisionCreateFunc(BOX_SHAPE_PROXYTYPE, BOX_SHAPE_PROXYTYPE,
45 coll_config_.getCollisionAlgorithmCreateFunc(CONVEX_SHAPE_PROXYTYPE,
46 CONVEX_SHAPE_PROXYTYPE));
49 ~btCollisionDispatcher::CD_USE_RELATIVE_CONTACT_BREAKING_THRESHOLD);
61 for (
const std::pair<const std::string, collision_detection_bullet::CollisionObjectWrapperPtr>& cow :
link2cow_)
75 CollisionObjectWrapperPtr& cow = it->second;
89 it->second->m_enabled =
true;
101 it->second->m_enabled =
false;
114 CollisionObjectWrapperPtr& cow = it->second;
116 cow->setWorldTransform(tf);
119 if (cow->getBroadphaseHandle())
129 for (std::pair<const std::string, CollisionObjectWrapperPtr>& co :
link2cow_)
131 CollisionObjectWrapperPtr& cow = co.second;
149 for (std::pair<const std::string, CollisionObjectWrapperPtr>& co :
link2cow_)
151 CollisionObjectWrapperPtr& cow = co.second;
152 cow->setContactProcessingThreshold(
static_cast<btScalar
>(contact_distance));
153 if (cow->getBroadphaseHandle())
bool hasCollisionObject(const std::string &name) const
Find if a collision object already exists.
std::vector< std::string > active_
A list of the active collision links.
std::unique_ptr< btBroadphaseInterface > broadphase_
The bullet broadphase interface.
double contact_distance_
The contact distance threshold.
BroadphaseFilterCallback filter_callback_
Callback function for culling objects before a broadphase check.
const std::vector< std::string > & getActiveCollisionObjects() const
Get which collision objects are active.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW BulletBVHManager()
Constructor.
std::map< std::string, CollisionObjectWrapperPtr > link2cow_
A map of collision objects being managed.
bool removeCollisionObject(const std::string &name)
Remove an object from the checker.
void setCollisionObjectsTransform(const std::string &name, const Eigen::Isometry3d &pose)
Set a single static collision object's tansform.
void setContactDistanceThreshold(double contact_distance)
Set the contact distance threshold for which collision should be considered through expanding the AAB...
btDefaultCollisionConfiguration coll_config_
The bullet collision configuration.
std::unique_ptr< btCollisionDispatcher > dispatcher_
The bullet collision dispatcher used for getting object to object collision algorithm.
bool disableCollisionObject(const std::string &name)
Disable an object.
bool enableCollisionObject(const std::string &name)
Enable an object.
void setActiveCollisionObjects(const std::vector< std::string > &names)
Set which collision objects are active.
double getContactDistanceThreshold() const
Get the contact distance threshold.
virtual ~BulletBVHManager()
const std::map< std::string, CollisionObjectWrapperPtr > & getCollisionObjects() const
btVector3 convertEigenToBt(const Eigen::Vector3d &v)
Converts eigen vector to bullet vector.
void updateCollisionObjectFilters(const std::vector< std::string > &active, CollisionObjectWrapper &cow)
Update a collision objects filters.
void updateBroadphaseAABB(const CollisionObjectWrapperPtr &cow, const std::unique_ptr< btBroadphaseInterface > &broadphase, const std::unique_ptr< btCollisionDispatcher > &dispatcher)
Update the Broadphase AABB for the input collision object.
void removeCollisionObjectFromBroadphase(const CollisionObjectWrapperPtr &cow, const std::unique_ptr< btBroadphaseInterface > &broadphase, const std::unique_ptr< btCollisionDispatcher > &dispatcher)
Remove the collision object from broadphase.
void addCollisionObjectToBroadphase(const CollisionObjectWrapperPtr &cow, const std::unique_ptr< btBroadphaseInterface > &broadphase, const std::unique_ptr< btCollisionDispatcher > &dispatcher)
Add the collision object to broadphase.
const btScalar BULLET_DEFAULT_CONTACT_DISTANCE