ControllerInterface.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/units/RobotUnit/NJointController.ice>
26 #include <RobotAPI/interface/core/Trajectory.ice>
27 
28 module armarx
29 {
30  class NJointBimanualCCDMPControllerConfig 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  string defautLeader = "Left";
49 
50  Ice::FloatSeq leftDesiredJointValues;
51  Ice::FloatSeq rightDesiredJointValues;
52 
53  // float KoriFollower = 1;
54  // float KposFollower = 1;
55 
56  double maxLinearVel;
57  double maxAngularVel;
58 
59  Ice::FloatSeq leftKpos;
60  Ice::FloatSeq leftDpos;
61  Ice::FloatSeq leftKori;
62  Ice::FloatSeq leftDori;
63 
64  Ice::FloatSeq rightKpos;
65  Ice::FloatSeq rightDpos;
66  Ice::FloatSeq rightKori;
67  Ice::FloatSeq rightDori;
68 
69  float knull;
70  float dnull;
71 
72  float torqueLimit;
73 
75 
76  // Ice::FloatSeq Kpf;
77  // Ice::FloatSeq Kif;
78  // Ice::FloatSeq DesiredForce;
79 
80  // float BoxWidth;
81 
82  // float FilterTimeConstant;
83 
84 
85  };
86 
87  interface NJointBimanualCCDMPControllerInterface extends NJointControllerInterface
88  {
89  void learnDMPFromFiles(string whichDMP, Ice::StringSeq trajfiles);
90  bool isFinished();
91  void runDMP(Ice::DoubleSeq leftGoals, Ice::DoubleSeq rightGoals);
92 
93  void setViaPoints(double canVal, Ice::DoubleSeq point);
94  void setGoals(Ice::DoubleSeq goals);
95 
96  void changeLeader();
97  double getVirtualTime();
98 
99  string getLeaderName();
100 
101  };
102 
103 
104  class NJointBimanualCCDMPVelocityControllerConfig extends NJointControllerConfig
105  {
106 
107  // dmp configuration
108  int kernelSize = 100;
109  string dmpMode = "MinimumJerk";
110  string dmpType = "Discrete";
111 
112  double timeDuration = 10;
113  string defautLeader = "Left";
114 
115  Ice::FloatSeq leftDesiredJointValues;
116  Ice::FloatSeq rightDesiredJointValues;
117 
120 
121  Ice::FloatSeq leftKpos;
122  Ice::FloatSeq leftDpos;
123  Ice::FloatSeq leftKori;
124  Ice::FloatSeq leftDori;
125 
126  Ice::FloatSeq rightKpos;
127  Ice::FloatSeq rightDpos;
128  Ice::FloatSeq rightKori;
129  Ice::FloatSeq rightDori;
130 
131  float knull;
132  float dnull;
133 
134  float maxJointVel;
135  Ice::DoubleSeq initRatio;
136  };
137 
138  interface NJointBimanualCCDMPVelocityControllerInterface extends NJointControllerInterface
139  {
140  void learnDMPFromFiles(string whichDMP, Ice::StringSeq trajfiles);
141  void learnDMPFromBothFiles(Ice::StringSeq leftFiles, Ice::StringSeq rightFiles);
142  bool isFinished();
143  void runDMP(Ice::DoubleSeq leftGoals, Ice::DoubleSeq rightGoals);
144 
145  void setRatios(Ice::DoubleSeq ratios);
146 
147  void setViaPoints(double canVal, Ice::DoubleSeq point);
148  void setGoals(Ice::DoubleSeq goals);
149 
150  void changeLeader();
151  double getVirtualTime();
152 
153  string getLeaderName();
154  };
155 
156 };
157 
armarx::NJointBimanualCCDMPControllerConfig::torqueLimit
float torqueLimit
Definition: ControllerInterface.ice:72
armarx::NJointBimanualCCDMPControllerConfig::leftKori
Ice::FloatSeq leftKori
Definition: ControllerInterface.ice:61
armarx::NJointBimanualCCDMPControllerConfig::leftKpos
Ice::FloatSeq leftKpos
Definition: ControllerInterface.ice:59
armarx::NJointBimanualCCDMPVelocityControllerConfig::leftKpos
Ice::FloatSeq leftKpos
Definition: ControllerInterface.ice:121
armarx::NJointBimanualCCDMPControllerConfig
Definition: ControllerInterface.ice:30
armarx::NJointBimanualCCDMPVelocityControllerConfig::rightDesiredJointValues
Ice::FloatSeq rightDesiredJointValues
Definition: ControllerInterface.ice:116
armarx::NJointBimanualCCDMPVelocityControllerConfig::initRatio
Ice::DoubleSeq initRatio
Definition: ControllerInterface.ice:135
armarx::NJointBimanualCCDMPControllerConfig::maxAngularVel
double maxAngularVel
Definition: ControllerInterface.ice:57
armarx::NJointBimanualCCDMPVelocityControllerConfig::dnull
float dnull
Definition: ControllerInterface.ice:132
armarx::NJointBimanualCCDMPControllerConfig::rightKpos
Ice::FloatSeq rightKpos
Definition: ControllerInterface.ice:64
armarx::NJointBimanualCCDMPVelocityControllerConfig::leftDori
Ice::FloatSeq leftDori
Definition: ControllerInterface.ice:124
armarx::NJointBimanualCCDMPVelocityControllerConfig::leftDpos
Ice::FloatSeq leftDpos
Definition: ControllerInterface.ice:122
armarx::NJointBimanualCCDMPControllerConfig::knull
float knull
Definition: ControllerInterface.ice:69
armarx::NJointBimanualCCDMPControllerConfig::leftDori
Ice::FloatSeq leftDori
Definition: ControllerInterface.ice:62
armarx::NJointBimanualCCDMPVelocityControllerConfig::maxLinearVel
float maxLinearVel
Definition: ControllerInterface.ice:118
armarx::NJointBimanualCCDMPVelocityControllerInterface
Definition: ControllerInterface.ice:138
armarx::NJointBimanualCCDMPVelocityControllerConfig::rightKpos
Ice::FloatSeq rightKpos
Definition: ControllerInterface.ice:126
armarx::NJointBimanualCCDMPControllerConfig::rightDpos
Ice::FloatSeq rightDpos
Definition: ControllerInterface.ice:65
armarx::NJointBimanualCCDMPVelocityControllerConfig::rightDori
Ice::FloatSeq rightDori
Definition: ControllerInterface.ice:129
armarx::NJointBimanualCCDMPVelocityControllerConfig::leftKori
Ice::FloatSeq leftKori
Definition: ControllerInterface.ice:123
armarx::NJointBimanualCCDMPVelocityControllerConfig::rightKori
Ice::FloatSeq rightKori
Definition: ControllerInterface.ice:128
armarx::NJointBimanualCCDMPControllerConfig::rightKori
Ice::FloatSeq rightKori
Definition: ControllerInterface.ice:66
armarx::NJointBimanualCCDMPControllerConfig::leftDesiredJointValues
Ice::FloatSeq leftDesiredJointValues
Definition: ControllerInterface.ice:50
armarx::NJointBimanualCCDMPVelocityControllerConfig::leftDesiredJointValues
Ice::FloatSeq leftDesiredJointValues
Definition: ControllerInterface.ice:115
armarx::NJointBimanualCCDMPControllerConfig::leftDpos
Ice::FloatSeq leftDpos
Definition: ControllerInterface.ice:60
armarx::NJointBimanualCCDMPVelocityControllerConfig::rightDpos
Ice::FloatSeq rightDpos
Definition: ControllerInterface.ice:127
armarx::NJointBimanualCCDMPVelocityControllerConfig::knull
float knull
Definition: ControllerInterface.ice:131
armarx::NJointBimanualCCDMPControllerInterface
Definition: ControllerInterface.ice:87
armarx::NJointBimanualCCDMPControllerConfig::maxLinearVel
double maxLinearVel
Definition: ControllerInterface.ice:56
armarx::NJointBimanualCCDMPVelocityControllerConfig::maxJointVel
float maxJointVel
Definition: ControllerInterface.ice:134
armarx::NJointBimanualCCDMPControllerConfig::rightDori
Ice::FloatSeq rightDori
Definition: ControllerInterface.ice:67
armarx::NJointBimanualCCDMPControllerConfig::startReduceTorque
float startReduceTorque
Definition: ControllerInterface.ice:74
armarx::NJointBimanualCCDMPControllerConfig::rightDesiredJointValues
Ice::FloatSeq rightDesiredJointValues
Definition: ControllerInterface.ice:51
armarx::NJointBimanualCCDMPControllerConfig::dnull
float dnull
Definition: ControllerInterface.ice:70
armarx::NJointBimanualCCDMPVelocityControllerConfig::maxAngularVel
float maxAngularVel
Definition: ControllerInterface.ice:119
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::NJointBimanualCCDMPVelocityControllerConfig
Definition: ControllerInterface.ice:104