utils.h
Go to the documentation of this file.
1 
25 #ifndef TESSERACT_COLLISION_CORE_UTILS_H
26 #define TESSERACT_COLLISION_CORE_UTILS_H
27 
31 
32 namespace tesseract_collision
33 {
45 
52 template <typename ManagerType>
53 inline void applyContactAllowedValidatorOverride(ManagerType& manager,
55  ACMOverrideType type)
56 {
57  tesseract_common::ContactAllowedValidator::ConstPtr original = manager.getContactAllowedValidator();
58  auto override = std::make_shared<tesseract_common::ACMContactAllowedValidator>(acm);
59  manager.setContactAllowedValidator(combineContactAllowedValidators(original, override, type));
60 }
61 
68 template <typename ManagerType>
69 inline void applyModifyObjectEnabled(ManagerType& manager,
70  const std::unordered_map<std::string, bool>& modify_object_enabled)
71 {
72  for (const auto& entry : modify_object_enabled)
73  {
74  if (entry.second)
75  manager.enableCollisionObject(entry.first);
76  else
77  manager.disableCollisionObject(entry.first);
78  }
79 }
80 } // namespace tesseract_collision
81 
82 #endif // TESSERACT_COLLISION_TYPES_H
contact_allowed_validator.h
types.h
Tesseracts Collision Forward Declarations.
tesseract_collision::ACMOverrideType::OR
@ OR
New ContactAllowedValidator combines the contact manager fn and the ACM generated fn with and OR.
tesseract_collision::ACMOverrideType
ACMOverrideType
Identifies how the provided AllowedCollisionMatrix should be applied relative to the isAllowedFn in t...
Definition: types.h:399
contact_result_validator.h
Contact result validator.
tesseract_common::ContactAllowedValidator::ConstPtr
std::shared_ptr< const ContactAllowedValidator > ConstPtr
type
type
tesseract_common::AllowedCollisionMatrix
tesseract_collision::applyContactAllowedValidatorOverride
void applyContactAllowedValidatorOverride(ManagerType &manager, const tesseract_common::AllowedCollisionMatrix &acm, ACMOverrideType type)
Applies ACM to contact manager using override type.
Definition: utils.h:53
tesseract_collision::applyModifyObjectEnabled
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...
Definition: utils.h:69
tesseract_collision
Definition: bullet_cast_bvh_manager.h:48
tesseract_collision::combineContactAllowedValidators
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.
Definition: utils.cpp:31


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