19 #ifndef HPP_CORE_CONTINUOUS_VALIDATION_HH 20 # define HPP_CORE_CONTINUOUS_VALIDATION_HH 22 # include <hpp/pinocchio/pool.hh> 33 using continuousValidation::IntervalValidation;
103 virtual void doExecute()
const;
137 virtual bool validate (
const PathPtr_t& path,
bool reverse,
151 virtual void removeObstacleFromJoint
168 virtual void setSecurityMargins(
const matrix_t& securityMatrix);
190 template <
class Delegate>
void add(
const Delegate& delegate);
194 template <
class Delegate>
void reset();
198 void addIntervalValidation
218 static void setPath(IntervalValidations_t& intervalValidations,
237 virtual bool validateConfiguration
238 (IntervalValidations_t& intervalValidations,
256 bool validateIntervals
259 typename IntervalValidations_t::iterator& smallestInterval,
262 typename IntervalValidations_t::iterator itMin = validations.begin();
263 for (IntervalValidations_t::iterator itVal (validations.begin());
264 itVal != validations.end(); ++itVal)
270 if (!(*itVal)->validateConfiguration(t, tmpInt, report, data))
273 pathReport->configurationReport = report;
274 pathReport->parameter =
t;
279 if (interval.second > tmpInt.second)
282 smallestInterval = itVal;
284 interval.first = std::max(interval.first, tmpInt.first);
285 interval.second = std::min(interval.second, tmpInt.second);
286 assert((*itVal)->path()->length() == 0 || interval.second > interval.first);
287 assert(interval.first <= t);
288 assert(t <= interval.second);
298 void init (ContinuousValidationWkPtr_t weak);
310 ContinuousValidationWkPtr_t weak_;
312 virtual bool validateStraightPath
313 (IntervalValidations_t& intervalValidations,
317 std::vector<Initialize> initialize_;
318 std::vector<AddObstacle> addObstacle_;
322 void ContinuousValidation::add<ContinuousValidation::AddObstacle>
326 void ContinuousValidation::reset<ContinuousValidation::AddObstacle>();
329 void ContinuousValidation::add<ContinuousValidation::Initialize>
333 void ContinuousValidation::reset<ContinuousValidation::Initialize>();
336 (
const Delegate& delegate)
339 "No delegate of this type in class ContinuousValidation.");
344 "No delegate of this type in class ContinuousValidation.");
349 #endif // HPP_CORE_CONTINUOUS_VALIDATION_HH value_type tolerance() const
Get tolerance value.
Definition: continuous-validation.hh:201
boost::shared_ptr< Path > PathPtr_t
Definition: fwd.hh:170
IntervalValidations_t intervalValidations_
All BodyPairValidation to validate.
Definition: continuous-validation.hh:301
DevicePtr_t robot_
Definition: continuous-validation.hh:294
boost::shared_ptr< ValidationReport > ValidationReportPtr_t
Definition: fwd.hh:206
Definition: continuous-validation.hh:94
pinocchio::DevicePtr_t DevicePtr_t
Definition: fwd.hh:114
void add(const Delegate &delegate)
Definition: continuous-validation.hh:336
boost::shared_ptr< IntervalValidation > IntervalValidationPtr_t
Definition: fwd.hh:242
value_type tolerance_
Definition: continuous-validation.hh:295
pinocchio::Pool< IntervalValidations_t > bodyPairCollisionPool_
Definition: continuous-validation.hh:305
ContinuousValidation & owner() const
Definition: continuous-validation.hh:121
std::pair< value_type, value_type > interval_t
Definition: fwd.hh:158
pinocchio::DeviceWkPtr_t DeviceWkPtr_t
Definition: fwd.hh:115
bool initialize(MeshCollisionTraversalNode< BV, RelativeTransformationIsIdentity > &node, BVHModel< BV > &model1, Transform3f &tf1, BVHModel< BV > &model2, Transform3f &tf2, CollisionResult &result, bool use_refit=false, bool refit_bottomup=false)
Definition: continuous-validation.hh:86
std::vector< IntervalValidationPtr_t > IntervalValidations_t
Definition: fwd.hh:243
ContinuousValidation * owner_
Definition: continuous-validation.hh:107
pinocchio::JointPtr_t JointPtr_t
Definition: fwd.hh:133
DevicePtr_t robot() const
Definition: continuous-validation.hh:206
continuousValidation::IntervalValidations_t IntervalValidations_t
Definition: continuous-validation.hh:216
ContinuousValidation * owner_
Definition: continuous-validation.hh:124
Definition: continuous-validation.hh:112
ContinuousValidation & owner() const
Definition: continuous-validation.hh:104
assert(d.lhs()._blocks()==d.rhs()._blocks())
void reset()
Definition: continuous-validation.hh:341
pinocchio::matrix_t matrix_t
Definition: fwd.hh:145
Definition: path-validation.hh:35
pinocchio::value_type value_type
Definition: fwd.hh:157
virtual ~AddObstacle()
Definition: continuous-validation.hh:122
Definition: path-validation-report.hh:34
Definition: obstacle-user.hh:35
boost::shared_ptr< PathValidationReport > PathValidationReportPtr_t
Definition: fwd.hh:298
virtual ~Initialize()
Definition: continuous-validation.hh:105
IntervalValidations_t disabledBodyPairCollisions_
BodyPairCollision for which collision is disabled.
Definition: continuous-validation.hh:303
value_type stepSize_
Definition: continuous-validation.hh:307
pinocchio::Configuration_t Configuration_t
Definition: fwd.hh:96
Eigen::Matrix< RelativeMotionType, Eigen::Dynamic, Eigen::Dynamic > matrix_type
Definition: relative-motion.hh:51
pinocchio::CollisionObjectConstPtr_t CollisionObjectConstPtr_t
Definition: fwd.hh:90
DeviceWkPtr_t robot_
Definition: continuous-validation.hh:125