TaskSpaceImpedanceDMPControllerInterface.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 Christoph Pohl ( christoph dot pohl 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 <RobotAPI/interface/units/RobotUnit/NJointController.ice>
26 
27 #include <ArmarXCore/interface/serialization/Eigen.ice>
28 
29 module armarx
30 {
31  class NJointTaskSpaceImpedanceDMPControllerConfig extends NJointControllerConfig
32  {
33 
34  // dmp configuration
35  int kernelSize = 100;
36  string dmpMode = "MinimumJerk";
37  string dmpType = "Discrete";
38  double timeDuration;
39  string nodeSetName;
40 
41  // phaseStop technique
42  double phaseL = 10;
43  double phaseK = 10;
44  double phaseDist0 = 50;
45  double phaseDist1 = 10;
46  double posToOriRatio = 100;
47 
48 
49  Ice::FloatSeq Kpos;
50  Ice::FloatSeq Dpos;
51  Ice::FloatSeq Kori;
52  Ice::FloatSeq Dori;
53 
54  Ice::FloatSeq Knull;
55  Ice::FloatSeq Dnull;
56 
59 
60  float torqueLimit;
61 
62 
65  float forceFilter;
67  Eigen::Vector3f forceThreshold;
68  string forceFrameName = "ArmR8_Wri2";
69  };
70 
71  interface NJointTaskSpaceImpedanceDMPControllerInterface extends NJointControllerInterface
72  {
73  void learnDMPFromFiles(Ice::StringSeq trajfiles);
74  void learnJointDMPFromFiles(string jointTrajFile, Ice::FloatSeq currentJVS);
75  void setUseNullSpaceJointDMP(bool enable);
76 
77  bool isFinished();
78  bool isDMPRunning();
79  void runDMP(Ice::DoubleSeq goals);
80  void runDMPWithTime(Ice::DoubleSeq goals, double timeDuration);
81 
82  void setViaPoints(double canVal, Ice::DoubleSeq point);
83  void setGoals(Ice::DoubleSeq goals);
84  void setDefaultNullSpaceJointValues(Eigen::VectorXf jointValues);
85 
86  double getVirtualTime();
87 
88  void resetDMP();
89  void stopDMP();
90  void resumeDMP();
91  void removeAllViaPoints();
92 
93  void setMPWeights(DoubleSeqSeq weights);
94  DoubleSeqSeq getMPWeights();
95 
96  void setLinearVelocityKd(Eigen::Vector3f kd);
97  void setLinearVelocityKp(Eigen::Vector3f kp);
98  void setAngularVelocityKd(Eigen::Vector3f kd);
99  void setAngularVelocityKp(Eigen::Vector3f kp);
100  void setNullspaceVelocityKd(Eigen::VectorXf jointValues);
101  void setNullspaceVelocityKp(Eigen::VectorXf jointValues);
102 
103  void enableForceStop();
104  void disableForceStop();
105  void setForceThreshold(Eigen::Vector3f forceThreshold);
106  };
107 }
armarx::NJointTaskSpaceImpedanceDMPControllerConfig::Kori
Ice::FloatSeq Kori
Definition: TaskSpaceImpedanceDMPControllerInterface.ice:51
armarx::NJointTaskSpaceImpedanceDMPControllerConfig::nodeSetName
string nodeSetName
Definition: TaskSpaceImpedanceDMPControllerInterface.ice:39
armarx::NJointTaskSpaceImpedanceDMPControllerConfig::Dnull
Ice::FloatSeq Dnull
Definition: TaskSpaceImpedanceDMPControllerInterface.ice:55
armarx::NJointTaskSpaceImpedanceDMPControllerConfig::defaultNullSpaceJointValues
Ice::FloatSeq defaultNullSpaceJointValues
Definition: TaskSpaceImpedanceDMPControllerInterface.ice:58
armarx::NJointTaskSpaceImpedanceDMPControllerConfig
Definition: TaskSpaceImpedanceDMPControllerInterface.ice:31
armarx::NJointTaskSpaceImpedanceDMPControllerConfig::Dpos
Ice::FloatSeq Dpos
Definition: TaskSpaceImpedanceDMPControllerInterface.ice:50
armarx::NJointTaskSpaceImpedanceDMPControllerConfig::forceSensorName
string forceSensorName
Definition: TaskSpaceImpedanceDMPControllerInterface.ice:63
armarx::NJointTaskSpaceImpedanceDMPControllerConfig::Kpos
Ice::FloatSeq Kpos
Definition: TaskSpaceImpedanceDMPControllerInterface.ice:49
armarx::NJointTaskSpaceImpedanceDMPControllerConfig::forceDeadZone
float forceDeadZone
Definition: TaskSpaceImpedanceDMPControllerInterface.ice:66
armarx::NJointTaskSpaceImpedanceDMPControllerConfig::useNullSpaceJointDMP
bool useNullSpaceJointDMP
Definition: TaskSpaceImpedanceDMPControllerInterface.ice:57
armarx::NJointTaskSpaceImpedanceDMPControllerConfig::Knull
Ice::FloatSeq Knull
Definition: TaskSpaceImpedanceDMPControllerInterface.ice:54
armarx::NJointTaskSpaceImpedanceDMPControllerConfig::torqueLimit
float torqueLimit
Definition: TaskSpaceImpedanceDMPControllerInterface.ice:60
armarx::NJointTaskSpaceImpedanceDMPControllerConfig::Dori
Ice::FloatSeq Dori
Definition: TaskSpaceImpedanceDMPControllerInterface.ice:52
armarx::NJointTaskSpaceImpedanceDMPControllerConfig::waitTimeForCalibration
float waitTimeForCalibration
Definition: TaskSpaceImpedanceDMPControllerInterface.ice:64
armarx::NJointTaskSpaceImpedanceDMPControllerInterface
Definition: TaskSpaceImpedanceDMPControllerInterface.ice:71
armarx::NJointTaskSpaceImpedanceDMPControllerConfig::forceFilter
float forceFilter
Definition: TaskSpaceImpedanceDMPControllerInterface.ice:65
armarx::NJointTaskSpaceImpedanceDMPControllerConfig::timeDuration
double timeDuration
Definition: TaskSpaceImpedanceDMPControllerInterface.ice:38
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::NJointTaskSpaceImpedanceDMPControllerConfig::forceThreshold
Eigen::Vector3f forceThreshold
Definition: TaskSpaceImpedanceDMPControllerInterface.ice:67