moveit2
The MoveIt Motion Planning Framework for ROS 2.
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
collision_detection_bullet::CollisionObjectWrapper Class Reference

Tesseract bullet collision object. More...

#include <bullet_utils.h>

Inheritance diagram for collision_detection_bullet::CollisionObjectWrapper:
Inheritance graph
[legend]
Collaboration diagram for collision_detection_bullet::CollisionObjectWrapper:
Collaboration graph
[legend]

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW CollisionObjectWrapper (const std::string &name, const collision_detection::BodyType &type_id, const std::vector< shapes::ShapeConstPtr > &shapes, const AlignedVector< Eigen::Isometry3d > &shape_poses, const std::vector< CollisionObjectType > &collision_object_types, bool active=true)
 Standard constructor. More...
 
 CollisionObjectWrapper (const std::string &name, const collision_detection::BodyType &type_id, const std::vector< shapes::ShapeConstPtr > &shapes, const AlignedVector< Eigen::Isometry3d > &shape_poses, const std::vector< CollisionObjectType > &collision_object_types, const std::set< std::string > &touch_links)
 Constructor for attached robot objects. More...
 
const std::string & getName () const
 Get the collision object name. More...
 
const collision_detection::BodyTypegetTypeID () const
 Get a user defined type. More...
 
bool sameObject (const CollisionObjectWrapper &other) const
 Check if two CollisionObjectWrapper objects point to the same source object. More...
 
void getAABB (btVector3 &aabb_min, btVector3 &aabb_max) const
 Get the collision objects axis aligned bounding box. More...
 
std::shared_ptr< CollisionObjectWrapperclone ()
 Clones the collision objects but not the collision shape which is const. More...
 
template<class T >
void manage (T *t)
 Manage memory of a raw pointer shape. More...
 
template<class T >
void manage (std::shared_ptr< T > t)
 Manage memory of a shared pointer shape. More...
 

Public Attributes

short int m_collisionFilterGroup
 Bitfield specifies to which group the object belongs. More...
 
short int m_collisionFilterMask
 Bitfield specifies against which other groups the object is collision checked. More...
 
bool m_enabled { true }
 Indicates if the collision object is used for a collision check. More...
 
std::set< std::string > m_touch_links
 The robot links the collision objects is allowed to touch. More...
 

Protected Member Functions

 CollisionObjectWrapper (const std::string &name, const collision_detection::BodyType &type_id, const std::vector< shapes::ShapeConstPtr > &shapes, const AlignedVector< Eigen::Isometry3d > &shape_poses, const std::vector< CollisionObjectType > &collision_object_types, const std::vector< std::shared_ptr< void >> &data)
 Special constructor used by the clone method. More...
 

Protected Attributes

std::string m_name
 The name of the object, must be unique. More...
 
collision_detection::BodyType m_type_id
 
std::vector< shapes::ShapeConstPtr > m_shapes
 The shapes that define the collision object. More...
 
AlignedVector< Eigen::Isometry3d > m_shape_poses
 The poses of the shapes, must be same length as m_shapes. More...
 
std::vector< CollisionObjectTypem_collision_object_types
 The shape collision object type to be used. More...
 
std::vector< std::shared_ptr< void > > m_data
 Manages the collision shape pointer so they get destroyed. More...
 

Detailed Description

Tesseract bullet collision object.

A wrapper around bullet's collision object which contains specific information related to bullet. One of the main differences is that a bullet collision object has a single world transformation and all shapes have transformation relative to this world transform. The default collision object category is active and active objects are checked against active objects and static objects whereas static objects are only checked against active ones.

Definition at line 109 of file bullet_utils.h.

Constructor & Destructor Documentation

◆ CollisionObjectWrapper() [1/3]

collision_detection_bullet::CollisionObjectWrapper::CollisionObjectWrapper ( const std::string &  name,
const collision_detection::BodyType type_id,
const std::vector< shapes::ShapeConstPtr > &  shapes,
const AlignedVector< Eigen::Isometry3d > &  shape_poses,
const std::vector< CollisionObjectType > &  collision_object_types,
bool  active = true 
)

Standard constructor.

Parameters
shape_posesAssumes all poses are in a single global frame

Definition at line 536 of file bullet_utils.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CollisionObjectWrapper() [2/3]

collision_detection_bullet::CollisionObjectWrapper::CollisionObjectWrapper ( const std::string &  name,
const collision_detection::BodyType type_id,
const std::vector< shapes::ShapeConstPtr > &  shapes,
const AlignedVector< Eigen::Isometry3d > &  shape_poses,
const std::vector< CollisionObjectType > &  collision_object_types,
const std::set< std::string > &  touch_links 
)

Constructor for attached robot objects.

Parameters
shape_posesThese poses are in the global (planning) frame

Definition at line 602 of file bullet_utils.cpp.

