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 RobotControllers::RobotNJointControllersInterface
17  * @author Jianfeng Gao ( jianfeng dot gao at kit dot edu )
18  * @date 2021
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
23 #pragma once
24 
25 #include <ArmarXCore/interface/core/BasicTypes.ice>
26 #include <ArmarXCore/interface/serialization/Eigen.ice>
27 #include <RobotAPI/interface/units/RobotUnit/NJointController.ice>
28 #include <RobotAPI/interface/core/Trajectory.ice>
31 #include <armarx/control/interface/ConfigurableNJointControllerInterface.ice>
32 
33 
34 module armarx{ module control {
35  // /**
36  // * This is used by the NJointTaskspaceMPControllers like the impedance and admittance controller
37  // */
38  // class ConfigurableNJointMPControllerConfig extends ConfigurableNJointControllerConfig
39  // {
40  // armarx::aron::data::dto::Dict mpConfig;
41  // };
42  // module NJointMultiMPControllerMode
43  // {
44  // enum CartesianSelection
45  // {
46  // ePosition = 7,
47  // eOrientation = 8,
48  // eAll = 15
49  // };
50  // };
51 
52 
53  // class NJointMultiMPControllerConfig extends NJointControllerConfig
54  // {
55  //
56  // // dmp configuration
57  // float DMPKd = 20;
58  // int kernelSize = 100;
59  // double tau = 1;
60  // string dmpMode = "MinimumJerk";
61  // string dmpStyle = "Discrete";
62  // double dmpAmplitude = 1;
63  //
64  // double phaseL = 10;
65  // double phaseK = 10;
66  // double phaseDist0 = 50;
67  // double phaseDist1 = 10;
68  // double phaseKpPos = 1;
69  // double phaseKpOri = 0.1;
70  // double timeDuration = 10;
71  // double posToOriRatio = 100;
72  //
73  // // velocity controller configuration
74  // string nodeSetName = "";
75  // string tcpName = "";
76  // NJointMultiMPControllerMode::CartesianSelection mode = NJointMultiMPControllerMode::CartesianSelection::eAll;
77  //
78  // double maxLinearVel;
79  // double maxAngularVel;
80  // double maxJointVelocity;
81  // string debugName;
82  //
83  // float Kp_LinearVel;
84  // float Kd_LinearVel;
85  // float Kp_AngularVel;
86  // float Kd_AngularVel;
87  //
88  // float vel_filter;
89  //
90  // int jsDMPKernelSize = 100;
91  // int jsDMPBaseMode = 1;
92  // double jsDMPPhaseL = 10;
93  // double jsDMPPhaseK = 10;
94  // double jsDMPPhaseDist0 = 0.3;
95  // double jsDMPPhaseDist1 = 0.1;
96  // double jsDMPPhaseKp = 1;
97  // bool isPhaseStop = false;
98  // Ice::StringSeq jointNamesJSDMP;
99  // };
100 
101 
102  // interface NJointMultiMPControllerInterface extends NJointControllerInterface
103  // {
104  // void learnTSDMPFromFiles(Ice::StringSeq trajfiles);
105  // void learnJSDMPFromFiles(Ice::StringSeq trajfiles);
106  // bool isFinished();
107  // void runDMP(Ice::DoubleSeq goalsTS, Ice::DoubleSeq goalsJS, double times);
108  // void runDMPWithTime(Ice::DoubleSeq goals, double time);
109  //
110  // void setSpeed(double times);
111  // void setViaPoints(double canVal, Ice::DoubleSeq point);
112  // void setViaPointsJS(double canVal, double point);
113  // void removeAllViaPoints();
114  // void setGoalsTS(Ice::DoubleSeq goals);
115  // void setGoalsJS(Ice::DoubleSeq goals);
116  //
117  // double getCanVal();
118  // void resetDMP();
119  // void stopDMP();
120  // void pauseDMP();
121  // void resumeDMP();
122  //
123  // void setControllerTarget(float avoidJointLimitsKp, NJointMultiMPControllerMode::CartesianSelection mode);
124  // void setTorqueKp(StringFloatDictionary torqueKp);
125  // void setNullspaceJointVelocities(StringFloatDictionary nullspaceJointVelocities);
126  // string getTSDMPAsString();
127  // Ice::DoubleSeq createTSDMPFromString(string dmpString);
128  // string getJSDMPAsString();
129  // Ice::DoubleSeq createJSDMPFromString(string dmpString);
130  //
131  // };
132 
133 
134  // class KeypointMPControllerConfig extends NJointTaskspaceAdmittanceControllerConfig
135  // {
136  // // dmp configuration
137  // int numKeypoints;
138  // string controlParamJsonFile = "";
139  //
140  // float keypointKp;
141  // float keypointKi;
142  // float keypointKd;
143  // float maxControlValue;
144  // float maxDerivation;
145  // float filterCoeff;
146  // bool isRigid;
147  // Eigen::VectorXf pointCtrlMask;
148  // Eigen::VectorXf initialKeypointPosition;
149  // };
150 
151 
152  // interface KeypointMPControllerInterface extends NJointTaskspaceAdmittanceControllerInterface, MPPoolInterface
153  // {
154  // void setKeypoints(Eigen::VectorXf xyz);
155  // void resetKeypoints(int n_points, float keypoint_stiffness, bool is_rigid, Eigen::VectorXf ctrl_mask, Eigen::VectorXf init_keypoints_position);
156  // void toggleMP(bool enableMP);
157  // };
158 
160  {};
161 
163  {};
164 
165  // interface NJointKeypointsAdmittanceMPControllerInterface extends NJointKeypointsAdmittanceControllerInterface, MPPoolInterface
166  // {};
167 
168  // interface NJointKeypointsImpedanceMPControllerInterface extends NJointKeypointsImpedanceControllerInterface, MPPoolInterface
169  // {};
170 
172  {
173  void setCurveProjection(Eigen::Vector3f curve_proj_point, float proj_value, Eigen::Vector3f curve_vec);
174  Eigen::Vector3f getCurveKeypointPosition();
175  };
176 }; /// control
177 }; /// armarx
ControllerInterface.ice
armarx::control::NJointTaskspaceImpedanceControllerInterface
Definition: ControllerInterface.ice:35
armarx::control::NJointTSAdmittanceMPControllerInterface
Definition: ControllerInterface.ice:159
armarx::MPPoolInterface
Definition: MPPoolInterface.ice:32
armarx::control::NJointTSImpedanceMPControllerInterface
Definition: ControllerInterface.ice:162
MPPoolInterface.ice
armarx::control::NJointKeypointsImpedanceControllerInterface
Definition: ControllerInterface.ice:54
armarx::control::NJointTaskspaceAdmittanceControllerInterface
Definition: ControllerInterface.ice:41
control
This file is part of ArmarX.
armarx::control::NJointKVILImpedanceMPControllerInterface
Definition: ControllerInterface.ice:171
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28