Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
tesseract_collision Namespace Reference

Namespaces

 tesseract_collision_bullet
 
 tesseract_collision_fcl
 
 test_suite
 

Classes

struct  CollisionCheckConfig
 This is a high level structure containing common information that collision checking utilities need. The goal of this config is to allow all collision checking utilities and planners to use the same data structure. More...
 
struct  ContactManagerConfig
 Contains parameters used to configure a contact manager before a series of contact checks. More...
 
class  ContactManagersPluginFactory
 
struct  ContactRequest
 The ContactRequest struct. More...
 
struct  ContactResult
 
class  ContactResultMap
 This structure hold contact results for link pairs. More...
 
class  ContactResultValidator
 Should return true if contact results are valid, otherwise false. More...
 
struct  ContactTestData
 This data is intended only to be used internal to the collision checkers as a container and should not be externally used by other libraries or packages. More...
 
struct  ContactTrajectoryResults
 The ContactTrajectoryResults struct is the top level struct for tracking contacts in a trajectory. This struct stores all the steps and therefore all the contacts in a trajectory. It also exposes a method for returning a contact summary table as a string for printing to a terminal. More...
 
struct  ContactTrajectoryStepResults
 The ContactTrajectoryStepResults struct is the second level struct for tracking contacts in a trajectory. This struct stores all the substep contact information as well as the start and end state of the given step in the trajectory. More...
 
struct  ContactTrajectorySubstepResults
 The ContactTrajectorySubstepResults struct is the lowest level struct for tracking contacts in a trajectory. This struct is used for substeps between waypoints in a trajectory when a longest valid segment is used, storing the relevant states of the substep. More...
 
class  ContinuousContactManager
 
class  ContinuousContactManagerFactory
 Define a continuous contact manager plugin which the factory can create an instance. More...
 
class  ConvexDecomposition
 
class  ConvexDecompositionHACD
 
class  ConvexDecompositionVHACD
 
class  DiscreteContactManager
 
class  DiscreteContactManagerFactory
 Define a discrete contact manager plugin which the factory can create an instance. More...
 
struct  HACDParameters
 
class  ProgressCallback
 
struct  VHACDParameters
 

Typedefs

using CollisionMarginData = tesseract_common::CollisionMarginData
 
using CollisionMarginPairData = tesseract_common::CollisionMarginPairData
 
using CollisionMarginPairOverrideType = tesseract_common::CollisionMarginPairOverrideType
 
using CollisionShapeConstPtr = std::shared_ptr< const tesseract_geometry::Geometry >
 
using CollisionShapePtr = std::shared_ptr< tesseract_geometry::Geometry >
 
using CollisionShapesConst = std::vector< CollisionShapeConstPtr >
 
using ContactResultAnyPoly = tesseract_common::AnyWrapper< ContactResult >
 
using ContactResultMapAnyPoly = tesseract_common::AnyWrapper< ContactResultMap >
 
using ContactResultMapVectorAnyPoly = tesseract_common::AnyWrapper< std::vector< tesseract_collision::ContactResultMap > >
 
using ContactResultVector = tesseract_common::AlignedVector< ContactResult >
 
using ObjectPairKey = std::pair< std::string, std::string >
 

Enumerations

enum  ACMOverrideType : std::uint8_t { ACMOverrideType::NONE, ACMOverrideType::ASSIGN, ACMOverrideType::AND, ACMOverrideType::OR }
 Identifies how the provided AllowedCollisionMatrix should be applied relative to the isAllowedFn in the contact manager. More...
 
enum  CollisionCheckProgramType : std::uint8_t {
  CollisionCheckProgramType::ALL, CollisionCheckProgramType::ALL_EXCEPT_START, CollisionCheckProgramType::ALL_EXCEPT_END, CollisionCheckProgramType::START_ONLY,
  CollisionCheckProgramType::END_ONLY, CollisionCheckProgramType::INTERMEDIATE_ONLY
}
 The mode used to check program. More...
 
enum  CollisionEvaluatorType : std::uint8_t {
  CollisionEvaluatorType::NONE, CollisionEvaluatorType::DISCRETE, CollisionEvaluatorType::LVS_DISCRETE, CollisionEvaluatorType::CONTINUOUS,
  CollisionEvaluatorType::LVS_CONTINUOUS
}
 High level descriptor used in planners and utilities to specify what kind of collision check is desired. More...
 
enum  ContactTestType : std::uint8_t { ContactTestType::FIRST = 0, ContactTestType::CLOSEST = 1, ContactTestType::ALL = 2, ContactTestType::LIMITED = 3 }
 
enum  ContinuousCollisionType : std::uint8_t { ContinuousCollisionType::CCType_None, ContinuousCollisionType::CCType_Time0, ContinuousCollisionType::CCType_Time1, ContinuousCollisionType::CCType_Between }
 

