29 #ifndef HPP_MANIPULATION_GRAPHPATHVALIDATOR_HH
30 #define HPP_MANIPULATION_GRAPHPATHVALIDATOR_HH
32 #include <hpp/core/obstacle-user.hh>
33 #include <hpp/core/path-validation.hh>
39 namespace manipulation {
40 using hpp::core::Path;
41 using hpp::core::PathPtr_t;
42 using hpp::core::PathValidation;
44 using hpp::core::PathVector;
45 using hpp::core::PathVectorPtr_t;
57 :
public PathValidation,
58 public core::ObstacleUserInterface {
71 virtual bool validate(
const PathPtr_t& path,
bool reverse,
77 pathValidation_ = pathValidation;
85 constraintGraph_ = graph;
107 void addObstacle(
const hpp::core::CollisionObjectConstPtr_t&
object) {
108 shared_ptr<core::ObstacleUserInterface> oui =
109 HPP_DYNAMIC_PTR_CAST(core::ObstacleUserInterface, pathValidation_);
110 if (oui) oui->addObstacle(
object);
121 const pinocchio::CollisionObjectConstPtr_t& obstacle) {
122 shared_ptr<core::ObstacleUserInterface> oui =
123 HPP_DYNAMIC_PTR_CAST(core::ObstacleUserInterface, pathValidation_);
124 if (oui) oui->removeObstacleFromJoint(joint, obstacle);
134 const core::RelativeMotion::matrix_type& relMotion) {
135 shared_ptr<core::ObstacleUserInterface> oui =
136 HPP_DYNAMIC_PTR_CAST(core::ObstacleUserInterface, pathValidation_);
137 if (oui) oui->filterCollisionPairs(relMotion);
147 shared_ptr<core::ObstacleUserInterface> oui =
148 HPP_DYNAMIC_PTR_CAST(core::ObstacleUserInterface, pathValidation_);
149 if (oui) oui->setSecurityMargins(securityMargins);
159 const std::string& body_b,
161 shared_ptr<core::ObstacleUserInterface> oui =
162 HPP_DYNAMIC_PTR_CAST(core::ObstacleUserInterface, pathValidation_);
163 if (oui) oui->setSecurityMarginBetweenBodies(body_a, body_b, margin);
172 bool impl_validate(
const PathVectorPtr_t& path,
bool reverse,
175 bool impl_validate(
const PathPtr_t& path,
bool reverse, PathPtr_t& validPart,
183 template <
typename T>
192 #endif // HPP_MANIPULATION_GRAPHPATHVALIDATOR_HH