hpp-core  4.9.0
Implement basic classes for canonical path planning for kinematic chains.
kinodynamic-distance.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) 2014 CNRS
3 // Authors: Florent Lamiraux
4 //
5 // This file is part of hpp-core
6 // hpp-core is free software: you can redistribute it
7 // and/or modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation, either version
9 // 3 of the License, or (at your option) any later version.
10 //
11 // hpp-core is distributed in the hope that it will be
12 // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // General Lesser Public License for more details. You should have
15 // received a copy of the GNU Lesser General Public License along with
16 // hpp-core If not, see
17 // <http://www.gnu.org/licenses/>.
18 
19 #ifndef HPP_CORE_KINODYNAMIC_DISTANCE_HH
20 # define HPP_CORE_KINODYNAMIC_DISTANCE_HH
21 
22 # include <hpp/core/distance.hh>
23 
24 namespace hpp {
25 namespace core {
28 
36 
37 class HPP_CORE_DLLAPI KinodynamicDistance : public Distance {
38 public:
39  static KinodynamicDistancePtr_t create (const DevicePtr_t& robot);
40  static KinodynamicDistancePtr_t createFromProblem (const Problem& problem);
41 
42  static KinodynamicDistancePtr_t createCopy
44  virtual DistancePtr_t clone () const;
45 
46 
48  const DevicePtr_t& robot () const
49  {
50  return robot_;
51  }
52 protected:
53  KinodynamicDistance (const DevicePtr_t& robot);
54  KinodynamicDistance (const Problem& problem);
55  KinodynamicDistance (const KinodynamicDistance& distance);
56  void init (KinodynamicDistanceWkPtr_t self);
58  virtual value_type impl_distance (ConfigurationIn_t q1,
59  ConfigurationIn_t q2) const;
60 
61  double computeMinTime(double p1, double p2, double v1, double v2)const ;
62 
63 
64 private:
65  DevicePtr_t robot_;
66  double aMax_;
67  double vMax_;
68  KinodynamicDistanceWkPtr_t weak_;
69 }; // class KinodynamicDistance
71 } // namespace core
72 } // namespace hpp
73 #endif // HPP_CORE_WEIGHED_DISTANCE_HH
boost::shared_ptr< KinodynamicDistance > KinodynamicDistancePtr_t
Definition: fwd.hh:208
pinocchio::DevicePtr_t DevicePtr_t
Definition: fwd.hh:114
pinocchio::ConfigurationIn_t ConfigurationIn_t
Definition: fwd.hh:97
Definition: problem.hh:48
ObjectFactory * create(ObjectFactory *parent=NULL, const XMLElement *element=NULL)
Definition: kinodynamic-distance.hh:37
const DevicePtr_t & robot() const
Get robot.
Definition: kinodynamic-distance.hh:48
pinocchio::value_type value_type
Definition: fwd.hh:157
boost::shared_ptr< Distance > DistancePtr_t
Definition: fwd.hh:122
Abstract class for distance between configurations.
Definition: distance.hh:33
FCL_REAL distance(const KDOP< N > &other, Vec3f *P=NULL, Vec3f *Q=NULL) const