19 #ifndef HPP_TIME_CONSTRAINT_STEERING_HH
20 # define HPP_TIME_CONSTRAINT_STEERING_HH
22 # include <hpp/core/path-validation/discretized.hh>
23 # include <hpp/core/steering-method/straight.hh>
24 # include <hpp/core/straight-path.hh>
25 # include <hpp/core/problem.hh>
26 # include <hpp/core/distance.hh>
27 # include <hpp/core/config-projector.hh>
33 namespace interpolation {
40 template<
class Path_T>
43 typedef Path_T path_t;
44 typedef boost::shared_ptr <TimeConstraintSteering> TimeConstraintSteeringPtr_t;
45 typedef boost::weak_ptr <TimeConstraintSteering> TimeConstraintSteeringWkPtr_t;
48 static TimeConstraintSteeringPtr_t
create (
const core::ProblemPtr_t& problem,
49 const std::size_t pathDofRank)
52 TimeConstraintSteeringPtr_t shPtr (ptr);
57 static TimeConstraintSteeringPtr_t
create
58 (
const core::DevicePtr_t& device,
const core::WeighedDistancePtr_t&
distance,
59 const std::size_t pathDofRank)
64 TimeConstraintSteeringPtr_t shPtr (ptr);
70 (
const TimeConstraintSteeringPtr_t& other)
73 TimeConstraintSteeringPtr_t shPtr (ptr);
78 virtual core::SteeringMethodPtr_t
copy ()
const
85 core::ConfigurationIn_t q2)
const
87 core::value_type length = problem_.distance()->operator () (q1, q2);
88 core::ConstraintSetPtr_t c;
89 if (constraints() && constraints()->configProjector ()) {
90 c = HPP_STATIC_PTR_CAST (core::ConstraintSet, constraints()->
copy ());
91 c->configProjector()->rightHandSideFromConfig (q1);
95 core::PathPtr_t path = path_t::create
96 (problem_.robot(), q1, q2, length, c, pathDofRank_,
tds_);
103 const std::size_t pathDofRank) :
104 core::steeringMethod::Straight(*problem), pathDofRank_(pathDofRank), weak_ () {}
116 core::steeringMethod::Straight (other), pathDofRank_(other.pathDofRank_), weak_ (),
tds_(other.
tds_) {}
119 void init (TimeConstraintSteeringWkPtr_t weak)
121 core::steeringMethod::Straight::init (weak);
127 const core::PathPtr_t model_;
128 const std::size_t pathDofRank_;
129 TimeConstraintSteeringWkPtr_t weak_;
139 #endif // HPP_TIME_CONSTRAINT_STEERING_HH