Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KNIKatanaKinematics6M90T_H
00021 #define KNIKatanaKinematics6M90T_H
00022
00023 #include "common/dllexport.h"
00024
00025 #include "KNI_InvKin/KatanaKinematics.h"
00026 #include "KNI_InvKin/KatanaKinematicsDecisionAlgorithms.h"
00027
00028 #include <vector>
00029
00030
00031 namespace KNI {
00032
00039 class DLLDIR_IK KatanaKinematics6M90T : public KatanaKinematics {
00040
00041 public:
00042
00043 void init(metrics const& length, parameter_container const& parameters);
00044
00045
00046 void DK(coordinates& solution, encoders const& current_encoders) const;
00047 void IK(encoders::iterator solution, coordinates const& pose, encoders const& cur_angles) const;
00048
00049
00050 private:
00051
00052 struct position {
00053 double x;
00054 double y;
00055 double z;
00056 };
00057
00058 struct angles_calc {
00059 double theta1;
00060 double theta2;
00061 double theta3;
00062 double theta4;
00063 double theta5;
00064 double theta6;
00065 double theta234;
00066 double b1;
00067 double b2;
00068 double costh3;
00069 };
00070
00071 typedef std::vector<angles_calc> angles_container;
00072
00073 metrics _length;
00074 parameter_container _parameters;
00075
00076 static const double _tolerance;
00077 static const int _nrOfPossibleSolutions;
00078
00079 void _setLength(metrics const& length) { _length = length; }
00080 void _setParameters(parameter_container const& parameters) { _parameters = parameters; }
00081
00082 void IK_theta234theta5(angles_calc& angle, const position &p_gr) const;
00083 void IK_b1b2costh3_6MS(angles_calc &a, const position &p) const;
00084
00085 void thetacomp(angles_calc &a, const position &p_m, const coordinates& pose) const;
00086
00087 bool angledef(angles_calc &a) const;
00088
00089 bool GripperTest(const position &p_gr, const angles_calc &angle) const;
00090 bool AnglePositionTest(const angles_calc &a) const;
00091 bool PositionTest6MS(const double& theta1, const double& theta2, const double& theta3, const double& theta234, const position &p) const;
00092
00093 double findFirstEqualAngle(const angles& v1, const angles& v2) const;
00094
00095 };
00096
00097
00098
00099
00100
00101 }
00102
00103 #endif