◆ CollisionObjectWrapper() [3/3]

collision_detection_bullet::CollisionObjectWrapper::CollisionObjectWrapper ( const std::string &  name,
const collision_detection::BodyType type_id,
const std::vector< shapes::ShapeConstPtr > &  shapes,
const AlignedVector< Eigen::Isometry3d > &  shape_poses,
const std::vector< CollisionObjectType > &  collision_object_types,
const std::vector< std::shared_ptr< void >> &  data 
)
protected

Special constructor used by the clone method.

Definition at line 612 of file bullet_utils.cpp.

Member Function Documentation

◆ clone()

std::shared_ptr<CollisionObjectWrapper> collision_detection_bullet::CollisionObjectWrapper::clone ( )
inline

Clones the collision objects but not the collision shape which is const.

Returns
Shared Pointer to the cloned collision object

Definition at line 181 of file bullet_utils.h.

Here is the call graph for this function:

◆ getAABB()

void collision_detection_bullet::CollisionObjectWrapper::getAABB ( btVector3 &  aabb_min,
btVector3 &  aabb_max 
) const
inline

Get the collision objects axis aligned bounding box.

Parameters
aabb_minThe minimum point
aabb_maxThe maximum point

Definition at line 169 of file bullet_utils.h.

Here is the call graph for this function:

◆ getName()

const std::string& collision_detection_bullet::CollisionObjectWrapper::getName ( ) const
inline

Get the collision object name.

Definition at line 144 of file bullet_utils.h.

Here is the caller graph for this function:

◆ getTypeID()

const collision_detection::BodyType& collision_detection_bullet::CollisionObjectWrapper::getTypeID ( ) const
inline

Get a user defined type.

Definition at line 150 of file bullet_utils.h.

Here is the caller graph for this function:

◆ manage() [1/2]

template<class T >
void collision_detection_bullet::CollisionObjectWrapper::manage ( std::shared_ptr< T >  t)
inline

Manage memory of a shared pointer shape.

Definition at line 205 of file bullet_utils.h.

◆ manage() [2/2]

template<class T >
void collision_detection_bullet::CollisionObjectWrapper::manage ( T *  t)
inline

Manage memory of a raw pointer shape.

Definition at line 198 of file bullet_utils.h.

Here is the caller graph for this function:

◆ sameObject()

bool collision_detection_bullet::CollisionObjectWrapper::sameObject ( const CollisionObjectWrapper other) const
inline

Check if two CollisionObjectWrapper objects point to the same source object.

Returns
True if same objects, false otherwise

Definition at line 157 of file bullet_utils.h.

Member Data Documentation

◆ m_collision_object_types

std::vector<CollisionObjectType> collision_detection_bullet::CollisionObjectWrapper::m_collision_object_types
protected

The shape collision object type to be used.

Definition at line 230 of file bullet_utils.h.

◆ m_collisionFilterGroup

short int collision_detection_bullet::CollisionObjectWrapper::m_collisionFilterGroup

Bitfield specifies to which group the object belongs.

Definition at line 132 of file bullet_utils.h.

◆ m_collisionFilterMask

short int collision_detection_bullet::CollisionObjectWrapper::m_collisionFilterMask

Bitfield specifies against which other groups the object is collision checked.

Definition at line 135 of file bullet_utils.h.

◆ m_data

std::vector<std::shared_ptr<void> > collision_detection_bullet::CollisionObjectWrapper::m_data
protected

Manages the collision shape pointer so they get destroyed.

Definition at line 233 of file bullet_utils.h.

◆ m_enabled

bool collision_detection_bullet::CollisionObjectWrapper::m_enabled { true }

Indicates if the collision object is used for a collision check.

Definition at line 138 of file bullet_utils.h.

◆ m_name

std::string collision_detection_bullet::CollisionObjectWrapper::m_name
protected

The name of the object, must be unique.

Definition at line 219 of file bullet_utils.h.

◆ m_shape_poses

AlignedVector<Eigen::Isometry3d> collision_detection_bullet::CollisionObjectWrapper::m_shape_poses
protected

The poses of the shapes, must be same length as m_shapes.

Definition at line 227 of file bullet_utils.h.

◆ m_shapes

std::vector<shapes::ShapeConstPtr> collision_detection_bullet::CollisionObjectWrapper::m_shapes
protected

The shapes that define the collision object.

Definition at line 224 of file bullet_utils.h.

◆ m_touch_links

std::set<std::string> collision_detection_bullet::CollisionObjectWrapper::m_touch_links

The robot links the collision objects is allowed to touch.

Definition at line 141 of file bullet_utils.h.

◆ m_type_id

collision_detection::BodyType collision_detection_bullet::CollisionObjectWrapper::m_type_id
protected

Definition at line 221 of file bullet_utils.h.


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