kinematics6M90G.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2008 by Neuronics AG *
3  * support@neuronics.ch *
4  ***************************************************************************/
5 
10 #ifndef _KINEMATICS6M90G_H_
11 #define _KINEMATICS6M90G_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 Kinematics6M90G : 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 theta234;
64  double b1;
65  double b2;
66  double costh3;
67  };
68  typedef std::vector<angles_calc> angles_container;
69  static const int cNrOfPossibleSolutions = 8;
70 
72  bool initialize();
73 
75  void IK_theta234theta5(angles_calc& angle, const position &p_gr) const;
76  bool GripperTest(const position &p_gr, const angles_calc &angle) const;
77  void IK_b1b2costh3_6MS(angles_calc &angle, const position &p) const;
78  void thetacomp(angles_calc &angle, const position &p_m) const;
79  bool PositionTest6MS(const angles_calc &a, const position &p) const;
80  bool angledef(angles_calc &a) const;
81  bool AnglePositionTest(const angles_calc &a) const;
82 
83 protected:
84 
85 public:
88 
91 
93  std::vector<double> getLinkLength();
95  std::vector<int> getEpc();
97  std::vector<int> getEncOff();
99  std::vector<int> getDir();
101  std::vector<double> getAngOff();
103  std::vector<double> getAngStop();
105  std::vector<double> getAngRange();
107  std::vector<double> getAngMin();
109  std::vector<double> getAngMax();
111  bool setLinkLength(const std::vector<double> aLengths);
113  bool setAngOff(const std::vector<double> aAngOff);
115  bool setAngStop(const std::vector<double> aAngStop);
116 
121  bool enc2rad(std::vector<double>& aAngles, const std::vector<int> aEncoders);
122 
127  bool rad2enc(std::vector<int>& aEncoders, const std::vector<double> aAngles);
128 
133  bool directKinematics(std::vector<double>& aPosition, const std::vector<double> aAngles);
134 
141  bool inverseKinematics(std::vector<double>& aAngles, const std::vector<double> aPosition, const std::vector<double> aStartingAngles);
142 };
144 
145 } // namespace
146 
147 #endif //_KINEMATICS6M90G_H_
std::vector< angles_calc > angles_container
std::vector< int > mEncodersPerCycle
Encoders per cycle vector.
void IK_b1b2costh3_6MS(angles_calc &angle, const position &p) const
std::vector< int > mEncoderOffset
Encoder offset vector.
bool initialize()
initialization routine
std::vector< int > getDir()
get direction
std::vector< double > getAngStop()
get angle stop
void thetacomp(angles_calc &angle, const position &p_m) const
std::vector< double > getAngOff()
get angle offset
std::vector< double > getAngMax()
get angle max
bool inverseKinematics(std::vector< double > &aAngles, const std::vector< double > aPosition, const std::vector< double > aStartingAngles)
bool rad2enc(std::vector< int > &aEncoders, const std::vector< double > aAngles)
bool directKinematics(std::vector< double > &aPosition, const std::vector< double > aAngles)
std::vector< double > getAngRange()
get angle range
void IK_theta234theta5(angles_calc &angle, const position &p_gr) const
helper functions
bool AnglePositionTest(const angles_calc &a) const
structs, type and constants used in inverse kinematics calculation
std::vector< double > mAngleStop
Angle stop vector [rad].
bool setAngOff(const std::vector< double > aAngOff)
set angle offset
Base Class for the kinematics implementations.
std::vector< int > mRotationDirection
Rotation direction vector [1|-1].
bool GripperTest(const position &p_gr, const angles_calc &angle) const
std::vector< int > getEpc()
get encoders per cycle
std::vector< double > mAngleOffset
Angle offset vector [rad].
bool setLinkLength(const std::vector< double > aLengths)
set link length
bool setAngStop(const std::vector< double > aAngStop)
set angle offset
bool enc2rad(std::vector< double > &aAngles, const std::vector< int > aEncoders)
FloatVector FloatVector * a
FloatVector * angle
Implements the kinematics for the Katana6M90G.
bool mIsInitialized
Initialized flag.
std::vector< int > getEncOff()
get encoder offset
int mNumberOfMotors
Number of motors of the robot.
bool angledef(angles_calc &a) const
bool PositionTest6MS(const angles_calc &a, const position &p) const
static const int cNrOfPossibleSolutions
std::vector< double > getLinkLength()
get link length
std::vector< double > getAngMin()
get angle min
int mNumberOfSegments
Number of segments of the robot.
std::vector< double > mSegmentLength
Effector segment lengths vector [m].


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