datastructsManipulator.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA)
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9 
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 
18 #ifndef __DATASTRUCTS_MANIPULATOR_H_
19 #define __DATASTRUCTS_MANIPULATOR_H_
20 
22 #include <iostream>
23 
24 // never in headerfiles!
25 // using namespace std;
26 
27 #ifdef SWIG
28 %module PowerCubeCtrl
29 %{
31 %}
32 #endif
33 
39 struct Point3D
40 {
41  double x;
42  double y;
43  double z;
44 };
45 
46 struct AbsPos
47 {
48  AbsPos() : Eulerx(0.0), Eulery(0.0), Eulerz(0.0), Transx(0.0), Transy(0.0), Transz(0.0)
49  {
50  ;
51  }
52  // Bitte beachten: Es werden von nun an XYZ-fixed Winkel benutzt
53  // (Siehe Craig, S.45ff)
54  // welche gleichbedeutend mit den Euler-ZYX Winkeln sind.
55  // Die Bezeichnungen Eulerx, Eulery, Eulerz werden daher beibehalten.
56  double Eulerx;
57  double Eulery;
58  double Eulerz;
59  double Transx;
60  double Transy;
61  double Transz;
62  void set(double* p);
63  void setTransX(double transx)
64  {
65  Transx = transx;
66  }
67  void setTransY(double transy)
68  {
69  Transy = transy;
70  }
71  void setTransZ(double transz)
72  {
73  Transz = transz;
74  }
75  void setEulerX(double eulerx)
76  {
77  Eulerx = eulerx;
78  }
79  void setEulerY(double eulery)
80  {
81  Eulery = eulery;
82  }
83  void setEulerZ(double eulerz)
84  {
85  Eulerz = eulerz;
86  }
87  double getTransX()
88  {
89  return Transx;
90  }
91  double getTransY()
92  {
93  return Transy;
94  }
95  double getTransZ()
96  {
97  return Transz;
98  }
99  double getEulerX()
100  {
101  return Eulerx;
102  }
103  double getEulerY()
104  {
105  return Eulery;
106  }
107  double getEulerZ()
108  {
109  return Eulerz;
110  }
111  void angleScale(double s);
112  void toDeg()
113  {
114  angleScale(57.295779524);
115  }
116  void toRad()
117  {
118  angleScale(0.017453292);
119  }
120  AbsPos operator*(double s) const;
121  AbsPos operator+(const AbsPos& abs2) const;
122  AbsPos operator-(const AbsPos& abs2) const;
123  double getPosLength() const
124  {
125  return sqrt(Transx * Transx + Transy * Transy + Transz * Transz);
126  }
131  double distMeasure(AbsPos otherPos) const;
132 };
133 
134 std::ostream& operator<<(std::ostream& os, const AbsPos& a);
135 
136 inline AbsPos operator*(double s, const AbsPos& abs)
137 {
138  return abs * s;
139 }
140 
141 struct DH
142 {
147 };
148 
150 {
153 };
154 
155 #endif //__DATASTRUCTS_MANIPULATOR_H_
AbsPos::operator*
AbsPos operator*(double s) const
AbsPos::operator+
AbsPos operator+(const AbsPos &abs2) const
AbsPos::Transy
double Transy
Definition: datastructsManipulator.h:60
LimitsTheta
Definition: datastructsManipulator.h:149
Point3D::z
double z
Definition: datastructsManipulator.h:43
Joint< double >
s
XmlRpcServer s
AbsPos::AbsPos
AbsPos()
Definition: datastructsManipulator.h:48
AbsPos::getTransY
double getTransY()
Definition: datastructsManipulator.h:91
AbsPos::getTransZ
double getTransZ()
Definition: datastructsManipulator.h:95
AbsPos::toDeg
void toDeg()
Definition: datastructsManipulator.h:112
LimitsTheta::min
Jointd min
Definition: datastructsManipulator.h:152
abs
double abs(double fValue)
DH::a
Jointd a
Definition: datastructsManipulator.h:143
AbsPos::setTransX
void setTransX(double transx)
Definition: datastructsManipulator.h:63
LimitsTheta::max
Jointd max
Definition: datastructsManipulator.h:151
AbsPos::getTransX
double getTransX()
Definition: datastructsManipulator.h:87
Point3D::y
double y
Definition: datastructsManipulator.h:42
AbsPos::getEulerZ
double getEulerZ()
Definition: datastructsManipulator.h:107
Joint.h
DH::theta
Jointd theta
Definition: datastructsManipulator.h:146
AbsPos::setEulerZ
void setEulerZ(double eulerz)
Definition: datastructsManipulator.h:83
AbsPos::Transx
double Transx
Definition: datastructsManipulator.h:59
Point3D::x
double x
Definition: datastructsManipulator.h:41
AbsPos::operator-
AbsPos operator-(const AbsPos &abs2) const
PowerCubeCtrl
Definition: PowerCubeCtrl.h:37
AbsPos::toRad
void toRad()
Definition: datastructsManipulator.h:116
AbsPos::getEulerX
double getEulerX()
Definition: datastructsManipulator.h:99
AbsPos
Definition: datastructsManipulator.h:46
DH::d
Jointd d
Definition: datastructsManipulator.h:144
operator<<
std::ostream & operator<<(std::ostream &os, const AbsPos &a)
Point3D
Definition of the used structs in the project Path planner.
Definition: datastructsManipulator.h:39
AbsPos::Eulerz
double Eulerz
Definition: datastructsManipulator.h:58
AbsPos::getPosLength
double getPosLength() const
Definition: datastructsManipulator.h:123
AbsPos::setTransY
void setTransY(double transy)
Definition: datastructsManipulator.h:67
AbsPos::Transz
double Transz
Definition: datastructsManipulator.h:61
DH::alpha
Jointd alpha
Definition: datastructsManipulator.h:145
AbsPos::Eulery
double Eulery
Definition: datastructsManipulator.h:57
AbsPos::distMeasure
double distMeasure(AbsPos otherPos) const
in distMeasure(otherPos) wird die Winkelabweichung berücksichtigt Hierbei wird der RMS der Differenze...
AbsPos::getEulerY
double getEulerY()
Definition: datastructsManipulator.h:103
datastructsManipulator.h
AbsPos::setTransZ
void setTransZ(double transz)
Definition: datastructsManipulator.h:71
AbsPos::angleScale
void angleScale(double s)
AbsPos::setEulerX
void setEulerX(double eulerx)
Definition: datastructsManipulator.h:75
AbsPos::set
void set(double *p)
AbsPos::setEulerY
void setEulerY(double eulery)
Definition: datastructsManipulator.h:79
AbsPos::Eulerx
double Eulerx
Definition: datastructsManipulator.h:56
operator*
AbsPos operator*(double s, const AbsPos &abs)
Definition: datastructsManipulator.h:136
DH
Definition: datastructsManipulator.h:141


schunk_powercube_chain
Author(s): Florian Weisshardt
autogenerated on Sat May 7 2022 02:17:15