hpp-core  6.0.0
Implement basic classes for canonical path planning for kinematic chains.
car-like.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_CAR_LIKE_HH
31 #define HPP_CORE_STEERING_METHOD_CAR_LIKE_HH
32 
33 #include <hpp/core/config.hh>
34 #include <hpp/core/fwd.hh>
37 #include <hpp/util/debug.hh>
38 #include <hpp/util/pointer.hh>
39 
40 namespace hpp {
41 namespace core {
42 namespace steeringMethod {
45 
50  public:
51  virtual ~CarLike() {}
52 
54  void setWheelJoints(const std::vector<JointPtr_t> wheels) {
55  wheels_ = wheels;
56  }
57 
58  void turningRadius(const value_type& rho);
59 
60  inline value_type turningRadius() const { return rho_; }
61 
62  protected:
64  CarLike(const ProblemConstPtr_t& problem);
65 
67  CarLike(const ProblemConstPtr_t& problem, const value_type turningRadius,
68  JointPtr_t xyJoint, JointPtr_t rzJoint,
69  std::vector<JointPtr_t> wheels);
70 
72  CarLike(const CarLike& other);
73 
75  void init(CarLikeWkPtr_t weak) {
77  weak_ = weak;
78  }
79 
84  size_type xyId_, rzId_;
85  std::vector<JointPtr_t> wheels_;
86 
87  private:
88  CarLikeWkPtr_t weak_;
89 }; // CarLike
90 std::vector<JointPtr_t> getWheelsFromParameter(const ProblemConstPtr_t& problem,
91  const JointPtr_t& rz);
92 
94 } // namespace steeringMethod
95 } // namespace core
96 } // namespace hpp
97 #endif // HPP_CORE_STEERING_METHOD_CAR_LIKE_HH
Definition: steering-method.hh:48
void init(SteeringMethodWkPtr_t weak)
Store weak pointer to itself.
Definition: steering-method.hh:110
Definition: car-like.hh:49
void init(CarLikeWkPtr_t weak)
Store weak pointer to itself.
Definition: car-like.hh:75
void turningRadius(const value_type &rho)
size_type rzId_
Definition: car-like.hh:84
value_type turningRadius() const
Definition: car-like.hh:60
std::vector< JointPtr_t > wheels_
Definition: car-like.hh:85
CarLike(const ProblemConstPtr_t &problem)
Constructor.
void setWheelJoints(const std::vector< JointPtr_t > wheels)
Set the wheels.
Definition: car-like.hh:54
JointPtr_t rz_
Definition: car-like.hh:83
DeviceWkPtr_t device_
Definition: car-like.hh:80
virtual ~CarLike()
Definition: car-like.hh:51
CarLike(const CarLike &other)
Copy constructor.
value_type rho_
Turning radius.
Definition: car-like.hh:82
CarLike(const ProblemConstPtr_t &problem, const value_type turningRadius, JointPtr_t xyJoint, JointPtr_t rzJoint, std::vector< JointPtr_t > wheels)
Constructor.
#define HPP_CORE_DLLAPI
Definition: config.hh:88
std::vector< JointPtr_t > getWheelsFromParameter(const ProblemConstPtr_t &problem, const JointPtr_t &rz)
pinocchio::DeviceWkPtr_t DeviceWkPtr_t
Definition: fwd.hh:135
pinocchio::value_type value_type
Definition: fwd.hh:174
pinocchio::JointPtr_t JointPtr_t
Definition: fwd.hh:151
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