-
Notifications
You must be signed in to change notification settings - Fork 0
/
Kinematics.h
61 lines (46 loc) · 1.1 KB
/
Kinematics.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef KINEMATICS_H
#define KINEMATICS_H
#include <string>
#include <vector>
#include <iostream>
#include <fstream>
#include <sstream>
#include <stdio.h>
#include <Eigen/Dense>
//#include <eigen3/Eigen/Dense>
#include <math.h>
using namespace Eigen;
using namespace std;
///base abstract kinematics class
class Kinematics
{
public:
Kinematics();
private:
};
///Table lookup kinematics
class TableKinematics : public Kinematics
{
public:
TableKinematics();
TableKinematics(string path);
long GetIK(long theta, long phi, vector<double> &lengths);
private:
long Initialize(string csvfileName, vector<int> tableDimensions);
vector < vector<long> > lookupIndex;
vector < vector<double> > lookupTable;
};
///Inverse kinematic algorithm
class GeoInkinematics
{
public:
GeoInkinematics();
GeoInkinematics(double new_a, double new_b, double new_L0);
long GetIK(double incl,double orien, vector<double> &lengths);
private:
double theta,phi;
double a,b;
double L0;
double t11, t12, t13, t21, t22, t23, t31, t32, t33, R, s0, t0, P, L;
};
#endif // KINEMATICS_H