ForceMPControllerInterface.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
28module armarx
29{
30 class NJointBimanualForceControllerConfig extends NJointControllerConfig
31 {
32
33 // dmp configuration
34 int kernelSize = 100;
35 string dmpMode = "MinimumJerk";
36 string dmpType = "Discrete";
37
38 // phaseStop technique
39 double phaseL = 10;
40 double phaseK = 10;
41 double phaseDist0 = 50;
42 double phaseDist1 = 10;
43 double phaseKpPos = 1;
44 double phaseKpOri = 0.1;
45 double posToOriRatio = 10;
46 double timeDuration = 10;
47
48 Ice::DoubleSeq boxInitialPose;
49 float boxWidth;
52
53 // impedance, admittance, object motion parameters
54 Ice::FloatSeq KpImpedance;
55 Ice::FloatSeq KdImpedance;
56 Ice::FloatSeq KpAdmittance;
57 Ice::FloatSeq KdAdmittance;
58 Ice::FloatSeq KmAdmittance;
59 Ice::FloatSeq KmPID;
60 // Ice::FloatSeq objectKp;
61 // Ice::FloatSeq objectKd;
62
63 // pid force controller parameters
64 Ice::FloatSeq targetWrench;
65 Ice::FloatSeq forceP;
66 Ice::FloatSeq forceI;
67 Ice::FloatSeq forceD;
68 Ice::FloatSeq forcePIDLimits;
69
71
72
73 float massLeft;
74 Ice::FloatSeq CoMVecLeft;
75 Ice::FloatSeq forceOffsetLeft;
76 Ice::FloatSeq torqueOffsetLeft;
77
78 float massRight;
79 Ice::FloatSeq CoMVecRight;
80 Ice::FloatSeq forceOffsetRight;
81 Ice::FloatSeq torqueOffsetRight;
82
83 // // flags for testing variants
84 // int dmpFeedType; // 0: no dmp, 1: frame, 2: vel, 3: acc, 4: force
85 // int method; // 1,2,3,4 four diffrent method w.r.t inertia trick; default (0): normal method
86 // int jcMethod; // 0: lin's paper, default: Jc = J
87 // int pdotMethod; // 0: numerical differential, 1: paper, Tau - Tau.Transpose, 2 test, default: zero matrix
88 // int graspingType; // 0: fixed to obj, 1, fixed to hand, 2, dynamically from hand pose, defualt: identity
89
90 float knull;
91 float dnull;
92
94
96 };
97
98 interface NJointBimanualForceControllerInterface extends NJointControllerInterface
99 {
100 void learnDMPFromFiles(Ice::StringSeq trajfiles);
102 void runDMP(Ice::DoubleSeq goals);
103
104 // void setViaPoints(double canVal, Ice::DoubleSeq point);
105 void setGoals(Ice::DoubleSeq goals);
106 void setViaPoints(double u, Ice::DoubleSeq viapoint);
108 };
109
110 class NJointBimanualForceMPControllerConfig extends NJointControllerConfig
111 {
112
113 // dmp configuration
114 int kernelSize = 100;
115 string dmpMode = "MinimumJerk";
116 string dmpStyle = "Discrete";
117 double dmpAmplitude = 1;
118
119 double phaseL = 10;
120 double phaseK = 10;
121 double phaseDist0 = 50;
122 double phaseDist1 = 10;
123 double phaseKpPos = 1;
124 double phaseKpOri = 0.1;
125 double timeDuration = 10;
126 double posToOriRatio = 100;
127
130
131 // velocity control
136
137 // force control
138 float forceP;
139 float forceI;
140 float forceD;
141
144
146 Ice::FloatSeq leftForceOffset;
147 Ice::FloatSeq rightForceOffset;
148
149 string debugName;
150 };
151
152 interface NJointBimanualForceMPControllerInterface extends NJointControllerInterface
153 {
154 void learnDMPFromFiles(string whichMP, Ice::StringSeq trajfiles);
156 void runDMP(Ice::DoubleSeq leftGoals, Ice::DoubleSeq rightGoals);
157 double getCanVal();
158
159 void setViaPoints(string whichDMP, double canVal, Ice::DoubleSeq viaPoint);
160 };
161};
void setViaPoints(double u, Ice::DoubleSeq viapoint)
void learnDMPFromFiles(Ice::StringSeq trajfiles)
void learnDMPFromFiles(string whichMP, Ice::StringSeq trajfiles)
void setViaPoints(string whichDMP, double canVal, Ice::DoubleSeq viaPoint)
void runDMP(Ice::DoubleSeq leftGoals, Ice::DoubleSeq rightGoals)
This file offers overloads of toIce() and fromIce() functions for STL container types.