cheshirekow  v0.1.0
zero.hpp
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_HYPER_ZERO_H_
27 #define MPBLOCKS_DUBINS_CURVES_EIGEN_HYPER_ZERO_H_
28 
29 namespace mpblocks {
30 namespace dubins {
31 namespace curves_eigen {
32 namespace hyper {
33 
35 template <typename Format_t>
36 struct Solver<OFF, OFF, OFF, Format_t> {
37  typedef Eigen::Matrix<Format_t, 3, 1> Vector3d_t;
38  typedef Eigen::Matrix<Format_t, 2, 1> Vector2d_t;
41 
42  static Result_t solve(const Vector3d_t& q0, const Hyper_t& h,
43  const Format_t r) {
44  Result_t out(0);
45 
46  for (int i = 0; i < 3; i++)
47  if (q0[i] < h.minExt[i] || q0[i] > h.maxExt[i]) return out;
48 
49  out = Vector3d_t::Zero();
50  return out;
51  };
52 };
53 
54 } // namespace hyper
55 } // namespace curves_eigen
56 } // namespace dubins
57 } // namespace mpblocks
58 
59 #endif // ZERO_H_
static Result_t solve(const Vector3d_t &q0, const Hyper_t &h, const Format_t r)
Definition: zero.hpp:42
the default solver is instantated when not all three constraints are active and it simply dispatches ...
Definition: Solver.hpp:95
A hyper-rectangle in dubins space: A rectangular prism in R^3.
Definition: hyper_rect.h:44
Encodes a dubins path primitive, which is three connected arc segments.
Definition: path.h:42