Tesseract
Motion Planning Environment
|
A BVH implementation of a tesseract contact manager. More...
#include <bullet_cast_bvh_manager.h>
Public Types | |
using | Ptr = std::shared_ptr< BulletCastBVHManager > |
using | ConstPtr = std::shared_ptr< const BulletCastBVHManager > |
using | UPtr = std::unique_ptr< BulletCastBVHManager > |
using | ConstUPtr = std::unique_ptr< const BulletCastBVHManager > |
Public Types inherited from tesseract_collision::ContinuousContactManager | |
using | Ptr = std::shared_ptr< ContinuousContactManager > |
using | ConstPtr = std::shared_ptr< const ContinuousContactManager > |
using | UPtr = std::unique_ptr< ContinuousContactManager > |
using | ConstUPtr = std::unique_ptr< const ContinuousContactManager > |
Public Member Functions | |
BulletCastBVHManager (std::string name="BulletCastBVHManager", TesseractCollisionConfigurationInfo config_info=TesseractCollisionConfigurationInfo()) | |
~BulletCastBVHManager () override | |
BulletCastBVHManager (const BulletCastBVHManager &)=delete | |
BulletCastBVHManager & | operator= (const BulletCastBVHManager &)=delete |
BulletCastBVHManager (BulletCastBVHManager &&)=delete | |
BulletCastBVHManager & | operator= (BulletCastBVHManager &&)=delete |
std::string | getName () const override final |
Get the name of the contact manager. More... | |
ContinuousContactManager::UPtr | clone () const override final |
Clone the manager. More... | |
bool | addCollisionObject (const std::string &name, const int &mask_id, const CollisionShapesConst &shapes, const tesseract_common::VectorIsometry3d &shape_poses, bool enabled=true) override final |
Add a collision object to the checker. More... | |
const CollisionShapesConst & | getCollisionObjectGeometries (const std::string &name) const override final |
Get a collision objects collision geometries. More... | |
const tesseract_common::VectorIsometry3d & | getCollisionObjectGeometriesTransforms (const std::string &name) const override final |
Get a collision objects collision geometries transforms. More... | |
bool | hasCollisionObject (const std::string &name) const override final |
Find if a collision object already exists. More... | |
bool | removeCollisionObject (const std::string &name) override final |
Remove an object from the checker. More... | |
bool | enableCollisionObject (const std::string &name) override final |
Enable an object. More... | |
bool | disableCollisionObject (const std::string &name) override final |
Disable an object. More... | |
bool | isCollisionObjectEnabled (const std::string &name) const override final |
Check if collision object is enabled. More... | |
void | setCollisionObjectsTransform (const std::string &name, const Eigen::Isometry3d &pose) override final |
Set a single static collision object's tansforms. More... | |
void | setCollisionObjectsTransform (const std::vector< std::string > &names, const tesseract_common::VectorIsometry3d &poses) override final |
Set a series of static collision object's tranforms. More... | |
void | setCollisionObjectsTransform (const tesseract_common::TransformMap &transforms) override final |
Set a series of static collision object's tranforms. More... | |
void | setCollisionObjectsTransform (const std::string &name, const Eigen::Isometry3d &pose1, const Eigen::Isometry3d &pose2) override final |
Set a single cast(moving) collision object's tansforms. More... | |
void | setCollisionObjectsTransform (const std::vector< std::string > &names, const tesseract_common::VectorIsometry3d &pose1, const tesseract_common::VectorIsometry3d &pose2) override final |
Set a series of cast(moving) collision object's tranforms. More... | |
void | setCollisionObjectsTransform (const tesseract_common::TransformMap &pose1, const tesseract_common::TransformMap &pose2) override final |
Set a series of cast(moving) collision object's tranforms. More... | |
const std::vector< std::string > & | getCollisionObjects () const override final |
Get all collision objects. More... | |
void | setActiveCollisionObjects (const std::vector< std::string > &names) override final |
Set which collision objects can move. More... | |
const std::vector< std::string > & | getActiveCollisionObjects () const override final |
Get which collision objects can move. More... | |
void | setCollisionMarginData (CollisionMarginData collision_margin_data, CollisionMarginOverrideType override_type=CollisionMarginOverrideType::REPLACE) override final |
Set the contact distance thresholds for which collision should be considered on a per pair basis. More... | |
void | setDefaultCollisionMarginData (double default_collision_margin) override final |
Set the default collision margin. More... | |
void | setPairCollisionMarginData (const std::string &name1, const std::string &name2, double collision_margin) override final |
Set the margin for a given contact pair. More... | |
const CollisionMarginData & | getCollisionMarginData () const override final |
Get the contact distance threshold. More... | |
void | setIsContactAllowedFn (IsContactAllowedFn fn) override final |
Set the active function for determining if two links are allowed to be in collision. More... | |
IsContactAllowedFn | getIsContactAllowedFn () const override final |
Get the active function for determining if two links are allowed to be in collision. More... | |
void | contactTest (ContactResultMap &collisions, const ContactRequest &request) override final |
Perform a contact test for all objects based. More... | |
void | addCollisionObject (const COW::Ptr &cow) |
A a bullet collision object to the manager. More... | |
Public Member Functions inherited from tesseract_collision::ContinuousContactManager | |
ContinuousContactManager ()=default | |
virtual | ~ContinuousContactManager ()=default |
ContinuousContactManager (const ContinuousContactManager &)=delete | |
ContinuousContactManager & | operator= (const ContinuousContactManager &)=delete |
ContinuousContactManager (ContinuousContactManager &&)=delete | |
ContinuousContactManager & | operator= (ContinuousContactManager &&)=delete |
virtual std::string | getName () const =0 |
Get the name of the contact manager. More... | |
virtual ContinuousContactManager::UPtr | clone () const =0 |
Clone the manager. More... | |
virtual bool | addCollisionObject (const std::string &name, const int &mask_id, const CollisionShapesConst &shapes, const tesseract_common::VectorIsometry3d &shape_poses, bool enabled=true)=0 |
Add a collision object to the checker. More... | |
virtual const CollisionShapesConst & | getCollisionObjectGeometries (const std::string &name) const =0 |
Get a collision objects collision geometries. More... | |
virtual const tesseract_common::VectorIsometry3d & | getCollisionObjectGeometriesTransforms (const std::string &name) const =0 |
Get a collision objects collision geometries transforms. More... | |
virtual bool | hasCollisionObject (const std::string &name) const =0 |
Find if a collision object already exists. More... | |
virtual bool | removeCollisionObject (const std::string &name)=0 |
Remove an object from the checker. More... | |
virtual bool | enableCollisionObject (const std::string &name)=0 |
Enable an object. More... | |
virtual bool | disableCollisionObject (const std::string &name)=0 |
Disable an object. More... | |
virtual bool | isCollisionObjectEnabled (const std::string &name) const =0 |
Check if collision object is enabled. More... | |
virtual void | setCollisionObjectsTransform (const std::string &name, const Eigen::Isometry3d &pose)=0 |
Set a single static collision object's tansforms. More... | |
virtual void | setCollisionObjectsTransform (const std::vector< std::string > &names, const tesseract_common::VectorIsometry3d &poses)=0 |
Set a series of static collision object's tranforms. More... | |
virtual void | setCollisionObjectsTransform (const tesseract_common::TransformMap &transforms)=0 |
Set a series of static collision object's tranforms. More... | |
virtual void | setCollisionObjectsTransform (const std::string &name, const Eigen::Isometry3d &pose1, const Eigen::Isometry3d &pose2)=0 |
Set a single cast(moving) collision object's tansforms. More... | |
virtual void | setCollisionObjectsTransform (const std::vector< std::string > &names, const tesseract_common::VectorIsometry3d &pose1, const tesseract_common::VectorIsometry3d &pose2)=0 |
Set a series of cast(moving) collision object's tranforms. More... | |
virtual void | setCollisionObjectsTransform (const tesseract_common::TransformMap &pose1, const tesseract_common::TransformMap &pose2)=0 |
Set a series of cast(moving) collision object's tranforms. More... | |
virtual const std::vector< std::string > & | getCollisionObjects () const =0 |
Get all collision objects. More... | |
virtual void | setActiveCollisionObjects (const std::vector< std::string > &names)=0 |
Set which collision objects can move. More... | |
virtual const std::vector< std::string > & | getActiveCollisionObjects () const =0 |
Get which collision objects can move. More... | |
virtual void | setCollisionMarginData (CollisionMarginData collision_margin_data, CollisionMarginOverrideType override_type=CollisionMarginOverrideType::REPLACE)=0 |
Set the contact distance thresholds for which collision should be considered on a per pair basis. More... | |
virtual void | setDefaultCollisionMarginData (double default_collision_margin)=0 |
Set the default collision margin. More... | |
virtual void | setPairCollisionMarginData (const std::string &name1, const std::string &name2, double collision_margin)=0 |
Set the margin for a given contact pair. More... | |
virtual const CollisionMarginData & | getCollisionMarginData () const =0 |
Get the contact distance threshold. More... | |
virtual void | setIsContactAllowedFn (IsContactAllowedFn fn)=0 |
Set the active function for determining if two links are allowed to be in collision. More... | |
virtual IsContactAllowedFn | getIsContactAllowedFn () const =0 |
Get the active function for determining if two links are allowed to be in collision. More... | |
virtual void | contactTest (ContactResultMap &collisions, const ContactRequest &request)=0 |
Perform a contact test for all objects based. More... | |
virtual void | applyContactManagerConfig (const ContactManagerConfig &config) |
Applies settings in the config. More... | |
Private Member Functions | |
void | onCollisionMarginDataChanged () |
This function will update internal data when margin data has changed. More... | |
Private Attributes | |
std::string | name_ |
std::vector< std::string > | active_ |
A list of the active collision objects. More... | |
std::vector< std::string > | collision_objects_ |
A list of the collision objects. More... | |
std::unique_ptr< btCollisionDispatcher > | dispatcher_ |
The bullet collision dispatcher used for getting object to object collison algorithm. More... | |
btDispatcherInfo | dispatch_info_ |
The bullet collision dispatcher configuration information. More... | |
TesseractCollisionConfigurationInfo | config_info_ |
The bullet collision configuration information. More... | |
TesseractCollisionConfiguration | coll_config_ |
The bullet collision configuration. More... | |
std::unique_ptr< btBroadphaseInterface > | broadphase_ |
The bullet broadphase interface. More... | |
Link2Cow | link2cow_ |
A map of collision objects being managed. More... | |
Link2Cow | link2castcow_ |
A map of cast collision objects being managed. More... | |
ContactTestData | contact_test_data_ |
This is used when contactTest is called. It is also added as a user point to the collsion objects so it can be used to exit collision checking for compound shapes. More... | |
TesseractOverlapFilterCallback | broadphase_overlap_cb_ |
Filter collision objects before broadphase check. More... | |
A BVH implementation of a tesseract contact manager.
using tesseract_collision::tesseract_collision_bullet::BulletCastBVHManager::ConstPtr = std::shared_ptr<const BulletCastBVHManager> |
using tesseract_collision::tesseract_collision_bullet::BulletCastBVHManager::ConstUPtr = std::unique_ptr<const BulletCastBVHManager> |
using tesseract_collision::tesseract_collision_bullet::BulletCastBVHManager::Ptr = std::shared_ptr<BulletCastBVHManager> |
using tesseract_collision::tesseract_collision_bullet::BulletCastBVHManager::UPtr = std::unique_ptr<BulletCastBVHManager> |
tesseract_collision::tesseract_collision_bullet::BulletCastBVHManager::BulletCastBVHManager | ( | std::string | name = "BulletCastBVHManager" , |
TesseractCollisionConfigurationInfo | config_info = TesseractCollisionConfigurationInfo() |
||
) |
|
override |
|
delete |
|
delete |
void tesseract_collision::tesseract_collision_bullet::BulletCastBVHManager::addCollisionObject | ( | const COW::Ptr & | cow | ) |
A a bullet collision object to the manager.
cow | The tesseract bullet collision object |
|
finaloverridevirtual |
Add a collision object to the checker.
All objects are added should initially be added as static objects. Use the setContactRequest method of defining which collision objects are moving.
name | The name of the object, must be unique. |
mask_id | User defined id which gets stored in the results structure. |
shapes | A vector of shapes that make up the collision object. |
shape_poses | A vector of poses for each shape, must be same length as shapes |
shape_types | A vector of shape types for encode the collision object. If the vector is of length 1 it is used for all shapes. |
collision_object_types | A int identifying a conversion mode for the object. (ex. convert meshes to convex_hulls) |
enabled | Indicate if the object is enabled for collision checking. |
Implements tesseract_collision::ContinuousContactManager.
|
finaloverridevirtual |
Clone the manager.
This is to be used for multi threaded application. A user should make a clone for each thread.
Implements tesseract_collision::ContinuousContactManager.
|
finaloverridevirtual |
Perform a contact test for all objects based.
collisions | The Contact results data |
type | The type of contact test |
Implements tesseract_collision::ContinuousContactManager.
|
finaloverridevirtual |
Disable an object.
name | The name of the object |
Implements tesseract_collision::ContinuousContactManager.
|
finaloverridevirtual |
Enable an object.
name | The name of the object |
Implements tesseract_collision::ContinuousContactManager.
|
finaloverridevirtual |
Get which collision objects can move.
Implements tesseract_collision::ContinuousContactManager.
|
finaloverridevirtual |
Get the contact distance threshold.
Implements tesseract_collision::ContinuousContactManager.
|
finaloverridevirtual |
Get a collision objects collision geometries.
name | The collision objects name |
Implements tesseract_collision::ContinuousContactManager.
|
finaloverridevirtual |
Get a collision objects collision geometries transforms.
name | The collision objects name |
Implements tesseract_collision::ContinuousContactManager.
|
finaloverridevirtual |
Get all collision objects.
Implements tesseract_collision::ContinuousContactManager.
|
finaloverridevirtual |
Get the active function for determining if two links are allowed to be in collision.
Implements tesseract_collision::ContinuousContactManager.
|
finaloverridevirtual |
Get the name of the contact manager.
Implements tesseract_collision::ContinuousContactManager.
|
finaloverridevirtual |
Find if a collision object already exists.
name | The name of the collision object |
Implements tesseract_collision::ContinuousContactManager.
|
finaloverridevirtual |
Check if collision object is enabled.
name | The name of the object |
Implements tesseract_collision::ContinuousContactManager.
|
private |
This function will update internal data when margin data has changed.
|
delete |
|
delete |
|
finaloverridevirtual |
Remove an object from the checker.
name | The name of the object |
Implements tesseract_collision::ContinuousContactManager.
|
finaloverridevirtual |
Set which collision objects can move.
names | A vector of collision object names |
Implements tesseract_collision::ContinuousContactManager.
|
finaloverridevirtual |
Set the contact distance thresholds for which collision should be considered on a per pair basis.
collision_margin_data | Contains the data that will replace the current settings |
override_type | This determines how the provided CollisionMarginData is applied |
Implements tesseract_collision::ContinuousContactManager.
|
finaloverridevirtual |
Set a single static collision object's tansforms.
name | The name of the object |
pose | The tranformation in world |
Implements tesseract_collision::ContinuousContactManager.
|
finaloverridevirtual |
Set a single cast(moving) collision object's tansforms.
This should only be used for moving objects. Use the base class methods for static objects.
name | The name of the object |
pose1 | The start tranformation in world |
pose2 | The end tranformation in world |
Implements tesseract_collision::ContinuousContactManager.
|
finaloverridevirtual |
Set a series of cast(moving) collision object's tranforms.
This should only be used for moving objects. Use the base class methods for static objects.
names | The name of the object |
pose1 | The start tranformations in world |
pose2 | The end tranformations in world |
Implements tesseract_collision::ContinuousContactManager.
|
finaloverridevirtual |
Set a series of static collision object's tranforms.
names | The name of the object |
poses | The tranformation in world |
Implements tesseract_collision::ContinuousContactManager.
|
finaloverridevirtual |
Set a series of cast(moving) collision object's tranforms.
This should only be used for moving objects. Use the base class methods for static objects.
pose1 | A start transform map <name, pose> |
pose2 | A end transform map <name, pose> |
Implements tesseract_collision::ContinuousContactManager.
|
finaloverridevirtual |
Set a series of static collision object's tranforms.
transforms | A transform map <name, pose> |
Implements tesseract_collision::ContinuousContactManager.
|
finaloverridevirtual |
Set the default collision margin.
default_collision_margin | New default collision margin |
Implements tesseract_collision::ContinuousContactManager.
|
finaloverridevirtual |
Set the active function for determining if two links are allowed to be in collision.
Implements tesseract_collision::ContinuousContactManager.
|
finaloverridevirtual |
Set the margin for a given contact pair.
The order of the object names does not matter, that is handled internal to the class.
obj1 | The first object name. Order doesn't matter |
obj2 | The Second object name. Order doesn't matter |
collision_margin | contacts with distance < collision_margin are considered in collision |
Implements tesseract_collision::ContinuousContactManager.
|
private |
A list of the active collision objects.
|
private |
The bullet broadphase interface.
|
private |
Filter collision objects before broadphase check.
|
private |
The bullet collision configuration.
|
private |
A list of the collision objects.
|
private |
The bullet collision configuration information.
|
private |
This is used when contactTest is called. It is also added as a user point to the collsion objects so it can be used to exit collision checking for compound shapes.
|
private |
The bullet collision dispatcher configuration information.
|
private |
The bullet collision dispatcher used for getting object to object collison algorithm.
|
private |
A map of cast collision objects being managed.
|
private |
A map of collision objects being managed.
|
private |