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/core/Trajectory.ice>
26 #include <RobotAPI/interface/units/RobotUnit/NJointController.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  interface NJointBimanualCCDMPControllerInterface extends NJointControllerInterface
86  {
87  void learnDMPFromFiles(string whichDMP, Ice::StringSeq trajfiles);
88  bool isFinished();
89  void runDMP(Ice::DoubleSeq leftGoals, Ice::DoubleSeq rightGoals);
90 
91  void setViaPoints(double canVal, Ice::DoubleSeq point);
92  void setGoals(Ice::DoubleSeq goals);
93 
94  void changeLeader();
95  double getVirtualTime();
96 
97  string getLeaderName();
98  };
99 
100  class NJointBimanualCCDMPVelocityControllerConfig extends NJointControllerConfig
101  {
102 
103  // dmp configuration
104  int kernelSize = 100;
105  string dmpMode = "MinimumJerk";
106  string dmpType = "Discrete";
107 
108  double timeDuration = 10;
109  string defautLeader = "Left";
110 
111  Ice::FloatSeq leftDesiredJointValues;
112  Ice::FloatSeq rightDesiredJointValues;
113 
116 
117  Ice::FloatSeq leftKpos;
118  Ice::FloatSeq leftDpos;
119  Ice::FloatSeq leftKori;
120  Ice::FloatSeq leftDori;
121 
122  Ice::FloatSeq rightKpos;
123  Ice::FloatSeq rightDpos;
124  Ice::FloatSeq rightKori;
125  Ice::FloatSeq rightDori;
126 
127  float knull;
128  float dnull;
129 
130  float maxJointVel;
131  Ice::DoubleSeq initRatio;
132  };
133 
134  interface NJointBimanualCCDMPVelocityControllerInterface extends NJointControllerInterface
135  {
136  void learnDMPFromFiles(string whichDMP, Ice::StringSeq trajfiles);
137  void learnDMPFromBothFiles(Ice::StringSeq leftFiles, Ice::StringSeq rightFiles);
138  bool isFinished();
139  void runDMP(Ice::DoubleSeq leftGoals, Ice::DoubleSeq rightGoals);
140 
141  void setRatios(Ice::DoubleSeq ratios);
142 
143  void setViaPoints(double canVal, Ice::DoubleSeq point);
144  void setGoals(Ice::DoubleSeq goals);
145 
146  void changeLeader();
147  double getVirtualTime();
148 
149  string getLeaderName();
150  };
151 };
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:117
armarx::NJointBimanualCCDMPControllerConfig
Definition: ControllerInterface.ice:30
armarx::NJointBimanualCCDMPVelocityControllerConfig::rightDesiredJointValues
Ice::FloatSeq rightDesiredJointValues
Definition: ControllerInterface.ice:112
armarx::NJointBimanualCCDMPVelocityControllerConfig::initRatio
Ice::DoubleSeq initRatio
Definition: ControllerInterface.ice:131
armarx::NJointBimanualCCDMPControllerConfig::maxAngularVel
double maxAngularVel
Definition: ControllerInterface.ice:57
armarx::NJointBimanualCCDMPVelocityControllerConfig::dnull
float dnull
Definition: ControllerInterface.ice:128
armarx::NJointBimanualCCDMPControllerConfig::rightKpos
Ice::FloatSeq rightKpos
Definition: ControllerInterface.ice:64
armarx::NJointBimanualCCDMPVelocityControllerConfig::leftDori
Ice::FloatSeq leftDori
Definition: ControllerInterface.ice:120
armarx::NJointBimanualCCDMPVelocityControllerConfig::leftDpos
Ice::FloatSeq leftDpos
Definition: ControllerInterface.ice:118
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:114
armarx::NJointBimanualCCDMPVelocityControllerInterface
Definition: ControllerInterface.ice:134
armarx::NJointBimanualCCDMPVelocityControllerConfig::rightKpos
Ice::FloatSeq rightKpos
Definition: ControllerInterface.ice:122
armarx::NJointBimanualCCDMPControllerConfig::rightDpos
Ice::FloatSeq rightDpos
Definition: ControllerInterface.ice:65
armarx::NJointBimanualCCDMPVelocityControllerConfig::rightDori
Ice::FloatSeq rightDori
Definition: ControllerInterface.ice:125
armarx::NJointBimanualCCDMPVelocityControllerConfig::leftKori
Ice::FloatSeq leftKori
Definition: ControllerInterface.ice:119
armarx::NJointBimanualCCDMPVelocityControllerConfig::rightKori
Ice::FloatSeq rightKori
Definition: ControllerInterface.ice:124
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:111
armarx::NJointBimanualCCDMPControllerConfig::leftDpos
Ice::FloatSeq leftDpos
Definition: ControllerInterface.ice:60
armarx::NJointBimanualCCDMPVelocityControllerConfig::rightDpos
Ice::FloatSeq rightDpos
Definition: ControllerInterface.ice:123
armarx::NJointBimanualCCDMPVelocityControllerConfig::knull
float knull
Definition: ControllerInterface.ice:127
armarx::NJointBimanualCCDMPControllerInterface
Definition: ControllerInterface.ice:85
armarx::NJointBimanualCCDMPControllerConfig::maxLinearVel
double maxLinearVel
Definition: ControllerInterface.ice:56
armarx::NJointBimanualCCDMPVelocityControllerConfig::maxJointVel
float maxJointVel
Definition: ControllerInterface.ice:130
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:115
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27
armarx::NJointBimanualCCDMPVelocityControllerConfig
Definition: ControllerInterface.ice:100