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*(double s, const AbsPos &abs)
double getEulerX()
void setEulerZ(double eulerz)
void setTransZ(double transz)
XmlRpcServer s
void setEulerY(double eulery)
Definition of the used structs in the project Path planner.
void setTransY(double transy)
double getEulerY()
void setEulerX(double eulerx)
void setTransX(double transx)
double getTransY()
double getPosLength() const
double getTransX()
std::ostream & operator<<(std::ostream &os, const AbsPos &a)
double getEulerZ()
double getTransZ()


schunk_powercube_chain
Author(s): Florian Weisshardt
autogenerated on Mon Nov 25 2019 03:48:21