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
32module 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 requestStop(string mpName);
49 void pause(string mpName);
50 void resume(string mpName);
51 void reset(string mpName);
52 bool isFinished(string mpName);
53
54 void startAll();
55 void stopAll();
56 void pauseAll();
57 void resumeAll();
58 void resetAll();
60
61 /// setting
62 void learnFromCSV(Ice::StringSeq fileNames);
63 void learnFromTrajs(armarx::aron::data::dto::Dict config);
64 void trainMP();
65
66 void setGoal(Ice::DoubleSeq goals);
67 void setStartAndGoal(Ice::DoubleSeq starts, Ice::DoubleSeq goals);
68 void setViaPoint(double u, Ice::DoubleSeq viapoint);
70
71 /// serialze
72 // void setWeight(Ice::DoubleSeqSeq weights);
73 // Ice::DoubleSeqSeq getWeight();
74 string serialize();
75 Ice::DoubleSeq deserialize(string mpAsString);
76
77 /// utilities
78 double getCanVal(string mpName);
80
81 /// config
82 void updateMPConfig(armarx::aron::data::dto::Dict config);
83 armarx::aron::data::dto::Dict getMPConfig();
84 };
85};
void setViaPoint(double u, Ice::DoubleSeq viapoint)
void setStartAndGoal(Ice::DoubleSeq starts, Ice::DoubleSeq goals)
void learnFromCSV(Ice::StringSeq fileNames)
setting
void stop(string mpName)
void reset(string mpName)
void requestStop(string mpName)
armarx::aron::data::dto::Dict getMPConfig()
Ice::DoubleSeq deserialize(string mpAsString)
void learnFromTrajs(armarx::aron::data::dto::Dict config)
string serialize()
serialze
void setGoal(Ice::DoubleSeq goals)
double getCanVal(string mpName)
utilities
void resume(string mpName)
void pause(string mpName)
void updateMPConfig(armarx::aron::data::dto::Dict config)
config
void start(string mpName, Ice::DoubleSeq startVec, Ice::DoubleSeq goalVec, double durationSec)
bool isFinished(string mpName)
This file offers overloads of toIce() and fromIce() functions for STL container types.
sequence< armarx::aron::data::dto::Dict > AronSeq
dictionary< string, Ice::DoubleSeq > StringDoubleSeqMap
dictionary< string, double > StringDoubleMap