19 #ifndef HPP_RBPRM_PARABOLA_PATH_HH
20 #define HPP_RBPRM_PARABOLA_PATH_HH
22 #include <hpp/core/config.hh>
23 #include <hpp/core/fwd.hh>
24 #include <hpp/core/path.hh>
28 using core::size_type;
55 core::ConfigurationIn_t
init,
56 core::ConfigurationIn_t
end,
73 core::ConfigurationIn_t
init,
74 core::ConfigurationIn_t
end,
77 core::vector_t V0, core::vector_t Vimp,
78 std::vector<std::string> initialROMnames,
79 std::vector<std::string> endROMnames) {
82 initialROMnames, endROMnames);
103 const core::ConstraintSetPtr_t& ) {
122 const core::ConstraintSetPtr_t& constraints)
const {
130 virtual core::PathPtr_t
extract(
const core::interval_t& subInterval)
const;
141 assert(
initial.size() == initial_.size());
150 assert(
end.size() == end_.size());
158 core::Configuration_t
initial()
const {
return initial_; }
161 core::Configuration_t
end()
const {
return end_; }
164 virtual core::value_type
length()
const {
return length_; }
168 for (size_type i = 0; i < coefs.size(); i++) coefficients_(i) = coefs(i);
175 const core::ConfigurationIn_t q1,
const core::ConfigurationIn_t q2)
const;
192 virtual std::ostream&
print(std::ostream& os)
const {
193 os <<
"ParabolaPath:" << std::endl;
194 os <<
"interval: [ " << timeRange().first <<
", " << timeRange().second
195 <<
" ]" << std::endl;
196 os <<
"initial configuration: " << initial_.transpose() << std::endl;
197 os <<
"final configuration: " << end_.transpose() << std::endl;
202 core::ConfigurationIn_t
end, core::value_type
length,
207 core::ConfigurationIn_t
end, core::value_type
length,
208 core::vector_t coefs, core::vector_t
V0_, core::vector_t Vimp,
209 std::vector<std::string> initialROMnames,
210 std::vector<std::string> endROMnames);
218 parent_t::init(
self);
234 core::value_type param)
const;
237 core::DevicePtr_t device_;
238 core::Configuration_t initial_;
239 core::Configuration_t end_;
240 ParabolaPathWkPtr_t weak_;
241 mutable core::vector_t coefficients_;
242 mutable core::value_type length_;
Definition: parabola-path.hh:44
void coefficients(core::vector_t coefs) const
Set the three parabola coefficients.
Definition: parabola-path.hh:167
static ParabolaPathPtr_t createCopy(const ParabolaPathPtr_t &path)
Definition: parabola-path.hh:90
std::vector< std::string > initialROMnames_
Definition: parabola-path.hh:187
core::vector_t evaluateVelocity(const core::value_type t) const
Evaluate velocity vector at path abcissa t.
static ParabolaPathPtr_t create(const core::DevicePtr_t &device, core::ConfigurationIn_t init, core::ConfigurationIn_t end, core::value_type length, core::vector_t coefficients, core::vector_t V0, core::vector_t Vimp, std::vector< std::string > initialROMnames, std::vector< std::string > endROMnames)
Definition: parabola-path.hh:72
core::DevicePtr_t device() const
Return the internal robot.
core::value_type alphaMin_
Definition: parabola-path.hh:181
std::vector< std::string > endROMnames_
Definition: parabola-path.hh:188
static ParabolaPathPtr_t create(const core::DevicePtr_t &device, core::ConfigurationIn_t init, core::ConfigurationIn_t end, core::value_type length, core::vector_t coefficients)
Definition: parabola-path.hh:54
core::value_type Z_
Definition: parabola-path.hh:184
core::value_type alphaMax_
Definition: parabola-path.hh:182
ParabolaPath(const core::DevicePtr_t &robot, core::ConfigurationIn_t init, core::ConfigurationIn_t end, core::value_type length, core::vector_t coefficients)
Constructor.
virtual bool impl_compute(core::ConfigurationOut_t result, core::value_type param) const
core::vector_t coefficients() const
Get path coefficients.
Definition: parabola-path.hh:172
ParabolaPath(const core::DevicePtr_t &device, core::ConfigurationIn_t init, core::ConfigurationIn_t end, core::value_type length, core::vector_t coefs, core::vector_t V0_, core::vector_t Vimp, std::vector< std::string > initialROMnames, std::vector< std::string > endROMnames)
Constructor with velocities and ROMnames.
void initialConfig(core::ConfigurationIn_t initial)
Definition: parabola-path.hh:140
core::vector_t V0_
Definition: parabola-path.hh:185
virtual std::ostream & print(std::ostream &os) const
Print path in a stream.
Definition: parabola-path.hh:192
virtual core::PathPtr_t copy() const
Definition: parabola-path.hh:115
virtual core::value_type length() const
Get previously computed length.
Definition: parabola-path.hh:164
virtual core::PathPtr_t copy(const core::ConstraintSetPtr_t &constraints) const
Definition: parabola-path.hh:121
void init(ParabolaPathPtr_t self)
Definition: parabola-path.hh:217
ParabolaPath(const ParabolaPath &path)
Copy constructor.
core::value_type Xtheta_
Definition: parabola-path.hh:183
core::value_type alpha_
Definition: parabola-path.hh:180
virtual core::PathPtr_t reverse() const
core::vector_t Vimp_
Definition: parabola-path.hh:186
virtual ~ParabolaPath()
Destructor.
Definition: parabola-path.hh:48
core::value_type lengthFunction(const core::value_type x) const
static ParabolaPathPtr_t createCopy(const ParabolaPathPtr_t &path, const core::ConstraintSetPtr_t &)
Definition: parabola-path.hh:101
virtual core::PathPtr_t extract(const core::interval_t &subInterval) const
Path parent_t
Definition: parabola-path.hh:46
core::Configuration_t initial() const
Get the initial configuration.
Definition: parabola-path.hh:158
core::Configuration_t end() const
Get the final configuration.
Definition: parabola-path.hh:161
void endConfig(core::ConfigurationIn_t end)
Definition: parabola-path.hh:149
virtual core::value_type computeLength(const core::ConfigurationIn_t q1, const core::ConfigurationIn_t q2) const
HPP_PREDEF_CLASS(RbPrmFullBody)
shared_ptr< ParabolaPath > ParabolaPathPtr_t
Definition: parabola-path.hh:33
Definition: algorithm.hh:26