Functions

template<typename ManagerType >
void applyContactAllowedValidatorOverride (ManagerType &manager, const tesseract_common::AllowedCollisionMatrix &acm, ACMOverrideType type)
 Applies ACM to contact manager using override type. More...
 
template<typename ManagerType >
void applyModifyObjectEnabled (ManagerType &manager, const std::unordered_map< std::string, bool > &modify_object_enabled)
 Loops over the map and for every object string either enables or disables it based on the value (true=enable, false=disable) More...
 
tesseract_common::ContactAllowedValidator::ConstPtr combineContactAllowedValidators (tesseract_common::ContactAllowedValidator::ConstPtr original, tesseract_common::ContactAllowedValidator::ConstPtr override, ACMOverrideType type=ACMOverrideType::OR)
 Combines two ContactAllowedValidator using the override type. More...
 
int createConvexHull (tesseract_common::VectorVector3d &vertices, Eigen::VectorXi &faces, const tesseract_common::VectorVector3d &input, double shrink=-1, double shrinkClamp=-1)
 Create a convex hull from vertices using Bullet Convex Hull Computer. More...
 
std::vector< ObjectPairKeygetCollisionObjectPairs (const std::vector< std::string > &active_links, const std::vector< std::string > &static_links, const std::shared_ptr< const tesseract_common::ContactAllowedValidator > &validator=nullptr)
 Get a vector of possible collision object pairs. More...
 
bool isContactAllowed (const std::string &name1, const std::string &name2, const std::shared_ptr< const tesseract_common::ContactAllowedValidator > &validator, bool verbose=false)
 Determine if contact is allowed between two objects. More...
 
bool isLinkActive (const std::vector< std::string > &active, const std::string &name)
 This will check if a link is active provided a list. If the list is empty the link is considered active. More...
 
int loadSimplePlyFile (const std::string &path, tesseract_common::VectorVector3d &vertices, Eigen::VectorXi &faces, bool triangles_only=false)
 Loads a simple ply file given a path. More...
 
tesseract_geometry::ConvexMesh::Ptr makeConvexMesh (const tesseract_geometry::Mesh &mesh)
 
ContactResultprocessResult (ContactTestData &cdata, ContactResult &contact, const std::pair< std::string, std::string > &key, bool found)
 processResult Processes the ContactResult based on the information in the ContactTestData More...
 
void scaleVertices (tesseract_common::VectorVector3d &vertices, const Eigen::Vector3d &center, const Eigen::Vector3d &scale)
 Apply scaling to the geometry coordinates. More...
 
void scaleVertices (tesseract_common::VectorVector3d &vertices, const Eigen::Vector3d &scale)
 Apply scaling to the geometry coordinates. More...
 
bool writeSimplePlyFile (const std::string &path, const tesseract_common::VectorVector3d &vertices, const Eigen::VectorXi &faces, int num_faces)
 Write a simple ply file given vertices and faces. More...
 
bool writeSimplePlyFile (const std::string &path, const tesseract_common::VectorVector3d &vertices, const std::vector< Eigen::Vector3i > &vectices_color, const Eigen::VectorXi &faces, int num_faces)
 Write a simple ply file given vertices and faces. More...
 

Variables

static const std::vector< std::string > ContactTestTypeStrings
 

Typedef Documentation

◆ CollisionMarginData

Definition at line 52 of file types.h.

◆ CollisionMarginPairData

Definition at line 53 of file types.h.

◆ CollisionMarginPairOverrideType

Definition at line 54 of file types.h.

◆ CollisionShapeConstPtr

Definition at line 49 of file types.h.

◆ CollisionShapePtr

Definition at line 50 of file types.h.

◆ CollisionShapesConst

Definition at line 51 of file types.h.

◆ ContactResultAnyPoly

Definition at line 596 of file types.h.

◆ ContactResultMapAnyPoly

Definition at line 597 of file types.h.

◆ ContactResultMapVectorAnyPoly

Definition at line 598 of file types.h.

◆ ContactResultVector

Definition at line 136 of file types.h.

◆ ObjectPairKey

using tesseract_collision::ObjectPairKey = typedef std::pair<std::string, std::string>

Definition at line 40 of file common.h.

Enumeration Type Documentation

◆ ACMOverrideType

enum tesseract_collision::ACMOverrideType : std::uint8_t
strong

Identifies how the provided AllowedCollisionMatrix should be applied relative to the isAllowedFn in the contact manager.

Enumerator
NONE 

Do not apply AllowedCollisionMatrix.

ASSIGN 

Replace the current ContactAllowedValidator with one generated from the ACM provided.

AND 

New ContactAllowedValidator combines the contact manager fn and the ACM generated fn with and AND.

OR 

