lib/kinematics/libKinematics.h
Go to the documentation of this file.
1 /* --------------------------------------------------------------------------------
2  #
3  # libKinematics.h
4  # Project : Kinematics
5  # author : jhaller
6  # 24.04.2008
7  #
8  # --------------------------------------------------------------------------------*/
9 
10 /*
11 * Kinematics library.
12 *
13 * General usage: kin_setType or (kin_setMDH and than kin_setImmob if needed,
14 * kin_setEPC, kin_setEncOff, kin_setRotDir, kin_setAngOff and kin_setAngRan),
15 * then kin_init, then use the conversion and kinematics functions.
16 */
17 
18 #ifndef WIN32
19 #define _declspec(dllexport)
20 #endif // ifndef WIN32
21 
22 #ifdef WIN32
23 #include <windows.h>
24 #endif // ifdef WIN32
25 #include <stdio.h>
26 #include <vector>
27 #include <iostream>
28 #include <string>
29 #include <cmath>
30 #include <fstream>
31 #include <ctime>
32 
33 #include "kinematics.h"
34 
35 extern "C"{
36 
37 
39 
40 // This structure holds an int array including its length.
41 typedef struct IntVector
42 {
43  int length;
44  int data[MaxDof];
45 } IntVector;
46 // This structure holds a float array including its length.
47 typedef struct FloatVector
48 {
49  int length;
50  float data[MaxDof];
51 } FloatVector;
52 
54 
70 _declspec(dllexport) int kin_setType(int type);
71 
88 _declspec(dllexport) int kin_setMDH(FloatVector* theta, FloatVector* d,
90 
101 _declspec(dllexport) int kin_setLinkLen(FloatVector* links);
102 
112 _declspec(dllexport) int kin_setImmob(int immobile);
113 
122 _declspec(dllexport) int kin_setEPC(IntVector* epc);
123 
132 _declspec(dllexport) int kin_setEncOff(IntVector* encOffset);
133 
144 _declspec(dllexport) int kin_setRotDir(IntVector* rotDir);
145 
154 _declspec(dllexport) int kin_setAngOff(FloatVector* angleOffset);
155 
165 _declspec(dllexport) int kin_setAngRan(FloatVector* angleRange);
166 
175 _declspec(dllexport) int kin_setTcpOff(FloatVector* tcpOffset);
176 
178 
186 _declspec(dllexport) int kin_getType();
187 
194 _declspec(dllexport) int kin_getMaxDOF();
195 
202 _declspec(dllexport) int kin_getDOF();
203 
210 _declspec(dllexport) int kin_getDOM();
211 
221 _declspec(dllexport) int kin_getMDH(FloatVector* theta, FloatVector* d,
222  FloatVector* a, FloatVector* alpha);
223 
228 _declspec(dllexport) int kin_getImmob();
229 
235 _declspec(dllexport) int kin_getEPC(IntVector* epc);
236 
242 _declspec(dllexport) int kin_getEncOff(IntVector* encOffset);
243 
249 _declspec(dllexport) int kin_getRotDir(IntVector* rotDir);
250 
257 _declspec(dllexport) int kin_getAngOff(FloatVector* angleOffset);
258 
265 _declspec(dllexport) int kin_getAngRan(FloatVector* angleRange);
266 
272 _declspec(dllexport) int kin_getTcpOff(FloatVector* tcpOffset);
273 
279 _declspec(dllexport) int kin_getVersion(IntVector* version);
280 
282 
291 _declspec(dllexport) int kin_init();
292 
294 
301 _declspec(dllexport) int kin_clean();
302 
304 
314 
323 _declspec(dllexport) int kin_mDH2K4DAng(FloatVector* angleMDH, FloatVector* angleK4D);
324 
334 
343 _declspec(dllexport) int kin_rad2enc(FloatVector* angle, IntVector* enc);
344 
353 _declspec(dllexport) int kin_DK(FloatVector* angle, FloatVector* pose);
354 
365 _declspec(dllexport) int kin_IK(FloatVector* pose, FloatVector* prev,
366  FloatVector* angle, int maxBisection = 0);
367 
368 } // extern c
369 
370 
371 
int kin_getMaxDOF()
FloatVector FloatVector FloatVector * alpha
FloatVector FloatVector int maxBisection
int kin_K4D2mDHAng(FloatVector *angleK4D, FloatVector *angleMDH)
int kin_IK(FloatVector *pose, FloatVector *prev, FloatVector *angle, int maxBisection)
int kin_setAngRan(FloatVector *angleRange)
int kin_init()
int kin_getDOM()
int kin_getRotDir(IntVector *rotDir)
int kin_setEncOff(IntVector *encOffset)
FloatVector * d
int kin_getVersion(IntVector *version)
const int MaxDof
Maximum degree of freedom.
int kin_setType(int type)
int data[MaxDof]
int kin_setMDH(FloatVector *theta, FloatVector *d, FloatVector *a, FloatVector *alpha, int typeNr)
FloatVector FloatVector * a
int kin_setLinkLen(FloatVector *links)
int kin_getType()
FloatVector FloatVector FloatVector int typeNr
int kin_getImmob()
int kin_clean()
int kin_DK(FloatVector *angle, FloatVector *pose)
FloatVector * angleMDH
FloatVector * prev
int kin_mDH2K4DAng(FloatVector *angleMDH, FloatVector *angleK4D)
int kin_getAngRan(FloatVector *angleRange)
int kin_getEPC(IntVector *epc)
int kin_setEPC(IntVector *epc)
int kin_getAngOff(FloatVector *angleOffset)
int kin_setRotDir(IntVector *rotDir)
int kin_setTcpOff(FloatVector *tcpOffset)
struct IntVector IntVector
int kin_setImmob(int immobile)
int kin_getDOF()
#define _declspec(dllexport)
This sets the robot type.
int kin_enc2rad(IntVector *enc, FloatVector *angle)
FloatVector * pose
int kin_rad2enc(FloatVector *angle, IntVector *enc)
int kin_setAngOff(FloatVector *angleOffset)
IntVector * enc
FloatVector * angleK4D
int kin_getEncOff(IntVector *encOffset)
int kin_getMDH(FloatVector *theta, FloatVector *d, FloatVector *a, FloatVector *alpha)
FloatVector * angle
struct FloatVector FloatVector
int kin_getTcpOff(FloatVector *tcpOffset)


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