hc_cc_circle.hpp
Go to the documentation of this file.
1 /*********************************************************************
2 * Copyright (c) 2017 - for information on the respective copyright
3 * owner see the NOTICE file and/or the repository
4 *
5 * https://github.com/hbanzhaf/steering_functions.git
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
16 * implied. See the License for the specific language governing
17 * permissions and limitations under the License.
18 
19 * This source code is derived from Continuous Curvature (CC) Steer.
20 * Copyright (c) 2016, Thierry Fraichard and Institut national de
21 * recherche en informatique et en automatique (Inria), licensed under
22 * the BSD license, cf. 3rd-party-licenses.txt file in the root
23 * directory of this source tree.
24 **********************************************************************/
25 
26 #ifndef HC_CC_CIRCLE_HPP
27 #define HC_CC_CIRCLE_HPP
28 
30 
31 namespace steering
32 {
33 
35 {
36 public:
38  void set_param(double _kappa, double _sigma, double _radius, double _mu, double _sin_mu, double _cos_mu,
39  double _delta_min);
40 
42  double kappa, kappa_inv, sigma;
43 
45  double radius;
46 
48  double mu;
49 
51  double sin_mu, cos_mu;
52 
54  double delta_min;
55 };
56 
58 {
59 public:
61  HC_CC_Circle(const Configuration &_start, bool _left, bool _forward, bool _regular, const HC_CC_Circle_Param &_param);
62 
64  HC_CC_Circle(double _xc, double _yc, bool _left, bool _forward, bool _regular, const HC_CC_Circle_Param &_param);
65 
67  double deflection(const Configuration &q) const;
68 
70  double D1(double alpha) const;
71 
73  double rs_circular_deflection(double delta) const;
74 
76  double rs_turn_length(const Configuration &q) const;
77 
79  double hc_circular_deflection(double delta) const;
80 
82  double hc_turn_length(const Configuration &q) const;
83 
85  bool cc_elementary_sharpness(const Configuration &q, double delta, double &sigma0) const;
86 
88  double cc_circular_deflection(double delta) const;
89 
91  double cc_turn_length(const Configuration &q) const;
92 
94  void print(bool eol) const;
95 
98 
100  bool left;
101 
103  bool forward;
104 
106  bool regular;
107 
109  double xc, yc;
110 };
111 
113 double center_distance(const HC_CC_Circle &c1, const HC_CC_Circle &c2);
114 
117 
118 } // namespace steering
119 
120 #endif
bool left
Turning direction: left/right.
double center_distance(const HC_CC_Circle &c1, const HC_CC_Circle &c2)
Cartesian distance between the centers of two circles.
double sin_mu
Sine and cosine of mu.
bool configuration_on_hc_cc_circle(const HC_CC_Circle &c, const Configuration &q)
Configuration on the circle?
double radius
Radius of the outer circle.
bool regular
Type of the circle: regular/irregular.
ROSCONSOLE_DECL void print(FilterBase *filter, void *logger, Level level, const char *file, int line, const char *function, const char *fmt,...) ROSCONSOLE_PRINTF_ATTRIBUTE(7
double kappa
Max. curvature, inverse of max. curvature, max. sharpness.
bool forward
Driving direction: forwards/backwards.
double mu
Angle between the initial orientation and the tangent to the circle at the initial position...
double delta_min
Minimal deflection.
Configuration start
Start configuration.
void set_param(double _kappa, double _sigma, double _radius, double _mu, double _sin_mu, double _cos_mu, double _delta_min)
Set parameters.


steering_functions
Author(s): Holger Banzhaf
autogenerated on Thu Aug 18 2022 02:09:46