hpp-core: include/hpp/core/distance/reeds-shepp.hh Source File

hpp-core 9.0.2 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) 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>
34#include <hpp/core/steering-method/fwd.hh>
35
36namespace hpp {
37namespace core {
38 namespace distance {
41
46 class HPP_CORE_DLLAPI ReedsShepp : public Distance {
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
69 virtual value_type impl_distance(ConfigurationIn_t q1,
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
hpp::core::Distance
Abstract class for distance between configurations.
Definition distance.hh:45
hpp::core::distance::ReedsShepp
Definition reeds-shepp.hh:46
hpp::core::distance::ReedsShepp::impl_distance
virtual value_type impl_distance(ConfigurationIn_t q1, ConfigurationIn_t q2) const
Derived class should implement this function.
hpp::core::distance::ReedsShepp::init
void init(const ReedsSheppWkPtr_t &weak)
hpp::core::distance::ReedsShepp::turningRadius
value_type turningRadius() const
Definition reeds-shepp.hh:59
hpp::core::distance::ReedsShepp::create
static ReedsSheppPtr_t create(const ProblemConstPtr_t &problem, const value_type &turningRadius, JointPtr_t xyJoint, JointPtr_t rzJoint, std::vector< JointPtr_t > wheels)
hpp::core::distance::ReedsShepp::ReedsShepp
ReedsShepp(const ProblemConstPtr_t &problem, const value_type &turningRadius, JointPtr_t xyJoint, JointPtr_t rzJoint, std::vector< JointPtr_t > wheels)
hpp::core::distance::ReedsShepp::ReedsShepp
ReedsShepp(const ProblemConstPtr_t &problem)
hpp::core::distance::ReedsShepp::clone
virtual DistancePtr_t clone() const
hpp::core::distance::ReedsShepp::create
static ReedsSheppPtr_t create(const ProblemConstPtr_t &problem)
hpp::core::distance::ReedsShepp::turningRadius
void turningRadius(const value_type &rho)
hpp::core::distance::ReedsShepp::ReedsShepp
ReedsShepp(const ReedsShepp &distance)
hpp::core::distance::ReedsShepp::createCopy
static ReedsSheppPtr_t createCopy(const ReedsSheppPtr_t &distance)
HPP_CORE_DLLAPI
#define HPP_CORE_DLLAPI
Definition config.hh:88
distance.hh
hpp
hpp::core::distance::ReedsSheppPtr_t
shared_ptr< ReedsShepp > ReedsSheppPtr_t
Definition fwd.hh:277
hpp::core::DeviceWkPtr_t
pinocchio::DeviceWkPtr_t DeviceWkPtr_t
Definition fwd.hh:135
hpp::core::value_type
pinocchio::value_type value_type
Definition fwd.hh:174
hpp::core::DistancePtr_t
shared_ptr< Distance > DistancePtr_t
Definition fwd.hh:141
hpp::core::WeighedDistancePtr_t
shared_ptr< WeighedDistance > WeighedDistancePtr_t
Definition fwd.hh:226
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::size_type
pinocchio::size_type size_type
Definition fwd.hh:173
hpp::core::ProblemConstPtr_t
shared_ptr< const Problem > ProblemConstPtr_t
Definition fwd.hh:197
HPP_SERIALIZABLE
#define HPP_SERIALIZABLE()
fwd.hh