18 #ifndef HPP_CORE_OBSTACLE_USER_HH 19 # define HPP_CORE_OBSTACLE_USER_HH 21 # include <hpp/fcl/collision_data.h> 23 # include <hpp/core/config.hh> 47 virtual void removeObstacleFromJoint(
const JointPtr_t& joint,
63 virtual void setSecurityMargins(
const matrix_t& securityMatrix) = 0;
82 template<
typename Derived>
95 for (std::size_t i = 0; i < validations_.size(); ++i) {
96 boost::shared_ptr<ObstacleUserInterface> oui =
98 if (oui) oui->addObstacle (
object);
110 for (std::size_t i = 0; i < validations_.size(); ++i) {
111 boost::shared_ptr<ObstacleUserInterface> oui =
113 if (oui) oui->removeObstacleFromJoint (joint,
object);
124 for (std::size_t i = 0; i < validations_.size(); ++i) {
125 boost::shared_ptr<ObstacleUserInterface> oui =
127 if (oui) oui->filterCollisionPairs (relMotion);
138 for (std::size_t i = 0; i < validations_.size(); ++i) {
139 boost::shared_ptr<ObstacleUserInterface> oui =
141 if (oui) oui->setSecurityMargins (securityMatrix);
158 typedef std::pair<CollisionObjectConstPtr_t, CollisionObjectConstPtr_t>
CollisionPair_t;
162 static bool collide (
const CollisionPairs_t& pairs,
163 const CollisionRequests_t& reqs,
169 const CollisionPairs_t&
pairs ()
const 194 return defaultRequest_;
209 const JointPtr_t& joint,
const bool includeChildren);
214 virtual void removeObstacleFromJoint(
const JointPtr_t& joint,
232 virtual void setSecurityMargins(
const matrix_t& securityMatrix);
236 : robot_ (robot), defaultRequest_ (fcl::
NO_REQUEST,1)
241 : robot_ (other.robot_),
242 defaultRequest_ (other.defaultRequest_),
243 cPairs_ (other.cPairs_),
244 pPairs_ (other.pPairs_),
245 dPairs_ (other.dPairs_),
246 cRequests_ (other.cRequests_),
247 pRequests_ (other.pRequests_),
248 dRequests_ (other.dRequests_)
251 void addRobotCollisionPairs ();
256 CollisionPairs_t cPairs_,
259 CollisionRequests_t cRequests_,
265 #endif // HPP_CORE_OBSTACLE_USER_HH fcl::CollisionRequest & defaultRequest()
Definition: obstacle-user.hh:192
const CollisionPairs_t & pairs() const
Definition: obstacle-user.hh:169
pinocchio::DevicePtr_t DevicePtr_t
Definition: fwd.hh:114
Definition: obstacle-user.hh:83
values_t validations_
Definition: obstacle-user.hh:149
Derived value_t
Definition: obstacle-user.hh:146
ObstacleUser(DevicePtr_t robot)
Constructor of body pair collision.
Definition: obstacle-user.hh:235
std::vector< CollisionPair_t > CollisionPairs_t
Definition: obstacle-user.hh:159
void addObstacle(const CollisionObjectConstPtr_t &object)
Definition: obstacle-user.hh:93
CollisionRequests_t pRequests_
Active collision requests.
Definition: obstacle-user.hh:259
pinocchio::JointPtr_t JointPtr_t
Definition: fwd.hh:133
#define HPP_DYNAMIC_PTR_CAST(t, x)
CollisionPairs_t & pairs()
Definition: obstacle-user.hh:175
virtual ~ObstacleUser()
Definition: obstacle-user.hh:156
std::pair< CollisionObjectConstPtr_t, CollisionObjectConstPtr_t > CollisionPair_t
Definition: obstacle-user.hh:158
DevicePtr_t robot_
Definition: obstacle-user.hh:253
pinocchio::matrix_t matrix_t
Definition: fwd.hh:145
fcl::CollisionRequest defaultRequest_
Definition: obstacle-user.hh:254
virtual ~ObstacleUserInterface()
Definition: obstacle-user.hh:38
virtual ~ObstacleUserVector()
Definition: obstacle-user.hh:86
void filterCollisionPairs(const RelativeMotion::matrix_type &relMotion)
Definition: obstacle-user.hh:122
void setSecurityMargins(const matrix_t &securityMatrix)
Definition: obstacle-user.hh:136
void removeObstacleFromJoint(const JointPtr_t &joint, const CollisionObjectConstPtr_t &object)
Definition: obstacle-user.hh:107
CollisionRequests_t & requests()
Definition: obstacle-user.hh:187
std::vector< fcl::CollisionRequest > CollisionRequests_t
Definition: obstacle-user.hh:160
std::size_t collide(const CollisionObject *o1, const CollisionObject *o2, const CollisionRequest &request, CollisionResult &result)
Definition: obstacle-user.hh:35
const CollisionRequests_t & requests() const
Definition: obstacle-user.hh:181
std::vector< value_t > values_t
Definition: obstacle-user.hh:147
ObstacleUser(const ObstacleUser &other)
Copy constructor.
Definition: obstacle-user.hh:240
Eigen::Matrix< RelativeMotionType, Eigen::Dynamic, Eigen::Dynamic > matrix_type
Definition: relative-motion.hh:51
Stores a set of obstacles (movable or static).
Definition: obstacle-user.hh:153
CollisionPairs_t pPairs_
Active collision pairs.
Definition: obstacle-user.hh:256
pinocchio::CollisionObjectConstPtr_t CollisionObjectConstPtr_t
Definition: fwd.hh:90