-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkinematics.h
80 lines (69 loc) · 1.9 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
//robotの運動学計算用ライブラリ
//未完成
#ifndef KWS_KAL_KINEMATICS2_H_
#define KWS_KAL_KINEMATICS2_H_
#include<iostream>
#include"linkparameter.h"
#include"transform.h"
#include<math.h>
#ifdef RF
#include<eigen3/Eigen/Dense>
#else
#include"../Eigen/Dense"
#endif
#define ACT_NUM 9
class Joint{
private:
Eigen::Vector3d l;
Eigen::Vector3d loffset;
Eigen::Vector3d P;
Eigen::Matrix3d R;
Eigen::Matrix3d E;
public:
void SetJointParam( Eigen::Vector3d lnew,
Eigen::Vector3d loffsetnew,
Eigen::Vector3d Pnew,
Eigen::Matrix3d Rnew,
Eigen::Matrix3d Enew );
void GetJointParam( Eigen::Vector3d& lnew,
Eigen::Vector3d& loffsetnew,
Eigen::Vector3d& Pnew,
Eigen::Matrix3d& Rnew,
Eigen::Matrix3d& Enew );
};
void Joint::SetJointParam( Eigen::Vector3d lnew,
Eigen::Vector3d loffsetnew,
Eigen::Vector3d Pnew,
Eigen::Matrix3d Rnew,
Eigen::Matrix3d Enew )
{
l=lnew;
loffset=loffsetnew;
P=Pnew;
R=Rnew;
E=Enew;
}
void Joint::GetJointParam( Eigen::Vector3d& lnew,
Eigen::Vector3d& loffsetnew,
Eigen::Vector3d& Pnew,
Eigen::Matrix3d& Rnew,
Eigen::Matrix3d& Enew )
{
lnew=l;
loffsetnew=loffset;
Pnew=P;
Rnew=R;
Enew=E;
}
class Kinematics{
private:
Joint joint[ACT_NUM];
public:
void FK_holder();
void FK_forceps();
void IK_holder();
void IK_forceps();
void jacobi_holder();
void jacobi();
};
#endif