hpp-core  6.0.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 
6 // Redistribution and use in source and binary forms, with or without
7 // modification, are permitted provided that the following conditions are
8 // met:
9 //
10 // 1. Redistributions of source code must retain the above copyright
11 // notice, this list of conditions and the following disclaimer.
12 //
13 // 2. Redistributions in binary form must reproduce the above copyright
14 // notice, this list of conditions and the following disclaimer in the
15 // documentation and/or other materials provided with the distribution.
16 //
17 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
28 // DAMAGE.
29 
30 #ifndef HPP_CORE_DISTANCE_REEDS_SHEPP_HH
31 #define HPP_CORE_DISTANCE_REEDS_SHEPP_HH
32 
33 #include <hpp/core/distance.hh>
35 
36 namespace hpp {
37 namespace core {
38 namespace distance {
41 
47  public:
48  virtual DistancePtr_t clone() const;
49  static ReedsSheppPtr_t create(const ProblemConstPtr_t& problem);
50  static ReedsSheppPtr_t create(const ProblemConstPtr_t& problem,
51  const value_type& turningRadius,
52  JointPtr_t xyJoint, JointPtr_t rzJoint,
53  std::vector<JointPtr_t> wheels);
54 
55  static ReedsSheppPtr_t createCopy(const ReedsSheppPtr_t& distance);
56 
57  void turningRadius(const value_type& rho);
58 
59  inline value_type turningRadius() const { return rho_; }
60 
61  protected:
62  ReedsShepp(const ProblemConstPtr_t& problem);
63  ReedsShepp(const ProblemConstPtr_t& problem, const value_type& turningRadius,
64  JointPtr_t xyJoint, JointPtr_t rzJoint,
65  std::vector<JointPtr_t> wheels);
66  ReedsShepp(const ReedsShepp& distance);
67 
70  ConfigurationIn_t q2) const;
71  void init(const ReedsSheppWkPtr_t& weak);
72 
73  private:
74  WeighedDistancePtr_t weighedDistance_;
75  DeviceWkPtr_t device_;
77  value_type rho_;
78  JointPtr_t xy_, rz_;
79  size_type xyId_, rzId_;
80  std::vector<JointPtr_t> wheels_;
81  ReedsSheppWkPtr_t weak_;
82 
83  ReedsShepp() {};
84  HPP_SERIALIZABLE();
85 }; // class ReedsShepp
87 } // namespace distance
88 } // namespace core
89 } // namespace hpp
90 #endif // HPP_CORE_DISTANCE_REEDS_SHEPP_HH
Abstract class for distance between configurations.
Definition: distance.hh:45
Definition: reeds-shepp.hh:46
virtual value_type impl_distance(ConfigurationIn_t q1, ConfigurationIn_t q2) const
Derived class should implement this function.
void init(const ReedsSheppWkPtr_t &weak)
value_type turningRadius() const
Definition: reeds-shepp.hh:59
static ReedsSheppPtr_t create(const ProblemConstPtr_t &problem, const value_type &turningRadius, JointPtr_t xyJoint, JointPtr_t rzJoint, std::vector< JointPtr_t > wheels)
ReedsShepp(const ProblemConstPtr_t &problem, const value_type &turningRadius, JointPtr_t xyJoint, JointPtr_t rzJoint, std::vector< JointPtr_t > wheels)
ReedsShepp(const ProblemConstPtr_t &problem)
virtual DistancePtr_t clone() const
static ReedsSheppPtr_t create(const ProblemConstPtr_t &problem)
void turningRadius(const value_type &rho)
ReedsShepp(const ReedsShepp &distance)
static ReedsSheppPtr_t createCopy(const ReedsSheppPtr_t &distance)
#define HPP_CORE_DLLAPI
Definition: config.hh:88
shared_ptr< ReedsShepp > ReedsSheppPtr_t
Definition: fwd.hh:269
pinocchio::DeviceWkPtr_t DeviceWkPtr_t
Definition: fwd.hh:135
pinocchio::value_type value_type
Definition: fwd.hh:174
shared_ptr< Distance > DistancePtr_t
Definition: fwd.hh:141
shared_ptr< WeighedDistance > WeighedDistancePtr_t
Definition: fwd.hh:226
pinocchio::JointPtr_t JointPtr_t
Definition: fwd.hh:151
pinocchio::ConfigurationIn_t ConfigurationIn_t
Definition: fwd.hh:108
pinocchio::size_type size_type
Definition: fwd.hh:173
shared_ptr< const Problem > ProblemConstPtr_t
Definition: fwd.hh:197
Definition: bi-rrt-planner.hh:35