hpp-core  4.9.0
Implement basic classes for canonical path planning for kinematic chains.
steering-kinodynamic.hh
Go to the documentation of this file.
1 // Copyright (c) 2016, LAAS-CNRS
2 // Authors: Pierre Fernbach (pierre.fernbach@laas.fr)
3 //
4 // This file is part of hpp-core
5 // hpp-core is free software: you can redistribute it
6 // and/or modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation, either version
8 // 3 of the License, or (at your option) any later version.
9 //
10 // hpp-core is distributed in the hope that it will be
11 // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
12 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // General Lesser Public License for more details. You should have
14 // received a copy of the GNU Lesser General Public License along with
15 // hpp-core If not, see
16 // <http://www.gnu.org/licenses/>.
17 
18 #ifndef HPP_CORE_STEERING_METHOD_KINODYNAMIC_HH
19 # define HPP_CORE_STEERING_METHOD_KINODYNAMIC_HH
20 
21 # include <hpp/util/debug.hh>
22 # include <hpp/util/pointer.hh>
23 
24 # include <hpp/core/fwd.hh>
25 # include <hpp/core/config.hh>
27 
28 namespace hpp {
29  namespace core {
30  namespace steeringMethod {
31 
32  typedef Eigen::Matrix <value_type, 3, 1> Vector3;
33 
34 
37 
44  class HPP_CORE_DLLAPI Kinodynamic : public SteeringMethod
45  {
46  public:
47 
48 
50  static KinodynamicPtr_t create (const Problem& problem)
51  {
52  Kinodynamic* ptr = new Kinodynamic (problem);
53  KinodynamicPtr_t shPtr (ptr);
54  ptr->init (shPtr);
55  return shPtr;
56  }
57 
59  static KinodynamicPtr_t createCopy
60  (const KinodynamicPtr_t& other)
61  {
62  Kinodynamic* ptr = new Kinodynamic (*other);
63  KinodynamicPtr_t shPtr (ptr);
64  ptr->init (shPtr);
65  return shPtr;
66  }
67 
69  virtual SteeringMethodPtr_t copy () const
70  {
71  return createCopy (weak_.lock ());
72  }
73 
75  virtual PathPtr_t impl_compute (ConfigurationIn_t q1,
76  ConfigurationIn_t q2) const;
77 
87  double computeMinTime(int index,double p1,double p2, double v1, double v2,interval_t *infInterval) const;
88 
103  virtual void fixedTimeTrajectory(int index,double T, double p1, double p2, double v1, double v2, double *a1,double *t0, double* t1, double* tv, double* t2,double *vLim) const;
104 
105 
106  void setAmax(Vector3 aMax){aMax_ = aMax;}
107 
108  void setVmax(Vector3 vMax){vMax_ = vMax;}
109 
110 
111  protected:
112 
114  Kinodynamic (const Problem& problem);
115 
117  Kinodynamic (const Kinodynamic& other);
118 
120  void init (KinodynamicWkPtr_t weak)
121  {
123  weak_ = weak;
124  }
125 
126  Vector3 aMax_;
127  Vector3 vMax_;
128  double aMaxFixed_;
129  double aMaxFixed_Z_;
133  private:
134  DeviceWkPtr_t device_;
135  KinodynamicWkPtr_t weak_;
136  }; // Kinodynamic
138  } // namespace steeringMethod
139  } // namespace core
140 } // namespace hpp
141 #endif // HPP_CORE_STEERING_METHOD_KINODYNAMIC_HH
boost::shared_ptr< Path > PathPtr_t
Definition: fwd.hh:170
Vector3 vMax_
Definition: steering-kinodynamic.hh:127
boost::shared_ptr< Kinodynamic > KinodynamicPtr_t
Definition: fwd.hh:324
pinocchio::ConfigurationIn_t ConfigurationIn_t
Definition: fwd.hh:97
bool orientationIgnoreZValue_
Definition: steering-kinodynamic.hh:132
void setAmax(Vector3 aMax)
Definition: steering-kinodynamic.hh:106
Definition: problem.hh:48
Definition: steering-method.hh:38
std::pair< value_type, value_type > interval_t
Definition: fwd.hh:158
pinocchio::DeviceWkPtr_t DeviceWkPtr_t
Definition: fwd.hh:115
void setVmax(Vector3 vMax)
Definition: steering-kinodynamic.hh:108
Definition: steering-kinodynamic.hh:44
void init(SteeringMethodWkPtr_t weak)
Store weak pointer to itself.
Definition: steering-method.hh:114
Eigen::Matrix< value_type, 3, 1 > Vector3
Definition: steering-kinodynamic.hh:32
virtual SteeringMethodPtr_t copy() const
Copy instance and return shared pointer.
Definition: steering-kinodynamic.hh:69
bool orientedPath_
Definition: steering-kinodynamic.hh:131
double aMaxFixed_Z_
Definition: steering-kinodynamic.hh:129
void init(KinodynamicWkPtr_t weak)
Store weak pointer to itself.
Definition: steering-kinodynamic.hh:120
double aMaxFixed_
Definition: steering-kinodynamic.hh:128
bool synchronizeVerticalAxis_
Definition: steering-kinodynamic.hh:130
boost::shared_ptr< SteeringMethod > SteeringMethodPtr_t
Definition: fwd.hh:194
Vector3 aMax_
Definition: steering-kinodynamic.hh:126
static KinodynamicPtr_t create(const Problem &problem)
Create an instance.
Definition: steering-kinodynamic.hh:50