KatanaKinematics6M180.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2006 by Tiziano Mueller *
3  * tiziano.mueller@neuronics.ch *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
20 #ifndef KNIKATANAKINEMATICS6M180_H
21 #define KNIKATANAKINEMATICS6M180_H
22 
23 #include "common/dllexport.h"
24 
27 
28 
29 #include <vector>
30 
31 
32 namespace KNI {
33 
41 
42 public:
43 
44  void init(metrics const& length, parameter_container const& parameters);
45 
46  // strong guarantee provided here:
47  void DK(coordinates& solution, encoders const& current_encoders) const;
48  void IK(encoders::iterator solution, coordinates const& pose, encoders const& cur_angles) const;
49 
50 
51 private:
52 
53  struct position {
54  double x;
55  double y;
56  double z;
57  };
58 
59  struct angles_calc {
60  double theta1;
61  double theta2;
62  double theta3;
63  double theta4;
64  double theta5;
65  double theta234;
66  double b1;
67  double b2;
68  double costh3;
69  };
70 
71  typedef std::vector<angles_calc> angles_container;
72 
75 
76  static const double _tolerance; // initialized in .cpp
77  static const int _nrOfPossibleSolutions;
78 
79  void _setLength(metrics const& length) { _length = length; }
80  void _setParameters(parameter_container const& parameters) { _parameters = parameters; }
81 
82  void IK_b1b2costh3_6M180(angles_calc &a, const position &p) const;
83 
84  void thetacomp(angles_calc &a, const position &p_m) const;
85 
86  bool angledef(angles_calc &a) const;
87 
88  bool AnglePositionTest(const angles_calc &a) const;
89  bool PositionTest6M180(const angles_calc &a, const position &p) const;
90 
91 };
92 
93 
94 
95 
96 
97 }
98 
99 #endif
std::vector< angles_calc > angles_container
FloatVector * pose
std::vector< KinematicParameters > parameter_container
void _setLength(metrics const &length)
The base class for all kinematic implementations.
FloatVector FloatVector * a
#define DLLDIR_IK
Definition: dllexport.h:31
std::vector< double > coordinates
To store coordinates.
void _setParameters(parameter_container const &parameters)
std::vector< int > encoders
To store encoders.
static const int _nrOfPossibleSolutions
std::vector< double > metrics
To store metrics, &#39;aka&#39; the length&#39;s of the different segments of the robot.
Definition: Timer.h:30


kni
Author(s): Martin Günther
autogenerated on Fri Jun 7 2019 22:06:44