ObjLevelControllerInterface.ice
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @package RobotAPI::NJointControllerInterface
17 * @author Mirko Waechter ( mirko dot waechter at kit dot edu )
18 * @date 2017
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23#pragma once
24
25#include <RobotAPI/interface/core/Trajectory.ice>
26#include <RobotAPI/interface/units/RobotUnit/NJointController.ice>
27
28
29module armarx
30{
31 class NJointBimanualObjLevelControllerConfig extends NJointControllerConfig
32 {
33
34 // dmp configuration
35 int kernelSize = 100;
36 string dmpMode = "MinimumJerk";
37 string dmpType = "Discrete";
38
39 // phaseStop technique
40 double phaseL = 10;
41 double phaseK = 10;
42 double phaseDist0 = 50;
43 double phaseDist1 = 10;
44 double phaseKpPos = 1;
45 double phaseKpOri = 0.1;
46 double posToOriRatio = 10;
47 double timeDuration = 10;
48
49 Ice::DoubleSeq boxInitialPose;
50 float boxWidth;
53
54 // impedance, admittance, object motion parameters
55 Ice::FloatSeq KpImpedance;
56 Ice::FloatSeq KdImpedance;
57 Ice::FloatSeq KpAdmittance;
58 Ice::FloatSeq KdAdmittance;
59 Ice::FloatSeq KmAdmittance;
60 Ice::FloatSeq KmPID;
61 // Ice::FloatSeq objectKp;
62 // Ice::FloatSeq objectKd;
63
64 // pid force controller parameters
65 Ice::FloatSeq targetWrench;
66 Ice::FloatSeq forceP;
67 Ice::FloatSeq forceI;
68 Ice::FloatSeq forceD;
69 Ice::FloatSeq forcePIDLimits;
70
72
73
74 float massLeft;
75 Ice::FloatSeq CoMVecLeft;
76 Ice::FloatSeq forceOffsetLeft;
77 Ice::FloatSeq torqueOffsetLeft;
78
79 float massRight;
80 Ice::FloatSeq CoMVecRight;
81 Ice::FloatSeq forceOffsetRight;
82 Ice::FloatSeq torqueOffsetRight;
83
84 // // flags for testing variants
85 // int dmpFeedType; // 0: no dmp, 1: frame, 2: vel, 3: acc, 4: force
86 // int method; // 1,2,3,4 four diffrent method w.r.t inertia trick; default (0): normal method
87 // int jcMethod; // 0: lin's paper, default: Jc = J
88 // int pdotMethod; // 0: numerical differential, 1: paper, Tau - Tau.Transpose, 2 test, default: zero matrix
89 // int graspingType; // 0: fixed to obj, 1, fixed to hand, 2, dynamically from hand pose, defualt: identity
90
91 float knull;
92 float dnull;
93
95
96 Ice::FloatSeq forceThreshold;
97
99 };
100
101 interface NJointBimanualObjLevelControllerInterface extends NJointControllerInterface
102 {
103 void learnDMPFromFiles(Ice::StringSeq trajfiles);
105 void runDMP(Ice::DoubleSeq goals, double timeDuration);
107 Ice::DoubleSeq starts, Ice::DoubleSeq goals, double timeDuration);
108
109 // void setViaPoints(double canVal, Ice::DoubleSeq point);
110 void setGoals(Ice::DoubleSeq goals);
111 void setViaPoints(double u, Ice::DoubleSeq viapoint);
114
115 void setKpImpedance(Ice::FloatSeq value);
116 void setKdImpedance(Ice::FloatSeq value);
117 void setKmAdmittance(Ice::FloatSeq value);
118 void setKpAdmittance(Ice::FloatSeq value);
119 void setKdAdmittance(Ice::FloatSeq value);
120
121 Ice::FloatSeq getCurrentObjVel();
122 Ice::FloatSeq getCurrentObjForce();
123
124 void setMPWeights(DoubleSeqSeq weights);
125 DoubleSeqSeq getMPWeights();
126 void setMPRotWeights(DoubleSeqSeq weights);
127 DoubleSeqSeq getMPRotWeights();
128 };
129
130 class NJointBimanualObjLevelVelControllerConfig extends NJointControllerConfig
131 {
132
133 // dmp configuration
134 int kernelSize = 10;
135 string dmpMode = "Linear";
136 string dmpType = "Discrete";
137 double timeDuration = 10;
138
141
142 Ice::FloatSeq KpImpedance;
143 Ice::FloatSeq KdImpedance;
144
145 float knull;
146 float dnull;
147
150 };
151
152 interface NJointBimanualObjLevelVelControllerInterface extends NJointControllerInterface
153 {
154 void learnDMPFromFiles(Ice::StringSeq trajfiles);
156 void runDMP(Ice::DoubleSeq goals, double timeDuration);
158 Ice::DoubleSeq starts, Ice::DoubleSeq goals, double timeDuration);
159
160 void setGoals(Ice::DoubleSeq goals);
161 void setViaPoints(double u, Ice::DoubleSeq viapoint);
164
165 void setKpImpedance(Ice::FloatSeq value);
166 void setKdImpedance(Ice::FloatSeq value);
167
168 Ice::FloatSeq getCurrentObjVel();
169
170 void setMPWeights(DoubleSeqSeq weights);
171 DoubleSeqSeq getMPWeights();
172 void setMPRotWeights(DoubleSeqSeq weights);
173 DoubleSeqSeq getMPRotWeights();
174 };
175
176 class NJointBimanualObjLevelMultiMPControllerConfig extends NJointControllerConfig
177 {
178 // dmp configuration
179 int kernelSize = 100;
180 string dmpMode = "MinimumJerk";
181 string dmpObjType = "Discrete";
182 string dmpLeftType = "Discrete";
183 string dmpRightType = "Discrete";
184
185 float dmpAmplitude = 1.0;
186
187 // phaseStop technique
188 double phaseL = 10;
189 double phaseK = 10;
190 double phaseDist0 = 50;
191 double phaseDist1 = 10;
192 double phaseKpPos = 1;
193 double phaseKpOri = 0.1;
194 double posToOriRatio = 10;
195 double timeDuration = 10;
196
197 Ice::DoubleSeq objInitialPose;
200
201 // impedance, admittance, object motion parameters
202 Ice::FloatSeq KpImpedance;
203 Ice::FloatSeq KdImpedance;
204 Ice::FloatSeq KpAdmittance;
205 Ice::FloatSeq KdAdmittance;
206 Ice::FloatSeq KmAdmittance;
207 Ice::FloatSeq KmPID;
208
209 // pid force controller parameters
210 Ice::FloatSeq targetWrench;
211 Ice::FloatSeq forceP;
212 Ice::FloatSeq forceI;
213 Ice::FloatSeq forceD;
214 Ice::FloatSeq forcePIDLimits;
215
217
218
219 float massLeft;
220 Ice::FloatSeq CoMVecLeft;
221 Ice::FloatSeq forceOffsetLeft;
222 Ice::FloatSeq torqueOffsetLeft;
223
225 Ice::FloatSeq CoMVecRight;
226 Ice::FloatSeq forceOffsetRight;
227 Ice::FloatSeq torqueOffsetRight;
228
229 float knull;
230 float dnull;
231
233
234 Ice::FloatSeq forceThreshold;
235
237 };
238
239 interface NJointBimanualObjLevelMultiMPControllerInterface extends NJointControllerInterface
240 {
241 void learnDMPFromFiles(Ice::StringSeq trajfiles);
242 void learnMultiDMPFromFiles(Ice::StringSeq objFileNames,
243 Ice::StringSeq leftFileNames,
244 Ice::StringSeq rightFileNames);
245
247 void runDMP(Ice::DoubleSeq goalObj,
248 Ice::DoubleSeq goalLeft,
249 Ice::DoubleSeq goalRight,
250 double timeDuration);
252 Ice::DoubleSeq starts, Ice::DoubleSeq goals, double timeDuration);
253
254 // void setViaPoints(double canVal, Ice::DoubleSeq point);
255 void setGoals(Ice::DoubleSeq goals);
257 Ice::DoubleSeq goalObj, Ice::DoubleSeq goalLeft, Ice::DoubleSeq goalRight);
258
259 void setViaPoints(double u, Ice::DoubleSeq viapoint);
261
263
264 void setKpImpedance(Ice::FloatSeq value);
265 void setKdImpedance(Ice::FloatSeq value);
266 void setKmAdmittance(Ice::FloatSeq value);
267 void setKpAdmittance(Ice::FloatSeq value);
268 void setKdAdmittance(Ice::FloatSeq value);
269 void setAmplitude(double amp);
270
271 Ice::FloatSeq getCurrentObjVel();
272 Ice::FloatSeq getCurrentObjForce();
273 };
274};
void runDMPWithVirtualStart(Ice::DoubleSeq starts, Ice::DoubleSeq goals, double timeDuration)
void setViaPoints(double u, Ice::DoubleSeq viapoint)
void learnDMPFromFiles(Ice::StringSeq trajfiles)
void runDMP(Ice::DoubleSeq goals, double timeDuration)
void runDMP(Ice::DoubleSeq goalObj, Ice::DoubleSeq goalLeft, Ice::DoubleSeq goalRight, double timeDuration)
void runDMPWithVirtualStart(Ice::DoubleSeq starts, Ice::DoubleSeq goals, double timeDuration)
void setViaPoints(double u, Ice::DoubleSeq viapoint)
void learnMultiDMPFromFiles(Ice::StringSeq objFileNames, Ice::StringSeq leftFileNames, Ice::StringSeq rightFileNames)
void setMultiMPGoals(Ice::DoubleSeq goalObj, Ice::DoubleSeq goalLeft, Ice::DoubleSeq goalRight)
void runDMPWithVirtualStart(Ice::DoubleSeq starts, Ice::DoubleSeq goals, double timeDuration)
void setViaPoints(double u, Ice::DoubleSeq viapoint)
void learnDMPFromFiles(Ice::StringSeq trajfiles)
void runDMP(Ice::DoubleSeq goals, double timeDuration)
This file offers overloads of toIce() and fromIce() functions for STL container types.