hpp-core
4.11.0
Implement basic classes for canonical path planning for kinematic chains.
|
Go to the documentation of this file.
19 #ifndef HPP_CORE_PATH_HH
20 # define HPP_CORE_PATH_HH
22 # include <hpp/util/exception.hh>
23 # include <hpp/util/serialization-fwd.hh>
79 template <
class T> shared_ptr<T>
as (
void)
81 assert (HPP_DYNAMIC_PTR_CAST (T, weak_.lock ()));
82 return HPP_STATIC_PTR_CAST (T, weak_.lock ());
86 template <
class T> shared_ptr<const T>
as (
void)
const
88 assert (HPP_DYNAMIC_PTR_CAST (
const T, weak_.lock ()));
89 return HPP_STATIC_PTR_CAST (
const T, weak_.lock ());
108 return extract (std::make_pair(tmin, tmax));
125 return eval (time, success);
133 return eval(result, time);
139 return configAtParam (paramAtTime(time), success);
147 bool success = impl_compute (result, s);
148 if (!success)
return false;
149 return applyConstraints (result, s);
155 return impl_compute (result, paramAtTime(time));
183 assert(result.size() == outputDerivativeSize());
185 impl_velocityBound (result,
186 paramAtTime (std::max(t0, timeRange().first )),
187 paramAtTime (std::min(t1, timeRange().second)));
189 result *= timeParam_->derivativeBound (t0, t1);
204 return outputDerivativeSize_;
216 return timeRange_.second - timeRange_.first;
260 virtual std::ostream& print (std::ostream &os)
const;
292 void init (
const PathWkPtr_t&
self);
302 constraints_ = constraint;
306 virtual void checkPath ()
const;
310 timeRange_ = timeRange;
312 paramRange_.first = timeParam_->value(timeRange_.first );
313 paramRange_.second = timeParam_->value(timeRange_.second);
315 paramRange_ = timeRange_;
325 return paramRange_.second - paramRange_.first;
331 success = impl_compute (result, param);
332 if (!success)
return result;
333 success = applyConstraints (result, param);
354 HPP_THROW_EXCEPTION (hpp::Exception,
"not implemented");
367 HPP_THROW_EXCEPTION (hpp::Exception,
"not implemented");
380 return timeParam_->value (time);
397 friend std::ostream&
operator<< (std::ostream& os,
const Path& path);
398 friend class ExtractedPath;
407 return path.
print (os);
413 #endif // HPP_CORE_PATH_HH
pinocchio::size_type size_type
Definition: fwd.hh:156
pinocchio::Configuration_t Configuration_t
Definition: fwd.hh:96
virtual void impl_derivative(vectorOut_t derivative, const value_type ¶m, size_type order) const
Definition: path.hh:347
interval_t paramRange_
Interval of parameters.
Definition: path.hh:295
PathPtr_t extract(const value_type &tmin, const value_type &tmax) const
Definition: path.hh:106
std::pair< value_type, value_type > interval_t
Definition: fwd.hh:158
value_type paramLength() const
Definition: path.hh:323
bool at(const value_type &time, ConfigurationOut_t result) const
Get the configuration at a parameter without applying the constraints.
Definition: path.hh:153
const interval_t & timeRange() const
Get interval of definition.
Definition: path.hh:208
size_type outputSize() const
Get size of configuration space.
Definition: path.hh:196
void timeParameterization(const TimeParameterizationPtr_t &tp, const interval_t &tr)
Set the time parameterization function.
Definition: path.hh:248
pinocchio::vectorOut_t vectorOut_t
Definition: fwd.hh:204
#define HPP_CORE_DEPRECATED
Definition: deprecated.hh:32
shared_ptr< Path > PathPtr_t
Definition: fwd.hh:170
pinocchio::ConfigurationOut_t ConfigurationOut_t
Definition: fwd.hh:98
virtual std::ostream & print(std::ostream &os) const
shared_ptr< T > as(void)
Static cast into a derived type.
Definition: path.hh:79
Configuration_t configAtParam(const value_type ¶m, bool &success) const
Definition: path.hh:328
std::ostream & operator<<(std::ostream &os, const Constraint &constraint)
Definition: constraint.hh:101
size_type outputDerivativeSize() const
Get size of velocity.
Definition: path.hh:202
virtual ~Path()
Destructor.
Definition: path.hh:67
virtual value_type length() const
Get length of definition interval.
Definition: path.hh:214
const interval_t & paramRange() const
Definition: path.hh:242
Definition: bi-rrt-planner.hh:24
void constraints(const ConstraintSetPtr_t &constraint)
Definition: path.hh:301
void velocityBound(vectorOut_t result, const value_type &t0, const value_type &t1) const
Definition: path.hh:181
void timeRange(const interval_t &timeRange)
Definition: path.hh:308
shared_ptr< ConstraintSet > ConstraintSetPtr_t
Definition: fwd.hh:110
shared_ptr< TimeParameterization > TimeParameterizationPtr_t
Definition: fwd.hh:172
Configuration_t eval(const value_type &time, bool &success) const
Configuration at time.
Definition: path.hh:137
bool eval(ConfigurationOut_t result, const value_type &time) const
Configuration at time.
Definition: path.hh:143
shared_ptr< const T > as(void) const
Static cast into a derived type.
Definition: path.hh:86
const ConstraintSetPtr_t & constraints() const
Get constraints the path is subject to.
Definition: path.hh:226
const TimeParameterizationPtr_t & timeParameterization() const
Definition: path.hh:318
virtual void impl_velocityBound(vectorOut_t bound, const value_type ¶m0, const value_type ¶m1) const
Definition: path.hh:360
Path()
Definition: path.hh:401
pinocchio::value_type value_type
Definition: fwd.hh:157
#define HPP_CORE_DLLAPI
Definition: config.hh:64