19 #ifndef HPP_CORE_PATH_HH 20 # define HPP_CORE_PATH_HH 22 # include <boost/concept_check.hpp> 23 # include <hpp/util/exception.hh> 25 # include <hpp/core/config.hh> 27 # include <hpp/core/deprecated.hh> 79 template <
class T> boost::shared_ptr<T>
as (
void)
86 template <
class T> boost::shared_ptr<const T>
as (
void)
const 108 return extract (std::make_pair(tmin, tmax));
125 return (*
this) (time, unused);
130 return configAtParam (paramAtTime(time), success);
137 bool success = impl_compute (result, s);
138 if (!success)
return false;
139 return applyConstraints (result, s);
144 return this->operator() (time, success);
150 return this->operator() (result, time);
156 return impl_compute (result, paramAtTime(time));
184 assert(result.size() == outputDerivativeSize());
186 impl_velocityBound (result,
187 paramAtTime (std::max(t0, timeRange().first )),
188 paramAtTime (std::min(t1, timeRange().second)));
190 result *= timeParam_->derivativeBound (t0, t1);
205 return outputDerivativeSize_;
217 return timeRange_.second - timeRange_.first;
261 virtual std::ostream& print (std::ostream &os)
const;
293 void init (
const PathWkPtr_t&
self);
303 constraints_ = constraint;
307 virtual void checkPath ()
const;
311 timeRange_ = timeRange;
313 paramRange_.first = timeParam_->value(timeRange_.first );
314 paramRange_.second = timeParam_->value(timeRange_.second);
316 paramRange_ = timeRange_;
326 return paramRange_.second - paramRange_.first;
332 success = impl_compute (result, param);
333 if (!success)
return result;
334 success = applyConstraints (result, param);
381 return timeParam_->value (time);
398 friend std::ostream&
operator<< (std::ostream& os,
const Path& path);
399 friend class ExtractedPath;
403 return path.
print (os);
409 #endif // HPP_CORE_PATH_HH boost::shared_ptr< Path > PathPtr_t
Definition: fwd.hh:170
virtual ~Path()
Destructor.
Definition: path.hh:67
size_type outputSize() const
Get size of configuration space.
Definition: path.hh:197
value_type paramLength() const
Definition: path.hh:324
CollisionGeometry * extract(const CollisionGeometry *model, const Transform3f &pose, const AABB &aabb)
size_type outputDerivativeSize() const
Get size of velocity.
Definition: path.hh:203
const interval_t & paramRange() const
Definition: path.hh:243
boost::shared_ptr< ConstraintSet > ConstraintSetPtr_t
Definition: fwd.hh:110
std::pair< value_type, value_type > interval_t
Definition: fwd.hh:158
void velocityBound(vectorOut_t result, const value_type &t0, const value_type &t1) const
Definition: path.hh:182
PathPtr_t extract(const value_type &tmin, const value_type &tmax) const
Definition: path.hh:106
pinocchio::ConfigurationOut_t ConfigurationOut_t
Definition: fwd.hh:98
pinocchio::size_type size_type
Definition: fwd.hh:156
void timeRange(const interval_t &timeRange)
Definition: path.hh:309
#define HPP_STATIC_PTR_CAST(t, x)
void timeParameterization(const TimeParameterizationPtr_t &tp, const interval_t &tr)
Set the time parameterization function.
Definition: path.hh:249
#define HPP_DYNAMIC_PTR_CAST(t, x)
virtual value_type length() const
Get length of definition interval.
Definition: path.hh:215
const ConstraintSetPtr_t & constraints() const
Get constraints the path is subject to.
Definition: path.hh:227
Configuration_t configAtParam(const value_type ¶m, bool &success) const
Definition: path.hh:329
boost::shared_ptr< const T > as(void) const
Static cast into a derived type.
Definition: path.hh:86
assert(d.lhs()._blocks()==d.rhs()._blocks())
interval_t paramRange_
Interval of parameters.
Definition: path.hh:296
const interval_t & timeRange() const
Get interval of definition.
Definition: path.hh:209
#define HPP_THROW_EXCEPTION(TYPE, MSG)
Configuration_t eval(const value_type &time, bool &success) const
Definition: path.hh:142
bool at(const value_type &time, ConfigurationOut_t result) const
Get the configuration at a parameter without applying the constraints.
Definition: path.hh:154
pinocchio::value_type value_type
Definition: fwd.hh:157
boost::shared_ptr< TimeParameterization > TimeParameterizationPtr_t
Definition: fwd.hh:172
virtual void impl_derivative(vectorOut_t derivative, const value_type ¶m, size_type order) const
Definition: path.hh:348
virtual std::ostream & print(std::ostream &os) const
void constraints(const ConstraintSetPtr_t &constraint)
Definition: path.hh:302
constraints::Implicit NumericalConstraint HPP_CORE_DEPRECATED
Definition: fwd.hh:347
const TimeParameterizationPtr_t & timeParameterization() const
Definition: path.hh:319
bool eval(ConfigurationOut_t result, const value_type &time) const
Definition: path.hh:147
pinocchio::vectorOut_t vectorOut_t
Definition: fwd.hh:203
virtual void impl_velocityBound(vectorOut_t bound, const value_type ¶m0, const value_type ¶m1) const
Definition: path.hh:361
std::ostream & operator<<(std::ostream &os, const Constraint &constraint)
Definition: constraint.hh:98
pinocchio::Configuration_t Configuration_t
Definition: fwd.hh:96
boost::shared_ptr< T > as(void)
Static cast into a derived type.
Definition: path.hh:79