ikBase.h
Go to the documentation of this file.
1 /*
2  * Katana Native Interface - A C++ interface to the robot arm Katana.
3  * Copyright (C) 2005 Neuronics AG
4  * Check out the AUTHORS file for detailed contact information.
5  *
6  * This program 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 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program 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 this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  */
20 
21 /******************************************************************************************************************/
22 #ifndef _IKBASE_H_
23 #define _IKBASE_H_
24 /******************************************************************************************************************/
25 
26 #include "common/exception.h"
27 #include "common/dllexport.h"
28 
29 #include "KNI/kmlExt.h"
30 #include "KNI/kmlCommon.h"
31 
37 
38 #include <vector>
39 #include <memory>
40 #include <cmath>
41 
42 /******************************************************************************************************************/
43 
44 #ifndef TM_ENDLESS
45 #define TM_ENDLESS -1
46 #endif
47 
48 
49 class DLLDIR_IK CikBase : public CKatana {
50 
51  private:
52  std::unique_ptr<KNI::KatanaKinematics> _kinematicsImpl;
54  void _initKinematics();
55 
56  public:
57 
58  CikBase() : _kinematicsIsInitialized(false) { };
59  ~CikBase();
60 
65  void getKinematicsVersion(std::vector<int>& version);
66 
72  void setTcpOffset(double xoff, double yoff, double zoff, double psioff);
73 
76  void DKApos(double* position);
77 
82  void getCoordinates(double& x, double& y, double& z, double& phi, double& theta, double& psi, bool refreshEncoders = true);
83 
85  void getCoordinatesFromEncoders(std::vector<double>& pose, const std::vector<int>& encs);
86 
90  void IKCalculate(double X,
91  double Y,
92  double Z,
93  double Al,
94  double Be,
95  double Ga,
96  std::vector<int>::iterator solution_iter);
97 
101  void IKCalculate(double X,
102  double Y,
103  double Z,
104  double Al,
105  double Be,
106  double Ga,
107  std::vector<int>::iterator solution_iter,
108  const std::vector<int>& actualPosition );
109 
112  void IKGoto(double X,
113  double Y,
114  double Z,
115  double Al,
116  double Be,
117  double Ga,
118  bool wait = false,
119  int tolerance = 100,
120  long timeout = TM_ENDLESS);
121 
124  void moveRobotTo(double x,
125  double y,
126  double z,
127  double phi,
128  double theta,
129  double psi,
130  bool waitUntilReached = false, int waitTimeout = TM_ENDLESS);
131 
136  void moveRobotTo( std::vector<double> coordinates, bool waitUntilReached = false, int waitTimeout = TM_ENDLESS);
137 
138 };
139 
140 /******************************************************************************************************************/
141 #endif //_IKBASE_H_
142 /******************************************************************************************************************/
std::unique_ptr< KNI::KatanaKinematics > _kinematicsImpl
Definition: ikBase.h:52
bool _kinematicsIsInitialized
Definition: ikBase.h:53
CikBase()
Definition: ikBase.h:58
FloatVector * pose
Definition: ikBase.h:49
Extended Katana class with additional functions.
Definition: kmlExt.h:64
#define DLLDIR_IK
Definition: dllexport.h:31
#define TM_ENDLESS
timeout symbol for &#39;endless&#39; waiting
Definition: ikBase.h:45


kni
Author(s): Martin Günther
autogenerated on Fri Jan 3 2020 04:01:16