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

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

Loading...
Searching...
No Matches
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>
35#include <hpp/core/steering-method.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
49 class HPP_CORE_DLLAPI CarLike : public SteeringMethod {
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) {
76 core::SteeringMethod::init(weak);
77 weak_ = weak;
78 }
79
80 DeviceWkPtr_t device_;
82 value_type rho_;
83 JointPtr_t xy_, rz_;
84 size_type xyId_, rzId_;
85 std::vector<JointPtr_t> wheels_;
86
87 private:
88 CarLikeWkPtr_t weak_;
89}; // CarLike
90std::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
hpp::core::SteeringMethod
Definition steering-method.hh:48
hpp::core::steeringMethod::CarLike
Definition car-like.hh:49
hpp::core::steeringMethod::CarLike::init
void init(CarLikeWkPtr_t weak)
Store weak pointer to itself.
Definition car-like.hh:75
hpp::core::steeringMethod::CarLike::turningRadius
void turningRadius(const value_type &rho)
hpp::core::steeringMethod::CarLike::rzId_
size_type rzId_
Definition car-like.hh:84
hpp::core::steeringMethod::CarLike::turningRadius
value_type turningRadius() const
Definition car-like.hh:60
hpp::core::steeringMethod::CarLike::wheels_
std::vector< JointPtr_t > wheels_
Definition car-like.hh:85
hpp::core::steeringMethod::CarLike::CarLike
CarLike(const ProblemConstPtr_t &problem)
Constructor.
hpp::core::steeringMethod::CarLike::setWheelJoints
void setWheelJoints(const std::vector< JointPtr_t > wheels)
Set the wheels.
Definition car-like.hh:54
hpp::core::steeringMethod::CarLike::rz_
JointPtr_t rz_
Definition car-like.hh:83
hpp::core::steeringMethod::CarLike::device_
DeviceWkPtr_t device_
Definition car-like.hh:80
hpp::core::steeringMethod::CarLike::~CarLike
virtual ~CarLike()
Definition car-like.hh:51
hpp::core::steeringMethod::CarLike::CarLike
CarLike(const CarLike &other)
Copy constructor.
hpp::core::steeringMethod::CarLike::rho_
value_type rho_
Turning radius.
Definition car-like.hh:82
hpp::core::steeringMethod::CarLike::CarLike
CarLike(const ProblemConstPtr_t &problem, const value_type turningRadius, JointPtr_t xyJoint, JointPtr_t rzJoint, std::vector< JointPtr_t > wheels)
Constructor.
config.hh
HPP_CORE_DLLAPI
#define HPP_CORE_DLLAPI
Definition config.hh:88
debug.hh
fwd.hh
hpp::core::steeringMethod::getWheelsFromParameter
std::vector< JointPtr_t > getWheelsFromParameter(const ProblemConstPtr_t &problem, const JointPtr_t &rz)
hpp
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::JointPtr_t
pinocchio::JointPtr_t JointPtr_t
Definition fwd.hh:151
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
pointer.hh
fwd.hh
steering-method.hh