hpp-core  4.11.0
Implement basic classes for canonical path planning for kinematic chains.
reeds-shepp.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) 2016 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_DISTANCE_REEDS_SHEPP_HH
20 # define HPP_CORE_DISTANCE_REEDS_SHEPP_HH
21 
22 # include <hpp/core/distance.hh>
24 
25 namespace hpp {
26  namespace core {
27  namespace distance {
30 
36  {
37  public:
38  virtual DistancePtr_t clone () const;
39  static ReedsSheppPtr_t create (const ProblemConstPtr_t& problem);
40  static ReedsSheppPtr_t create (const ProblemConstPtr_t& problem,
41  const value_type& turningRadius,
42  JointPtr_t xyJoint, JointPtr_t rzJoint,
43  std::vector <JointPtr_t> wheels);
44 
45  static ReedsSheppPtr_t createCopy (const ReedsSheppPtr_t& distance);
46 
47  void turningRadius(const value_type& rho);
48 
49  inline value_type turningRadius() const { return rho_; }
50 
51  protected:
52  ReedsShepp (const ProblemConstPtr_t& problem);
53  ReedsShepp (const ProblemConstPtr_t& problem,
54  const value_type& turningRadius,
55  JointPtr_t xyJoint, JointPtr_t rzJoint,
56  std::vector <JointPtr_t> wheels);
57  ReedsShepp (const ReedsShepp& distance);
58 
60  virtual value_type impl_distance (ConfigurationIn_t q1,
61  ConfigurationIn_t q2) const;
62  void init (const ReedsSheppWkPtr_t& weak);
63  private:
64  WeighedDistancePtr_t weighedDistance_;
65  DeviceWkPtr_t device_;
67  value_type rho_;
68  JointPtr_t xy_, rz_;
69  size_type xyId_, rzId_;
70  std::vector<JointPtr_t> wheels_;
71  ReedsSheppWkPtr_t weak_;
72 
73  ReedsShepp() {};
74  HPP_SERIALIZABLE();
75  }; // class ReedsShepp
77  } // namespace distance
78  } // namespace core
79 } // namespace hpp
80 #endif // HPP_CORE_DISTANCE_REEDS_SHEPP_HH
pinocchio::ConfigurationIn_t ConfigurationIn_t
Definition: fwd.hh:97
shared_ptr< WeighedDistance > WeighedDistancePtr_t
Definition: fwd.hh:208
Definition: bi-rrt-planner.hh:24
pinocchio::DeviceWkPtr_t DeviceWkPtr_t
Definition: fwd.hh:115
pinocchio::size_type size_type
Definition: fwd.hh:156
shared_ptr< const Problem > ProblemConstPtr_t
Definition: fwd.hh:180
pinocchio::JointPtr_t JointPtr_t
Definition: fwd.hh:133
shared_ptr< Distance > DistancePtr_t
Definition: fwd.hh:122
Definition: reeds-shepp.hh:35
value_type turningRadius() const
Definition: reeds-shepp.hh:49
pinocchio::value_type value_type
Definition: fwd.hh:157
shared_ptr< ReedsShepp > ReedsSheppPtr_t
Definition: fwd.hh:252
Abstract class for distance between configurations.
Definition: distance.hh:35
#define HPP_CORE_DLLAPI
Definition: config.hh:64