MPPoolInterface.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 
27 #include <RobotAPI/interface/aron.ice>
28 #include <RobotAPI/interface/core/Trajectory.ice>
29 #include <RobotAPI/interface/units/RobotUnit/NJointController.ice>
30 
31 
32 module armarx
33 {
34  dictionary<string, Ice::DoubleSeq> StringDoubleSeqMap;
35  dictionary<string, double> StringDoubleMap;
36  sequence<armarx::aron::data::dto::Dict> AronSeq;
37 
38 interface MPPoolInterface /* extends NJointControllerInterface*/
39  {
40  string getNames();
41 
42  /// control
43  void
44  set(StringDoubleSeqMap startVec, StringDoubleSeqMap goalVec, StringDoubleMap durationSec);
45  void
46  start(string mpName, Ice::DoubleSeq startVec, Ice::DoubleSeq goalVec, double durationSec);
47  void stop(string mpName);
48  void pause(string mpName);
49  void resume(string mpName);
50  void reset(string mpName);
51  bool isFinished(string mpName);
52 
53  void startAll();
54  void stopAll();
55  void pauseAll();
56  void resumeAll();
57  void resetAll();
58  bool isFinishedAll();
59 
60  /// setting
61  void learnFromCSV(Ice::StringSeq fileNames);
62  void learnFromTrajs(armarx::aron::data::dto::Dict config);
63  void trainMP();
64 
65  void setGoal(Ice::DoubleSeq goals);
66  void setStartAndGoal(Ice::DoubleSeq starts, Ice::DoubleSeq goals);
67  void setViaPoint(double u, Ice::DoubleSeq viapoint);
68  void removeAllViaPoint();
69 
70  /// serialze
71  // void setWeight(Ice::DoubleSeqSeq weights);
72  // Ice::DoubleSeqSeq getWeight();
73  string serialize();
74  Ice::DoubleSeq deserialize(string mpAsString);
75 
76  /// utilities
77  double getCanVal(string mpName);
78  bool getMPEnabled();
79 
80  /// config
81  void updateMPConfig(armarx::aron::data::dto::Dict config);
82  armarx::aron::data::dto::Dict getMPConfig();
83  };
84 };
armarx::MPPoolInterface
Definition: MPPoolInterface.ice:38
armarx::AronSeq
sequence< armarx::aron::data::dto::Dict > AronSeq
Definition: MPPoolInterface.ice:36
armarx::StringDoubleMap
dictionary< string, double > StringDoubleMap
Definition: MPPoolInterface.ice:35
armarx::StringDoubleSeqMap
dictionary< string, Ice::DoubleSeq > StringDoubleSeqMap
Definition: MPPoolInterface.ice:34
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28