19 #ifndef HPP_TIME_CONSTRAINT_STEERING_HH 20 #define HPP_TIME_CONSTRAINT_STEERING_HH 22 #include <hpp/core/config-projector.hh> 23 #include <hpp/core/distance.hh> 24 #include <hpp/core/path-validation/discretized.hh> 25 #include <hpp/core/problem.hh> 26 #include <hpp/core/steering-method/straight.hh> 27 #include <hpp/core/straight-path.hh> 33 namespace interpolation {
40 template <
class Path_T>
42 typedef Path_T path_t;
43 typedef shared_ptr<TimeConstraintSteering> TimeConstraintSteeringPtr_t;
44 typedef 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,
59 const core::WeighedDistancePtr_t&
distance,
60 const std::size_t pathDofRank) HPP_CORE_DEPRECATED {
63 TimeConstraintSteeringPtr_t shPtr(ptr);
69 const TimeConstraintSteeringPtr_t& other) {
71 TimeConstraintSteeringPtr_t shPtr(ptr);
76 virtual core::SteeringMethodPtr_t
copy()
const {
82 core::ConfigurationIn_t q2)
const {
83 core::value_type length = problem()->distance()->operator()(q1, q2);
84 core::ConstraintSetPtr_t c;
85 if (constraints() && constraints()->configProjector()) {
86 c = HPP_STATIC_PTR_CAST(core::ConstraintSet, constraints()->
copy());
87 c->configProjector()->rightHandSideFromConfig(q1);
91 core::PathPtr_t path = path_t::create(problem()->robot(), q1, q2, length, c,
100 const std::size_t pathDofRank)
101 : core::steeringMethod::Straight(problem),
102 pathDofRank_(pathDofRank),
115 : core::steeringMethod::Straight(other),
116 pathDofRank_(other.pathDofRank_),
121 void init(TimeConstraintSteeringWkPtr_t weak) {
122 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 virtual core::SteeringMethodPtr_t copy() const
Copy instance and return shared pointer.
Definition: time-constraint-steering.hh:76
Definition: algorithm.hh:26
static TimeConstraintSteeringPtr_t create(const core::DevicePtr_t &device, const core::WeighedDistancePtr_t &distance, const std::size_t pathDofRank) HPP_CORE_DEPRECATED
Create instance and return shared pointer.
Definition: time-constraint-steering.hh:57
TimeConstraintSteering(const TimeConstraintSteering &other)
Copy constructor.
Definition: time-constraint-steering.hh:114
static TimeConstraintSteeringPtr_t create(const core::ProblemPtr_t &problem, const std::size_t pathDofRank)
Create instance and return shared pointer.
Definition: time-constraint-steering.hh:48
TimeConstraintSteering(const core::ProblemPtr_t &problem, const std::size_t pathDofRank)
Definition: time-constraint-steering.hh:99
void init(TimeConstraintSteeringWkPtr_t weak)
Store weak pointer to itself.
Definition: time-constraint-steering.hh:121
virtual core::PathPtr_t impl_compute(core::ConfigurationIn_t q1, core::ConfigurationIn_t q2) const
create a path between two configurations
Definition: time-constraint-steering.hh:81
T_TimeDependant tds_
Definition: time-constraint-steering.hh:132
std::vector< TimeDependant > T_TimeDependant
Definition: time-dependant.hh:73
static TimeConstraintSteeringPtr_t createCopy(const TimeConstraintSteeringPtr_t &other)
Copy instance and return shared pointer.
Definition: time-constraint-steering.hh:68
Definition: time-constraint-steering.hh:41