New ContactAllowedValidator combines the contact manager fn and the ACM generated fn with and OR.

Definition at line 399 of file types.h.

◆ CollisionCheckProgramType

The mode used to check program.

Enumerator
ALL 

Check all states.

ALL_EXCEPT_START 

Check all states except the start state.

ALL_EXCEPT_END 

Check all states except the end state.

START_ONLY 

Check only the start state.

END_ONLY 

Check only the end state.

INTERMEDIATE_ONLY 

Check only the intermediate states.

Definition at line 381 of file types.h.

◆ CollisionEvaluatorType

enum tesseract_collision::CollisionEvaluatorType : std::uint8_t
strong

High level descriptor used in planners and utilities to specify what kind of collision check is desired.

DISCRETE - Discrete contact manager using only steps specified LVS_DISCRETE - Discrete contact manager interpolating using longest valid segment CONTINUOUS - Continuous contact manager using only steps specified LVS_CONTINUOUS - Continuous contact manager interpolating using longest valid segment

Enumerator
NONE 

None.

DISCRETE 

Discrete contact manager using only steps specified.

LVS_DISCRETE 

Discrete contact manager interpolating using longest valid segment.

CONTINUOUS 

Continuous contact manager using only steps specified.

LVS_CONTINUOUS 

Continuous contact manager interpolating using longest valid segment.

Definition at line 366 of file types.h.

◆ ContactTestType

enum tesseract_collision::ContactTestType : std::uint8_t
strong
Enumerator
FIRST 

Return at first contact for any pair of objects

CLOSEST 

Return the global minimum for a pair of objects

ALL 

Return all contacts for a pair of objects

LIMITED 

Return limited set of contacts for a pair of objects

Definition at line 66 of file types.h.

◆ ContinuousCollisionType

Enumerator
CCType_None 
CCType_Time0 
CCType_Time1 
CCType_Between 

Definition at line 58 of file types.h.

Function Documentation

◆ applyContactAllowedValidatorOverride()

template<typename ManagerType >
void tesseract_collision::applyContactAllowedValidatorOverride ( ManagerType &  manager,
const tesseract_common::AllowedCollisionMatrix acm,
ACMOverrideType  type 
)
inline

Applies ACM to contact manager using override type.

Parameters
managerManager whose ContactAllowedValidator will be overwritten
acmACM used to create ContactAllowedValidator
typeDetermines how the two ContactAllowedValidator are combined

Definition at line 53 of file utils.h.

◆ applyModifyObjectEnabled()

template<typename ManagerType >
void tesseract_collision::applyModifyObjectEnabled ( ManagerType &  manager,
const std::unordered_map< std::string, bool > &  modify_object_enabled 
)
inline

Loops over the map and for every object string either enables or disables it based on the value (true=enable, false=disable)

Parameters
managerManager that will be modified
modify_object_enabledMap of [key]:value = [object name]:disable or enable

Definition at line 69 of file utils.h.

◆ combineContactAllowedValidators()

Combines two ContactAllowedValidator using the override type.

Parameters
originalOriginal ContactAllowedValidator. This will be returned if ACMOverrideType is None
overrideOverriding ContactAllowedValidator. This will be returned if ACMOverrideType is ASSIGN
typeOverride type used to combine the ContactAllowedValidator
Returns
One ContactAllowedValidator that combines the two

Definition at line 31 of file utils.cpp.

◆ createConvexHull()

int tesseract_collision::createConvexHull ( tesseract_common::VectorVector3d vertices,
Eigen::VectorXi &  faces,
const tesseract_common::VectorVector3d input,
double  shrink = -1,
double  shrinkClamp = -1 
)

Create a convex hull from vertices using Bullet Convex Hull Computer.

Parameters
(Output)vertices A vector of vertices
(Output)faces The first values indicates the number of vertices that define the face followed by the vertices index
(input)input A vector of point to create a convex hull from
(input)shrink If positive, the convex hull is shrunken by that amount (each face is moved by "shrink" length units towards the center along its normal).
(input)shrinkClamp If positive, "shrink" is clamped to not exceed "shrinkClamp * innerRadius", where "innerRadius" is the minimum distance of a face to the center of the convex hull.
Returns
The number of faces. If less than zero an error occurred when trying to create the convex hull

Definition at line 37 of file convex_hull_utils.cpp.

◆ getCollisionObjectPairs()

std::vector< ObjectPairKey > tesseract_collision::getCollisionObjectPairs ( const std::vector< std::string > &  active_links,
const std::vector< std::string > &  static_links,
const std::shared_ptr< const tesseract_common::ContactAllowedValidator > &  validator = nullptr 
)

Get a vector of possible collision object pairs.

Todo:
Should this also filter out links without geometry?
Parameters
active_linksThe active link names
static_linksThe static link names
validatorThe is contact allowed validator
Returns
A vector of collision object pairs

