33 #include <exotica_core/collision_scene_initializer.h> 39 return e->is_robot_link || e->closest_robot_link.lock();
45 CollisionSceneInitializer collision_scene_initializer = CollisionSceneInitializer(init);
60 std::shared_ptr<KinematicElement> e1 =
scene_.lock()->GetKinematicTree().FindKinematicElementByName(o1);
61 std::shared_ptr<KinematicElement> e2 =
scene_.lock()->GetKinematicTree().FindKinematicElementByName(o2);
66 if (!isRobot1 && !isRobot2)
return false;
68 if (isRobot1 && isRobot2 && !
self)
return false;
70 if (e1->parent.lock() == e2->parent.lock())
return false;
72 if (e1->closest_robot_link.lock() && e2->closest_robot_link.lock() && e1->closest_robot_link.lock() == e2->closest_robot_link.lock())
return false;
74 if (isRobot1 && isRobot2)
76 const std::string& name1 = e1->closest_robot_link.lock() ? e1->closest_robot_link.lock()->segment.getName() : e1->parent.lock()->segment.getName();
77 const std::string& name2 = e2->closest_robot_link.lock() ? e2->closest_robot_link.lock()->segment.getName() : e2->parent.lock()->segment.getName();
std::string GetObjectName()
void SetWorldLinkPadding(const double padding)
std::weak_ptr< Scene > scene_
Stores a pointer to the Scene which owns this CollisionScene.
void SetRobotLinkPadding(const double padding)
bool IsRobotLink(std::shared_ptr< KinematicElement > e)
void InstantiateObject(const Initializer &init)
void SetWorldLinkScale(const double scale)
void set_replace_cylinders_with_capsules(const bool value)
std::string robot_link_replacement_config_
Filename for config file (YAML) which contains shape replacements.
#define INFO_NAMED(name, x)
AllowedCollisionMatrix acm_
The allowed collision matrix.
virtual bool IsAllowedToCollide(const std::string &o1, const std::string &o2, const bool &self)
Returns whether two collision objects/shapes are allowed to collide by name.
bool getAllowedCollision(const std::string &name1, const std::string &name2) const
virtual void InstantiateBase(const Initializer &init)
Instantiates the base properties of the CollisionScene.
void SetRobotLinkScale(const double scale)
void SetReplacePrimitiveShapesWithMeshes(const bool value)