kinematics6M90T.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2008 by Neuronics AG *
3  * support@neuronics.ch *
4  ***************************************************************************/
5 
10 #ifndef _KINEMATICS6M90T_H_
11 #define _KINEMATICS6M90T_H_
12 //std:
13 #include <string>
14 #include <queue>
15 #include <vector>
16 #include <map>
17 //kinematics:
18 #include "kinematics.h"
20 #include "MathHelperFunctions.h"
21 
22 
23 namespace AnaGuess {
24 
26 
30 class Kinematics6M90T : public Kinematics {
31 private:
37  std::vector<double> mSegmentLength;
39  std::vector<double> mAngleOffset;
41  std::vector<double> mAngleStop;
43  std::vector<int> mEncodersPerCycle;
45  std::vector<int> mEncoderOffset;
47  std::vector<int> mRotationDirection;
50 
52  struct position {
53  double x;
54  double y;
55  double z;
56  };
57  struct angles_calc {
58  double theta1;
59  double theta2;
60  double theta3;
61  double theta4;
62  double theta5;
63  double theta6;
64  double theta234;
65  double b1;
66  double b2;
67  double costh3;
68  };
69  typedef std::vector<angles_calc> angles_container;
70  static const int cNrOfPossibleSolutions = 8;
71 
73  bool initialize();
74 
76  void IK_theta234theta5(angles_calc& angle, const position &p_gr) const;
77  bool GripperTest(const position &p_gr, const angles_calc &angle) const;
78  void IK_b1b2costh3_6MS(angles_calc &angle, const position &p) const;
79  double findFirstEqualAngle(const std::vector<double>& v1, const std::vector<double>& v2) const;
80  void thetacomp(angles_calc &angle, const position &p_m, const std::vector<double>& pose) const;
81  bool PositionTest6MS(const double& theta1, const double& theta2, const double& theta3,
82  const double& theta234, const position &p) const;
83  bool angledef(angles_calc &a) const;
84  bool AnglePositionTest(const angles_calc &a) const;
85 
86 protected:
87 
88 public:
91 
94 
96  std::vector<double> getLinkLength();
98  std::vector<int> getEpc();
100  std::vector<int> getEncOff();
102  std::vector<int> getDir();
104  std::vector<double> getAngOff();
106  std::vector<double> getAngStop();
108  std::vector<double> getAngRange();
110  std::vector<double> getAngMin();
112  std::vector<double> getAngMax();
114  bool setLinkLength(const std::vector<double> aLengths);
116  bool setAngOff(const std::vector<double> aAngOff);
118  bool setAngStop(const std::vector<double> aAngStop);
119 
124  bool enc2rad(std::vector<double>& aAngles, const std::vector<int> aEncoders);
125 
130  bool rad2enc(std::vector<int>& aEncoders, const std::vector<double> aAngles);
131 
136  bool directKinematics(std::vector<double>& aPosition, const std::vector<double> aAngles);
137 
144  bool inverseKinematics(std::vector<double>& aAngles, const std::vector<double> aPosition, const std::vector<double> aStartingAngles);
145 };
147 
148 } // namespace
149 
150 #endif //_KINEMATICS6M90T_H_
std::vector< double > mAngleStop
Angle stop vector [rad].
bool directKinematics(std::vector< double > &aPosition, const std::vector< double > aAngles)
std::vector< double > getAngMin()
get angle min
std::vector< int > getDir()
get direction
void thetacomp(angles_calc &angle, const position &p_m, const std::vector< double > &pose) const
bool enc2rad(std::vector< double > &aAngles, const std::vector< int > aEncoders)
std::vector< double > getAngStop()
get angle stop
std::vector< double > getLinkLength()
get link length
bool PositionTest6MS(const double &theta1, const double &theta2, const double &theta3, const double &theta234, const position &p) const
void IK_theta234theta5(angles_calc &angle, const position &p_gr) const
helper functions
FloatVector * pose
bool mIsInitialized
Initialized flag.
bool AnglePositionTest(const angles_calc &a) const
bool setAngOff(const std::vector< double > aAngOff)
set angle offset
std::vector< int > mRotationDirection
Rotation direction vector [1|-1].
bool setLinkLength(const std::vector< double > aLengths)
set link length
Implements the kinematics for the Katana6M90T.
Base Class for the kinematics implementations.
int mNumberOfMotors
Number of motors of the robot.
bool rad2enc(std::vector< int > &aEncoders, const std::vector< double > aAngles)
std::vector< angles_calc > angles_container
structs, type and constants used in inverse kinematics calculation
int mNumberOfSegments
Number of segments of the robot.
std::vector< double > getAngMax()
get angle max
FloatVector FloatVector * a
FloatVector * angle
bool inverseKinematics(std::vector< double > &aAngles, const std::vector< double > aPosition, const std::vector< double > aStartingAngles)
std::vector< double > mSegmentLength
Effector segment lengths vector [m].
std::vector< double > getAngRange()
get angle range
void IK_b1b2costh3_6MS(angles_calc &angle, const position &p) const
std::vector< int > mEncodersPerCycle
Encoders per cycle vector.
std::vector< double > getAngOff()
get angle offset
double findFirstEqualAngle(const std::vector< double > &v1, const std::vector< double > &v2) const
bool setAngStop(const std::vector< double > aAngStop)
set angle stop
bool initialize()
initialization routine
std::vector< int > getEncOff()
get encoder offset
std::vector< int > mEncoderOffset
Encoder offset vector.
std::vector< int > getEpc()
get encoders per cycle
bool GripperTest(const position &p_gr, const angles_calc &angle) const
static const int cNrOfPossibleSolutions
std::vector< double > mAngleOffset
Angle offset vector [rad].
bool angledef(angles_calc &a) const


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