cheshirekow  v0.1.0
funcs.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 Josh Bialkowski (jbialk@mit.edu)
3  *
4  * This file is part of mpblocks.
5  *
6  * mpblocks is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * mpblocks is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with mpblocks. If not, see <http://www.gnu.org/licenses/>.
18  */
26 #ifndef MPBLOCKS_DUBINS_CURVES_EIGEN_FUNCS_H_
27 #define MPBLOCKS_DUBINS_CURVES_EIGEN_FUNCS_H_
28 
29 #include <Eigen/Dense>
30 
31 namespace mpblocks {
32 namespace dubins {
33 namespace curves_eigen {
34 
37 template <typename Scalar>
38 Eigen::Matrix<Scalar, 2, 1> ccwCenter(const Eigen::Matrix<Scalar, 3, 1>& q,
39  Scalar r);
40 
43 template <typename Scalar>
44 Eigen::Matrix<Scalar, 2, 1> leftCenter(const Eigen::Matrix<Scalar, 3, 1>& q,
45  Scalar r);
46 
49 template <typename Scalar>
50 Eigen::Matrix<Scalar, 2, 1> cwCenter(const Eigen::Matrix<Scalar, 3, 1>& q,
51  Scalar r);
52 
55 template <typename Scalar>
56 Eigen::Matrix<Scalar, 2, 1> rightCenter(const Eigen::Matrix<Scalar, 3, 1>& q,
57  Scalar r);
58 
61 template <typename Scalar>
62 Scalar ccwAngleOf(const Scalar q_theta);
63 
66 template <typename Scalar>
67 Scalar leftAngleOf(const Scalar q_theta);
68 
71 template <typename Scalar>
72 Scalar cwAngleOf(const Scalar q_theta);
73 
76 template <typename Scalar>
77 Scalar rightAngleOf(const Scalar q_theta);
78 
81 template <typename Scalar>
82 Scalar ccwAngleOf(const Eigen::Matrix<Scalar, 3, 1>& q);
83 
86 template <typename Scalar>
87 Scalar leftAngleOf(const Eigen::Matrix<Scalar, 3, 1>& q);
88 
91 template <typename Scalar>
92 Scalar cwAngleOf(const Eigen::Matrix<Scalar, 3, 1>& q);
93 
96 template <typename Scalar>
97 Scalar rightAngleOf(const Eigen::Matrix<Scalar, 3, 1>& q);
98 
101 template <typename Scalar>
102 bool coincidentCenterA(const Eigen::Matrix<Scalar, 2, 1>& c0,
103  const Eigen::Matrix<Scalar, 2, 1>& c1,
104  Eigen::Matrix<Scalar, 2, 1>& c2, Scalar r, Scalar& a);
105 
108 template <typename Scalar>
109 bool coincidentCenterB(const Eigen::Matrix<Scalar, 2, 1>& c0,
110  const Eigen::Matrix<Scalar, 2, 1>& c1,
111  Eigen::Matrix<Scalar, 2, 1>& c2, Scalar r, Scalar& a);
112 
113 } // curves_eigen
114 } // dubins
115 } // mpblocks
116 
117 #endif // FUNCS_H_
bool coincidentCenterA(const Eigen::Matrix< Scalar, 2, 1 > &c0, const Eigen::Matrix< Scalar, 2, 1 > &c1, Eigen::Matrix< Scalar, 2, 1 > &c2, Scalar r, Scalar &a)
returns the center of a circle which is coincident to the two circles whose centers are given...
Definition: funcs.hpp:144
Scalar leftAngleOf(const Scalar q_theta)
return the angle of the vector from the center of the counter clockwise (left) circle coincident to q...
Definition: funcs.hpp:87
bool coincidentCenterB(const Eigen::Matrix< Scalar, 2, 1 > &c0, const Eigen::Matrix< Scalar, 2, 1 > &c1, Eigen::Matrix< Scalar, 2, 1 > &c2, Scalar r, Scalar &a)
returns the center of a circle which is coincident to the two circles whose centers are given...
Definition: funcs.hpp:173
Scalar ccwAngleOf(const Scalar q_theta)
return the angle of the vector from the center of the counter clockwise (left) circle coincident to q...
Definition: funcs.hpp:82
Eigen::Matrix< Scalar, 2, 1 > cwCenter(const Eigen::Matrix< Scalar, 3, 1 > &q, Scalar r)
return the center of a clockwise (right) circle coincident to q with radius r
Definition: funcs.hpp:62
Scalar cwAngleOf(const Scalar q_theta)
return the angle of the vector from the center of the clockwise (right) circle coincident to q...
Definition: funcs.hpp:102
Eigen::Matrix< Scalar, 2, 1 > ccwCenter(const Eigen::Matrix< Scalar, 3, 1 > &q, Scalar r)
return the center of a counter clockwise (left) circle coincident to q with radius r ...
Definition: funcs.hpp:40
Scalar rightAngleOf(const Scalar q_theta)
return the angle of the vector from the center of the clockwise (right) circle coincident to q...
Definition: funcs.hpp:107
Eigen::Matrix< Scalar, 2, 1 > rightCenter(const Eigen::Matrix< Scalar, 3, 1 > &q, Scalar r)
return the center of a clockwise (right) circle coincident to q with radius r
Definition: funcs.hpp:76
Eigen::Matrix< Scalar, 2, 1 > leftCenter(const Eigen::Matrix< Scalar, 3, 1 > &q, Scalar r)
return the center of a counter clockwise (left) circle coincident to q with radius r ...
Definition: funcs.hpp:54