hpp-core: include/hpp/core/steering-method/dubins.hh Source File

hpp-core 9.0.2 Implement basic classes for canonical path planning for kinematic chains.

Loading...
Searching...
No Matches
dubins.hh
Go to the documentation of this file.
1//
2// Copyright (c) 2017 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_STEERING_METHOD_DUBINS_HH
31#define HPP_CORE_STEERING_METHOD_DUBINS_HH
32
33#include <hpp/core/config.hh>
34#include <hpp/core/fwd.hh>
35#include <hpp/core/steering-method/car-like.hh>
36#include <hpp/core/steering-method/fwd.hh>
37#include <hpp/util/debug.hh>
38#include <hpp/util/pointer.hh>
39
40namespace hpp {
41namespace core {
42namespace steeringMethod {
45
48 class HPP_CORE_DLLAPI Dubins : public CarLike {
49 public:
58 static DubinsPtr_t createWithGuess(const ProblemConstPtr_t& problem) {
59 Dubins* ptr = new Dubins(problem);
60 DubinsPtr_t shPtr(ptr);
61 ptr->init(shPtr);
62 return shPtr;
63 }
64
68 static DubinsPtr_t create(
69 const ProblemConstPtr_t& problem, const value_type turningRadius,
70 JointPtr_t xyJoint, JointPtr_t rzJoint,
71 std::vector<JointPtr_t> wheels = std::vector<JointPtr_t>()) {
72 Dubins* ptr = new Dubins(problem, turningRadius, xyJoint, rzJoint, wheels);
73 DubinsPtr_t shPtr(ptr);
74 ptr->init(shPtr);
75 return shPtr;
76 }
77
79 static DubinsPtr_t createCopy(const DubinsPtr_t& other) {
80 Dubins* ptr = new Dubins(*other);
81 DubinsPtr_t shPtr(ptr);
82 ptr->init(shPtr);
83 return shPtr;
84 }
85
87 virtual SteeringMethodPtr_t copy() const { return createCopy(weak_.lock()); }
88
90 virtual PathPtr_t impl_compute(ConfigurationIn_t q1,
91 ConfigurationIn_t q2) const;
92
93 protected:
95 Dubins(const ProblemConstPtr_t& problem);
96
98 Dubins(const ProblemConstPtr_t& problem, const value_type turningRadius,
99 JointPtr_t xyJoint, JointPtr_t rzJoint,
100 std::vector<JointPtr_t> wheels);
101
103 Dubins(const Dubins& other);
104
106 void init(DubinsWkPtr_t weak) {
107 CarLike::init(weak);
108 weak_ = weak;
109 }
110
111 private:
112 DubinsWkPtr_t weak_;
113}; // Dubins
115} // namespace steeringMethod
116} // namespace core
117} // namespace hpp
118#endif // HPP_CORE_STEERING_METHOD_DUBINS_HH
car-like.hh
hpp::core::steeringMethod::CarLike
Definition car-like.hh:49
hpp::core::steeringMethod::Dubins
Definition dubins.hh:48
hpp::core::steeringMethod::Dubins::create
static DubinsPtr_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 dubins.hh:68
hpp::core::steeringMethod::Dubins::impl_compute
virtual PathPtr_t impl_compute(ConfigurationIn_t q1, ConfigurationIn_t q2) const
create a path between two configurations
hpp::core::steeringMethod::Dubins::copy
virtual SteeringMethodPtr_t copy() const
Copy instance and return shared pointer.
Definition dubins.hh:87
hpp::core::steeringMethod::Dubins::init
void init(DubinsWkPtr_t weak)
Store weak pointer to itself.
Definition dubins.hh:106
hpp::core::steeringMethod::Dubins::createWithGuess
static DubinsPtr_t createWithGuess(const ProblemConstPtr_t &problem)
Definition dubins.hh:58
hpp::core::steeringMethod::Dubins::Dubins
Dubins(const Dubins &other)
Copy constructor.
hpp::core::steeringMethod::Dubins::Dubins
Dubins(const ProblemConstPtr_t &problem, const value_type turningRadius, JointPtr_t xyJoint, JointPtr_t rzJoint, std::vector< JointPtr_t > wheels)
Constructor.
hpp::core::steeringMethod::Dubins::createCopy
static DubinsPtr_t createCopy(const DubinsPtr_t &other)
Copy instance and return shared pointer.
Definition dubins.hh:79
hpp::core::steeringMethod::Dubins::Dubins
Dubins(const ProblemConstPtr_t &problem)
Constructor.
config.hh
HPP_CORE_DLLAPI
#define HPP_CORE_DLLAPI
Definition config.hh:88
debug.hh
fwd.hh
hpp
hpp::core::steeringMethod::DubinsPtr_t
shared_ptr< Dubins > DubinsPtr_t
Definition fwd.hh:45
hpp::core::value_type
pinocchio::value_type value_type
Definition fwd.hh:174
hpp::core::SteeringMethodPtr_t
shared_ptr< SteeringMethod > SteeringMethodPtr_t
Definition fwd.hh:213
hpp::core::JointPtr_t
pinocchio::JointPtr_t JointPtr_t
Definition fwd.hh:151
hpp::core::ConfigurationIn_t
pinocchio::ConfigurationIn_t ConfigurationIn_t
Definition fwd.hh:108
hpp::core::ProblemConstPtr_t
shared_ptr< const Problem > ProblemConstPtr_t
Definition fwd.hh:197
hpp::core::PathPtr_t
shared_ptr< Path > PathPtr_t
Definition fwd.hh:187
pointer.hh
fwd.hh