hpp-core  4.12.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 // This file is part of hpp-core
6 // hpp-core is free software: you can redistribute it
7 // and/or modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation, either version
9 // 3 of the License, or (at your option) any later version.
10 //
11 // hpp-core is distributed in the hope that it will be
12 // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // General Lesser Public License for more details. You should have
15 // received a copy of the GNU Lesser General Public License along with
16 // hpp-core If not, see
17 // <http://www.gnu.org/licenses/>.
18 
19 #ifndef HPP_CORE_STEERING_METHOD_CAR_LIKE_HH
20 # define HPP_CORE_STEERING_METHOD_CAR_LIKE_HH
21 
22 # include <hpp/util/debug.hh>
23 # include <hpp/util/pointer.hh>
24 
25 # include <hpp/core/fwd.hh>
26 # include <hpp/core/config.hh>
29 
30 namespace hpp {
31  namespace core {
32  namespace steeringMethod {
35 
40  {
41  public:
42 
43  virtual ~CarLike () {}
44 
46  void setWheelJoints (const std::vector<JointPtr_t> wheels)
47  {
48  wheels_ = wheels;
49  }
50 
51  void turningRadius(const value_type& rho);
52 
53  inline value_type turningRadius() const { return rho_; }
54 
55  protected:
57  CarLike (const ProblemConstPtr_t& problem);
58 
60  CarLike (const ProblemConstPtr_t& problem,
61  const value_type turningRadius,
62  JointPtr_t xyJoint, JointPtr_t rzJoint,
63  std::vector <JointPtr_t> wheels);
64 
66  CarLike (const CarLike& other);
67 
69  void init (CarLikeWkPtr_t weak)
70  {
72  weak_ = weak;
73  }
74 
79  size_type xyId_, rzId_;
80  std::vector<JointPtr_t> wheels_;
81  private:
82  CarLikeWkPtr_t weak_;
83  }; // CarLike
84  std::vector <JointPtr_t> getWheelsFromParameter
85  (const ProblemConstPtr_t& problem, const JointPtr_t& rz);
86 
88  } // namespace steeringMethod
89  } // namespace core
90 } // namespace hpp
91 #endif // HPP_CORE_STEERING_METHOD_CAR_LIKE_HH
void setWheelJoints(const std::vector< JointPtr_t > wheels)
Set the wheels.
Definition: car-like.hh:46
virtual ~CarLike()
Definition: car-like.hh:43
Definition: steering-method.hh:38
Definition: bi-rrt-planner.hh:24
pinocchio::DeviceWkPtr_t DeviceWkPtr_t
Definition: fwd.hh:115
pinocchio::size_type size_type
Definition: fwd.hh:156
shared_ptr< const Problem > ProblemConstPtr_t
Definition: fwd.hh:180
Definition: car-like.hh:39
pinocchio::JointPtr_t JointPtr_t
Definition: fwd.hh:133
size_type xyId_
Definition: car-like.hh:79
std::vector< JointPtr_t > wheels_
Definition: car-like.hh:80
void init(SteeringMethodWkPtr_t weak)
Store weak pointer to itself.
Definition: steering-method.hh:114
pinocchio::value_type value_type
Definition: fwd.hh:157
value_type turningRadius() const
Definition: car-like.hh:53
void init(CarLikeWkPtr_t weak)
Store weak pointer to itself.
Definition: car-like.hh:69
value_type rho_
Turning radius.
Definition: car-like.hh:77
JointPtr_t xy_
Definition: car-like.hh:78
DeviceWkPtr_t device_
Definition: car-like.hh:75
#define HPP_CORE_DLLAPI
Definition: config.hh:64
std::vector< JointPtr_t > getWheelsFromParameter(const ProblemConstPtr_t &problem, const JointPtr_t &rz)