24 #include <VirtualRobot/RobotNodeSet.h>
26 #include <armarx/control/common/mp/MPPoolInterface.h>
27 #include <armarx/control/common/mp/aron/MPConfig.aron.generated.h>
30 #include <mplib/representation/vmp/PrincipalComponentVMP.h>
34 BETTER_ENUM(mpClass,
int, JSMP, JSVelMP, TSMP, TSVelMP, KeypointsMP)
36 using namespace arondto;
53 void runMPs(
const bool rtSafe);
54 void createMPs(
const MPListConfig& mpListConfig);
55 void reconfigureMPs(
const MPListConfig& mpListConfig);
59 std::string getNames(
const Ice::Current& iceCurrent = Ice::emptyCurrent)
override;
63 getMPConfig(
const Ice::Current& iceCurrent = Ice::emptyCurrent)
override;
65 const Ice::Current& iceCurrent = Ice::emptyCurrent)
override;
67 const std::map<std::string, VirtualRobot::RobotNodeSetPtr>& rnsMap);
70 void start(
const std::string& mpName =
"all",
71 const DVec& startVec = std::vector<double>(),
72 const DVec& goalVec = std::vector<double>(),
74 const Ice::Current& iceCurrent = Ice::emptyCurrent)
override;
75 void startAll(
const Ice::Current& iceCurrent = Ice::emptyCurrent)
override;
79 const ::Ice::Current& iceCurrent = ::Ice::emptyCurrent)
override;
81 void stop(
const std::string& mpName =
"all",
82 const Ice::Current& iceCurrent = Ice::emptyCurrent)
override;
83 void stopAll(
const Ice::Current& iceCurrent = Ice::emptyCurrent)
override;
84 void pause(
const std::string& mpName =
"all",
85 const Ice::Current& iceCurrent = Ice::emptyCurrent)
override;
86 void pauseAll(
const Ice::Current& iceCurrent = Ice::emptyCurrent)
override;
87 void resume(
const std::string& mpName =
"all",
88 const Ice::Current& iceCurrent = Ice::emptyCurrent)
override;
89 void resumeAll(
const Ice::Current& iceCurrent = Ice::emptyCurrent)
override;
90 void reset(
const std::string& mpName =
"all",
91 const Ice::Current& iceCurrent = Ice::emptyCurrent)
override;
92 void resetAll(
const Ice::Current& iceCurrent = Ice::emptyCurrent)
override;
93 bool isFinished(
const std::string& mpName =
"all",
94 const Ice::Current& iceCurrent = Ice::emptyCurrent)
override;
95 bool isFinishedAll(
const Ice::Current& iceCurrent = Ice::emptyCurrent)
override;
98 void learnFromCSV(
const Ice::StringSeq& fileNames = std::vector<std::string>(),
99 const Ice::Current& iceCurrent = Ice::emptyCurrent)
override;
101 const Ice::Current& iceCurrent = Ice::emptyCurrent)
override;
102 void trainMP(
const Ice::Current& iceCurrent = Ice::emptyCurrent)
override;
104 void setGoal(
const DVec& goals,
105 const Ice::Current& iceCurrent = Ice::emptyCurrent)
override;
106 void setStartAndGoal(
const DVec& starts,
108 const Ice::Current& iceCurrent = Ice::emptyCurrent)
override;
110 const DVec& viapoint,
111 const Ice::Current& iceCurrent = Ice::emptyCurrent)
override;
112 void removeAllViaPoint(
const Ice::Current& iceCurrent = Ice::emptyCurrent)
override;
117 std::string serialize(
const Ice::Current& iceCurrent = Ice::emptyCurrent)
override;
118 DVec deserialize(
const std::string&,
119 const Ice::Current& iceCurrent = Ice::emptyCurrent)
override;
123 const Ice::Current& iceCurrent = Ice::emptyCurrent)
override;
124 bool getMPEnabled(
const Ice::Current&)
override;
127 std::map<std::string, MPInputOutput>
mps;
129 std::atomic<bool> isMPReady{
false};
136 reInitMPInputOutputData(
const std::map<std::string, VirtualRobot::RobotNodeSetPtr>& rnsMap);
138 std::atomic_bool mpTaskRunning{
false};