Definition at line 45 of file common.cpp.

◆ isContactAllowed()

bool tesseract_collision::isContactAllowed ( const std::string &  name1,
const std::string &  name2,
const std::shared_ptr< const tesseract_common::ContactAllowedValidator > &  validator,
bool  verbose = false 
)

Determine if contact is allowed between two objects.

Parameters
name1The name of the first object
name2The name of the second object
validatorThe contact allowed validator
verboseIf true print debug information
Returns
True if contact is allowed between the two object, otherwise false.

Definition at line 85 of file common.cpp.

◆ isLinkActive()

bool tesseract_collision::isLinkActive ( const std::vector< std::string > &  active,
const std::string &  name 
)

This will check if a link is active provided a list. If the list is empty the link is considered active.

Parameters
activeList of active link names
nameThe name of link to check if it is active.

Definition at line 80 of file common.cpp.

◆ loadSimplePlyFile()

int tesseract_collision::loadSimplePlyFile ( const std::string &  path,
tesseract_common::VectorVector3d vertices,
Eigen::VectorXi &  faces,
bool  triangles_only = false 
)

Loads a simple ply file given a path.

Parameters
pathThe file path
verticesA vector of vertices
facesThe first values indicates the number of vertices that define the face followed by the vertice index
triangles_onlyConvert to only include triangles
Returns
Number of faces, If returned 0 it failed to load.

Definition at line 289 of file common.cpp.

◆ makeConvexMesh()

tesseract_geometry::ConvexMesh::Ptr tesseract_collision::makeConvexMesh ( const tesseract_geometry::Mesh mesh)

Definition at line 113 of file convex_hull_utils.cpp.

◆ processResult()

ContactResult * tesseract_collision::processResult ( ContactTestData cdata,
ContactResult contact,
const std::pair< std::string, std::string > &  key,
bool  found 
)

processResult Processes the ContactResult based on the information in the ContactTestData

Parameters
cdataInformation used to process the results
contactContacts from the collision checkers that will be processed
keyLink pair used as a key to look up pair specific settings
foundSpecifies whether or not a collision has already been found
Returns
Pointer to the ContactResult.

Definition at line 112 of file common.cpp.

◆ scaleVertices() [1/2]

void tesseract_collision::scaleVertices ( tesseract_common::VectorVector3d vertices,
const Eigen::Vector3d center,
const Eigen::Vector3d scale 
)

Apply scaling to the geometry coordinates.

Given a scaling factor s, and center c, a given vertice v is transformed according to s (v - c) + c.

Parameters
verticesThe vertices to scale
centerThe point at which to scale the data about
scaleThe scale factor to apply to the vertices.

Definition at line 155 of file common.cpp.

◆ scaleVertices() [2/2]

void tesseract_collision::scaleVertices ( tesseract_common::VectorVector3d vertices,
const Eigen::Vector3d scale 
)

Apply scaling to the geometry coordinates.

Given a scaling factor s, and center c, a given vertice v is transformed according to s (v - c) + c.

Parameters
verticesThe vertices to scale
scaleThe scale factor to apply to the vertices.

Definition at line 163 of file common.cpp.

◆ writeSimplePlyFile() [1/2]

bool tesseract_collision::writeSimplePlyFile ( const std::string &  path,
const tesseract_common::VectorVector3d vertices,
const Eigen::VectorXi &  faces,
int  num_faces 
)

Write a simple ply file given vertices and faces.

Parameters
pathThe file path
verticesA vector of vertices
facesThe first values indicates the number of vertices that define the face followed by the vertice index
num_facesThe number of faces
Returns
False if failed to write file, otherwise true

Definition at line 280 of file common.cpp.

◆ writeSimplePlyFile() [2/2]

bool tesseract_collision::writeSimplePlyFile ( const std::string &  path,
const tesseract_common::VectorVector3d vertices,
const std::vector< Eigen::Vector3i > &  vectices_color,
const Eigen::VectorXi &  faces,
int  num_faces 
)

Write a simple ply file given vertices and faces.

Parameters
pathThe file path
verticesA vector of vertices
vertices_colorThe vertices color (0-255,0-255,0-255), if empty uses a default color
facesThe first values indicates the number of vertices that define the face followed by the vertice index
num_facesThe number of faces
Returns
False if failed to write file, otherwise true

Definition at line 174 of file common.cpp.

Variable Documentation

◆ ContactTestTypeStrings

const std::vector<std::string> tesseract_collision::ContactTestTypeStrings
static
Initial value:
= {
"FIRST",
"CLOSEST",
"ALL",
"LIMITED",
}

Definition at line 74 of file types.h.



tesseract_collision
Author(s): Levi Armstrong
autogenerated on Sun May 18 2025 03:01:53