hpp-core 6.0.0
Implement basic classes for canonical path planning for kinematic chains.
Loading...
Searching...
No Matches
reeds-shepp.hh
Go to the documentation of this file.
1//
2// Copyright (c) 2015 CNRS
3// Authors: Joseph Mirabel
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_STEERING_METHOD_REEDS_SHEPP_HH
31#define HPP_CORE_STEERING_METHOD_REEDS_SHEPP_HH
32
33#include <hpp/core/config.hh>
34#include <hpp/core/fwd.hh>
36#include <hpp/util/debug.hh>
37#include <hpp/util/pointer.hh>
38
39namespace hpp {
40namespace core {
41namespace steeringMethod {
44
48 public:
58 ReedsShepp* ptr = new ReedsShepp(problem);
59 ReedsSheppPtr_t shPtr(ptr);
60 ptr->init(shPtr);
61 return shPtr;
62 }
63
68 const ProblemConstPtr_t& problem, const value_type turningRadius,
69 JointPtr_t xyJoint, JointPtr_t rzJoint,
70 std::vector<JointPtr_t> wheels = std::vector<JointPtr_t>()) {
71 ReedsShepp* ptr =
72 new ReedsShepp(problem, turningRadius, xyJoint, rzJoint, wheels);
73 ReedsSheppPtr_t shPtr(ptr);
74 ptr->init(shPtr);
75 return shPtr;
76 }
77
80 ReedsShepp* ptr = new ReedsShepp(*other);
81 ReedsSheppPtr_t shPtr(ptr);
82 ptr->init(shPtr);
83 return shPtr;
84 }
85
87 virtual SteeringMethodPtr_t copy() const { return createCopy(weak_.lock()); }
88
91 ConfigurationIn_t q2) const;
92
93 protected:
96
98 ReedsShepp(const ProblemConstPtr_t& problem, const value_type turningRadius,
99 JointPtr_t xyJoint, JointPtr_t rzJoint,
100 std::vector<JointPtr_t> wheels);
101
103 ReedsShepp(const ReedsShepp& other);
104
106 void init(ReedsSheppWkPtr_t weak) {
107 CarLike::init(weak);
108 weak_ = weak;
109 }
110
111 private:
112 WeighedDistancePtr_t weighedDistance_;
113 ReedsSheppWkPtr_t weak_;
114}; // class ReedsShepp
115
124 const DevicePtr_t& device, ConfigurationIn_t init, ConfigurationIn_t end,
125 value_type extraLength, value_type rho, size_type xyId, size_type rzId,
126 const std::vector<JointPtr_t> wheels, ConstraintSetPtr_t constraints,
127 bool computeDistance, value_type& distance);
128
130} // namespace steeringMethod
131} // namespace core
132} // namespace hpp
133#endif // HPP_CORE_STEERING_METHOD_REEDS_SHEPP_HH
Definition car-like.hh:49
Definition reeds-shepp.hh:47
ReedsShepp(const ProblemConstPtr_t &problem, const value_type turningRadius, JointPtr_t xyJoint, JointPtr_t rzJoint, std::vector< JointPtr_t > wheels)
Constructor.
virtual SteeringMethodPtr_t copy() const
Copy instance and return shared pointer.
Definition reeds-shepp.hh:87
ReedsShepp(const ProblemConstPtr_t &problem)
Constructor.
static ReedsSheppPtr_t createCopy(const ReedsSheppPtr_t &other)
Copy instance and return shared pointer.
Definition reeds-shepp.hh:79
void init(ReedsSheppWkPtr_t weak)
Store weak pointer to itself.
Definition reeds-shepp.hh:106
ReedsShepp(const ReedsShepp &other)
Copy constructor.
virtual PathPtr_t impl_compute(ConfigurationIn_t q1, ConfigurationIn_t q2) const
create a path between two configurations
static ReedsSheppPtr_t createWithGuess(const ProblemConstPtr_t &problem)
Definition reeds-shepp.hh:57
static ReedsSheppPtr_t create(const ProblemConstPtr_t &problem, const value_type turningRadius, JointPtr_t xyJoint, JointPtr_t rzJoint, std::vector< JointPtr_t > wheels=std::vector< JointPtr_t >())
Definition reeds-shepp.hh:67
#define HPP_CORE_DLLAPI
Definition config.hh:88
PathVectorPtr_t reedsSheppPathOrDistance(const DevicePtr_t &device, ConfigurationIn_t init, ConfigurationIn_t end, value_type extraLength, value_type rho, size_type xyId, size_type rzId, const std::vector< JointPtr_t > wheels, ConstraintSetPtr_t constraints, bool computeDistance, value_type &distance)
shared_ptr< ReedsShepp > ReedsSheppPtr_t
Definition fwd.hh:349
pinocchio::value_type value_type
Definition fwd.hh:174
shared_ptr< PathVector > PathVectorPtr_t
Definition fwd.hh:193
shared_ptr< WeighedDistance > WeighedDistancePtr_t
Definition fwd.hh:226
shared_ptr< SteeringMethod > SteeringMethodPtr_t
Definition fwd.hh:213
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
pinocchio::DevicePtr_t DevicePtr_t
Definition fwd.hh:134
shared_ptr< ConstraintSet > ConstraintSetPtr_t
Definition fwd.hh:130
shared_ptr< Path > PathPtr_t
Definition fwd.hh:187
Definition bi-rrt-planner.hh:35