MPPool.cpp
Go to the documentation of this file.
1 #include "MPPool.h"
2 
3 #include <SimoxUtility/json.h>
4 
7 
9 #include <armarx/control/common/mp/aron/MPConfig.aron.generated.h>
10 
11 #include "../utils.h"
12 #include "JSMP.h"
13 #include "KeypointsMP.h"
14 #include "TSMP.h"
15 
17 {
18 
19  void
20  MPPool::createMPs(const MPListConfig& mpListConfig)
21  {
22  ARMARX_INFO << "----------------------------------- creating MPs "
23  "-------------------------------------------------";
24  ARMARX_INFO << " -- in MPPool, we have " << mpListConfig.mpList.size() << " MPs";
25 
26  int index = 0;
27  for (const MPConfig& c : mpListConfig.mpList)
28  {
29  auto className = mpClass::_from_string_nocase(c.className.c_str());
30  ARMARX_INFO << "-- (" << index << ") creating MP with name " << c.name
31  << "\n---- class: " << c.className << "\n---- type: " << c.mpTypeString
32  << "\n---- mode: " << c.mpMode << "\n---- style: " << c.mpStyle;
33  index++;
34  switch (className)
35  {
36  case mpClass::JSMP:
37  {
38  JSMPPtr jsmp(new JSMP(c));
39  JSMPInputPtr in(new JSMPInput());
40  JSMPOutputPtr out(new JSMPOutput());
41  mps.insert({c.name, {jsmp, in, out}});
42  break;
43  }
44  case mpClass::JSVelMP:
45  break;
46  case mpClass::TSMP:
47  {
48  TSMPPtr tsmp(new TSMP(c));
49  TSMPInputPtr in(new TSMPInput());
50  TSMPOutputPtr out(new TSMPOutput());
51  mps.insert({c.name, {tsmp, in, out}});
52  break;
53  }
54  case mpClass::KeypointsMP:
55  {
56  KeypointsMPPtr tsmp(new KeypointsMP(c));
59  mps.insert({c.name, {tsmp, in, out}});
60  break;
61  }
62  case mpClass::TSVelMP:
63  break;
64  default:
65  ARMARX_WARNING << "unsupported MP class: " << c.className
66  << "\nsupported names include: "
67  "JSMP, JSVelMP, TSMP, TSVelMP, KeypointsMP";
68  break;
69  }
70  }
71  ARMARX_INFO << "---------------------------------- All MPs created "
72  "-----------------------------------------------";
73  }
74 
75  void
76  MPPool::reconfigureMPs(const MPListConfig& mpListConfig)
77  {
78  mps.clear();
79  createMPs(mpListConfig);
80  }
81 
82  void
83  MPPool::runMPs(const bool rtSafe)
84  {
85  for (auto& mp : mps)
86  {
87  if (rtSafe or mp.second.mp->isFirstRun())
88  {
89  mp.second.mp->run(mp.second.input, mp.second.output);
90  }
91  }
92  }
93 
94  std::string
95  MPPool::getNames(const Ice::Current& iceCurrent)
96  {
97  std::string allMPs = "";
98  for (auto& mp : mps)
99  {
100  allMPs = allMPs + mp.second.mp->getMPName() + ", ";
101  }
102  return allMPs;
103  }
104 
105  void
108  const ::armarx::StringDoubleMap& durationSec,
109  const ::Ice::Current&)
110  {
111  for (auto& pair : mps)
112  {
113  auto it = durationSec.find(pair.first);
114  auto is = startVec.find(pair.first);
115  auto ig = goalVec.find(pair.first);
116 
117  if (it != durationSec.end())
118  {
119  if (it->second > 0.0)
120  {
121  pair.second.mp->setDurationSec(it->second);
122  }
123  }
124  if (is != startVec.end())
125  {
126  pair.second.mp->setStart(is->second);
127  }
128  if (ig != goalVec.end())
129  {
130  pair.second.mp->setGoal(ig->second);
131  }
132  }
133  }
134 
135  void
136  MPPool::startAll(const Ice::Current& iceCurrent)
137  {
138  start();
139  }
140 
141  void
142  MPPool::start(const std::string& mpName,
143  const DVec& startVec,
144  const DVec& goalVec,
145  Ice::Double timeDuration,
146  const Ice::Current& iceCurrent)
147  {
148  if (mpName == "all")
149  {
150  ARMARX_INFO << "--------------------------------------- start all MPs "
151  "---------------------------------------";
152  ARMARX_INFO << " -- To start all MPs at once, it's up to the user to configure the "
153  "start, goal and timeduration properly before this call.";
154  int index = 0;
155  for (auto& mp : mps)
156  {
157  ARMARX_INFO << " -- (" << index << ")-th MP: ";
158  mp.second.mp->start();
159  index++;
160  }
161  ARMARX_INFO << " -- all MPs started.";
162  }
163  else
164  {
165  auto search = mps.find(mpName);
166  if (search != mps.end())
167  {
168  if (timeDuration < 0.0)
169  {
170  search->second.mp->start(goalVec, startVec);
171  }
172  else
173  {
174  search->second.mp->start(goalVec, startVec, timeDuration);
175  }
176  }
177  else
178  {
179  ARMARX_ERROR << mpName
180  << " is not in the MP pool. Please check your configuration file";
181  }
182  }
183  // ARMARX_IMPORTANT << "starting mp" << VAROUT(mpName) << "with start: " << dVecToString(startVec) << " and goal: " << dVecToString(goalVec) << " for " << timeDuration << " seconds";
184  }
185 
186  void
187  MPPool::stopAll(const Ice::Current& iceCurrent)
188  {
189  stop();
190  }
191 
192  void
193  MPPool::stop(const std::string& mpName, const Ice::Current&)
194  {
195  if (mpName == "all")
196  {
197  for (auto& mp : mps)
198  {
199  mp.second.mp->stop();
200  }
201  }
202  else
203  {
204  auto search = mps.find(mpName);
205  if (search != mps.end())
206  {
207  search->second.mp->stop();
208  }
209  else
210  {
211  ARMARX_ERROR << mpName
212  << " is not in the MP pool. Please check your configuration file";
213  }
214  }
215  }
216 
217  void
218  MPPool::pauseAll(const Ice::Current& iceCurrent)
219  {
220  pause();
221  }
222 
223  void
224  MPPool::pause(const std::string& mpName, const Ice::Current&)
225  {
226  if (mpName == "all")
227  {
228  for (auto& mp : mps)
229  {
230  mp.second.mp->pause();
231  }
232  }
233  else
234  {
235  auto search = mps.find(mpName);
236  if (search != mps.end())
237  {
238  search->second.mp->pause();
239  }
240  else
241  {
242  ARMARX_ERROR << mpName
243  << " is not in the MP pool. Please check your configuration file";
244  }
245  }
246  }
247 
248  void
249  MPPool::resumeAll(const Ice::Current& iceCurrent)
250  {
251  resume();
252  }
253 
254  void
255  MPPool::resume(const std::string& mpName, const Ice::Current&)
256  {
257  if (mpName == "all")
258  {
259  for (auto& mp : mps)
260  {
261  mp.second.mp->resume();
262  }
263  }
264  else
265  {
266  auto search = mps.find(mpName);
267  if (search != mps.end())
268  {
269  search->second.mp->resume();
270  }
271  else
272  {
273  ARMARX_ERROR << mpName
274  << " is not in the MP pool. Please check your configuration file";
275  }
276  }
277  }
278 
279  void
280  MPPool::resetAll(const Ice::Current& iceCurrent)
281  {
282  reset();
283  }
284 
285  void
286  MPPool::reset(const std::string& mpName, const Ice::Current&)
287  {
288  if (mpName == "all")
289  {
290  for (auto& mp : mps)
291  {
292  mp.second.mp->reset();
293  }
294  }
295  else
296  {
297  auto search = mps.find(mpName);
298  if (search != mps.end())
299  {
300  search->second.mp->reset();
301  }
302  else
303  {
304  ARMARX_ERROR << mpName
305  << " is not in the MP pool. Please check your configuration file";
306  }
307  }
308  }
309 
310  bool
311  MPPool::isFinishedAll(const Ice::Current& iceCurrent)
312  {
313  return isFinished();
314  }
315 
316  bool
317  MPPool::isFinished(const std::string& mpName, const Ice::Current&)
318  {
319  if (mpName == "all")
320  {
321  for (auto& mp : mps)
322  {
323  if (!mp.second.mp->isFinished())
324  {
325  return false;
326  }
327  }
328  return true;
329  }
330  else
331  {
332  auto search = mps.find(mpName);
333  if (search != mps.end())
334  {
335  return search->second.mp->isFinished();
336  }
337  else
338  {
339  ARMARX_ERROR << mpName
340  << " is not in the MP pool. Please check your configuration file";
341  return true;
342  }
343  }
344  }
345 
346  void
347  MPPool::learnFromCSV(const Ice::StringSeq& fileNames, const Ice::Current& iceCurrent)
348  {
349  if (fileNames.size() > 0)
350  {
351  ARMARX_WARNING << "Be aware that the fileNames ice parameter is not yet used. "
352  << "Instead, set the file names in the MPConfig parameter of your "
353  << "previous ice interface call.";
354  }
355  ARMARX_INFO << "--------------------------------------- Train MPs "
356  "----------------------------------------------------";
357  for (auto& mp : mps)
358  {
359  mp.second.mp->learnFromCSV();
360  }
361  isMPReady.store(true);
362  ARMARX_INFO << "--------------------------------------- done "
363  "----------------------------------------------------";
364  }
365 
366  void
368  const Ice::Current& iceCurrent)
369  {
370  ARMARX_INFO << "--------------------------------------- Train MPs "
371  "----------------------------------------------------";
372 
373  // Convert parameter of ice interface call to business object
374  MultiMPTrajs trajsDict;
375  trajsDict.fromAron(dict);
376  // std::map<std::string, std::vector<arondto::MPTraj>> dto =
377  // arondto::MultiMPTrajs::FromAron(dict).data;
378  // // armarx::aron::fromAron<std::vector<arondto::MPTraj>, MPTrajs>(arondto::MultiMPTrajs::FromAron(dict), bo);
379  // armarx::aron::fromAron<std::string, std::vector<arondto::MPTraj>, std::string, MPTrajs>(
380  // dto, trajsDict);
381 
382  // MultiMPTrajs trajsDict = ::armarx::fromAronDict<arondto::MultiMPTrajs, MultiMPTrajs>(dict);
383 
384  if (trajsDict.data.empty())
385  {
386  ARMARX_INFO << "Learning from trajectories specified in MPConfig(s) rather than as an "
387  "ice parameter";
388  for (const auto& [mpName, mpInputOutput] : mps)
389  {
390  const auto& mpConfig = mpInputOutput.mp->getConfig();
391  ARMARX_CHECK(not mpConfig.trajectoryList.empty())
392  << "For MP " << mpName << ": No trajectories provided as parameter, "
393  << "and not trajectories specified in MPConfig.";
394  mpInputOutput.mp->learnFromTraj(mpConfig.trajectoryList);
395  }
396  }
397  else
398  {
399  for (const auto& [mpName, trajs] : trajsDict.data)
400  {
401  // Learn the MP identified by mpName from the trajectory list stored in
402  // trajsDict.at(mpName)
403  ARMARX_CHECK(mps.count(mpName))
404  << "Trajectories provided for unknown MP " << mpName;
405  ARMARX_CHECK(not trajs.empty())
406  << "Empty list of trajectories provided for MP " << mpName;
407  mps.at(mpName).mp->learnFromTraj(trajs);
408  }
409  }
410  // mark whole MP pool as ready
411  isMPReady.store(true);
412 
413  ARMARX_INFO << "--------------------------------------- done "
414  "----------------------------------------------------";
415  }
416 
417  void
418  MPPool::trainMP(const Ice::Current& iceCurrent)
419  {
420  for (auto& mp : mps)
421  {
422  mp.second.mp->trainMP();
423  }
424  isMPReady.store(true);
425  ARMARX_INFO << "training finished.";
426  }
427 
428  void
429  MPPool::setGoal(const DVec& goals, const Ice::Current& iceCurrent)
430  {
431  }
432 
433  void
434  MPPool::setStartAndGoal(const DVec& starts, const DVec& goals, const Ice::Current& iceCurrent)
435  {
436  for (auto& mp : mps)
437  {
438  mp.second.mp->setStartAndGoal(starts, goals);
439  }
440  }
441 
442  void
443  MPPool::setViaPoint(Ice::Double u, const DVec& viapoint, const Ice::Current& iceCurrent)
444  {
445  }
446 
447  void
448  MPPool::removeAllViaPoint(const Ice::Current& iceCurrent)
449  {
450  }
451 
452  //void MPPool::setWeight(const DVecSeq& weights, const Ice::Current &iceCurrent)
453  //{
454 
455  //}
456 
457  std::string
458  MPPool::serialize(const Ice::Current& iceCurrent)
459  {
460  return "";
461  }
462 
463  DVec
464  MPPool::deserialize(const std::string&, const Ice::Current& iceCurrent)
465  {
466  std::vector<double> test{0.1, 0.1};
467  return test;
468  }
469 
471  MPPool::getCanVal(const std::string& mpName, const Ice::Current& iceCurrent)
472  {
473  auto search = mps.find(mpName);
474  if (search != mps.end())
475  {
476  return search->second.mp->getCanonicalValue();
477  }
478  else
479  {
480  ARMARX_ERROR << mpName
481  << " is not in the MP pool. Please check your configuration file";
482  return true;
483  }
484  }
485 
486  bool
487  MPPool::getMPEnabled(const Ice::Current&)
488  {
489  return true;
490  }
491 
492  void
494  const Ice::Current& iceCurrent)
495  {
496  ARMARX_WARNING << "You should overwrite this method in your concrete MP controllers, and call resetMPs(dto, rnsMap)";
497  }
498 
499  bool
501  const std::map<std::string, VirtualRobot::RobotNodeSetPtr>& rnsMap)
502  {
503  std::scoped_lock lock(mtx_mps);
504  if (not isFinishedAll())
505  {
506  ARMARX_WARNING << "MP is not finished yet, cannot reset MP\n"
507  "If you want to force reset, please call \n\n"
508  " ctrl->stop('all') \n\n"
509  "before you continue";
510  return false;
511  }
512 
513  auto configData = MPListConfig::FromAron(dto);
514  isMPReady.store(false);
515  while (mpTaskRunning.load())
516  {
517  usleep(1000);
518  }
519 
520  for (const auto& _mp : configData.mpList)
521  {
522  if (rnsMap.find(_mp.nodeSetName) == rnsMap.end())
523  {
524  ARMARX_WARNING << "You have to make sure the RobotNodeSet " << _mp.nodeSetName
525  << " in your MP config "
526  << "corresponds to one of the RobotNodeSet in the controllers";
527  return false;
528  }
529  }
530  mpConfig = configData;
532 
533  reInitMPInputOutputData(rnsMap);
534  ARMARX_INFO << "-- successfully updated MP config.";
535  return true;
536  }
537 
539  MPPool::getMPConfig(const Ice::Current& iceCurrent)
540  {
541  return mpConfig.toAronDTO();
542  }
543 
544  void
546  const std::map<std::string, VirtualRobot::RobotNodeSetPtr>& rnsMap)
547  {
548  ARMARX_INFO << "-- reconfigure MP: reinitialize the mp input output, as well as the rt "
549  "related buffer values";
550  int index = 0;
551  for (auto& _mp : mps)
552  {
553  // const auto& nodeSetName = ;
554  // ARMARX_CHECK_EQUAL(nodeSetName, limb.at(nodeSetName)->kinematicChainName);
555  VirtualRobot::RobotNodeSetPtr rns = rnsMap.at(_mp.second.mp->getNodeSetName());
556 
557  if (_mp.second.mp->getRole() == "taskspace")
558  {
559  Eigen::Matrix4f currentPose = rns->getTCP()->getPoseInRootFrame();
560  ARMARX_INFO << "---- (" << index << ") init input output data for "
561  << _mp.second.mp->getMPName();
562  std::dynamic_pointer_cast<mp::TSMPInput>(_mp.second.input)->pose = currentPose;
563  std::dynamic_pointer_cast<mp::TSMPInput>(_mp.second.input)->vel.setZero();
564  std::dynamic_pointer_cast<mp::TSMPOutput>(_mp.second.output)->pose = currentPose;
565  std::dynamic_pointer_cast<mp::TSMPOutput>(_mp.second.output)->vel.setZero();
566  }
567  else if (_mp.second.mp->getRole() == "nullspace")
568  {
569  ARMARX_INFO << "---- (" << index << ") init input output data for "
570  << _mp.second.mp->getMPName() << " with "
571  << rns->getJointValues().size() << " joints";
572  std::dynamic_pointer_cast<mp::JSMPInput>(_mp.second.input)->angleRadian =
573  rns->getJointValuesEigen();
574  std::dynamic_pointer_cast<mp::JSMPInput>(_mp.second.input)->angularVel =
575  Eigen::VectorXf::Zero(rns->getJointValues().size());
576  std::dynamic_pointer_cast<mp::JSMPOutput>(_mp.second.output)->angleRadian =
577  rns->getJointValuesEigen();
578  std::dynamic_pointer_cast<mp::JSMPOutput>(_mp.second.output)->angularVel =
579  Eigen::VectorXf::Zero(rns->getJointValues().size());
580  }
581  else if (_mp.second.mp->getRole() == "hand")
582  {
583  ARMARX_INFO << "---- (" << index << ") init input output data for "
584  << _mp.second.mp->getMPName() << " with "
585  << rns->getJointValues().size() << " joints";
586  std::dynamic_pointer_cast<mp::JSMPInput>(_mp.second.input)->angleRadian =
587  rns->getJointValuesEigen();
588  std::dynamic_pointer_cast<mp::JSMPInput>(_mp.second.input)->angularVel =
589  Eigen::VectorXf::Zero(rns->getJointValues().size());
590  std::dynamic_pointer_cast<mp::JSMPOutput>(_mp.second.output)->angleRadian =
591  rns->getJointValuesEigen();
592  std::dynamic_pointer_cast<mp::JSMPOutput>(_mp.second.output)->angularVel =
593  Eigen::VectorXf::Zero(rns->getJointValues().size());
594  }
595  index++;
596  }
597  }
598 
599 } // namespace armarx::control::common::mp
armarx::control::common::mp::MPPool::getCanVal
Ice::Double getCanVal(const std::string &mpName, const Ice::Current &iceCurrent=Ice::emptyCurrent) override
Definition: MPPool.cpp:471
armarx::MPPoolInterface::getNames
string getNames()
armarx::MPPoolInterface::getMPEnabled
bool getMPEnabled()
armarx::control::common::mp::MPPool::isMPReady
std::atomic< bool > isMPReady
Definition: MPPool.h:129
armarx::control::common::mp::MPPool::reconfigureMPs
void reconfigureMPs(const MPListConfig &mpListConfig)
Definition: MPPool.cpp:76
armarx::MPPoolInterface::isFinishedAll
bool isFinishedAll()
TSMP.h
armarx::control::common::mp::MPPool::setGoal
void setGoal(const DVec &goals, const Ice::Current &iceCurrent=Ice::emptyCurrent) override
Definition: MPPool.cpp:429
index
uint8_t index
Definition: EtherCATFrame.h:59
armarx::control::common::mp::JSMPInputPtr
std::shared_ptr< JSMPInput > JSMPInputPtr
Definition: JSMP.h:47
armarx::control::common::mp::MPPool::stop
void stop(const std::string &mpName="all", const Ice::Current &iceCurrent=Ice::emptyCurrent) override
Definition: MPPool.cpp:193
armarx::control::common::mp::TSMPPtr
std::shared_ptr< TSMP > TSMPPtr
Definition: TSMP.h:63
JSMP.h
armarx::control::common::mp::MPPool::reset
void reset(const std::string &mpName="all", const Ice::Current &iceCurrent=Ice::emptyCurrent) override
Definition: MPPool.cpp:286
armarx::control::common::mp::MPPool::mpTaskRunning
std::atomic_bool mpTaskRunning
Definition: MPPool.h:138
armarx::MPPoolInterface::stopAll
void stopAll()
armarx::control::common::mp::MPPool::learnFromTrajs
void learnFromTrajs(const ::armarx::aron::data::dto::DictPtr &dto, const Ice::Current &iceCurrent=Ice::emptyCurrent) override
Definition: MPPool.cpp:367
armarx::control::common::mp::TSMP
Definition: TSMP.h:51
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:43
aron_conversions.h
armarx::control::common::mp
This file is part of ArmarX.
Definition: aron_conversions.cpp:331
armarx::control::common::mp::MPPool::runMPs
void runMPs(const bool rtSafe)
Definition: MPPool.cpp:83
armarx::control::common::mp::JSMPOutput
Definition: JSMP.h:41
armarx::control::common::mp::JSMPOutputPtr
std::shared_ptr< JSMPOutput > JSMPOutputPtr
Definition: JSMP.h:48
ARMARX_CHECK
#define ARMARX_CHECK(expression)
Shortcut for ARMARX_CHECK_EXPRESSION.
Definition: ExpressionException.h:82
armarx::MPPoolInterface::resumeAll
void resumeAll()
armarx::MPPoolInterface::getMPConfig
armarx::aron::data::dto::Dict getMPConfig()
armarx::control::common::mp::MPPool::resetMPs
bool resetMPs(const ::armarx::aron::data::dto::DictPtr &dto, const std::map< std::string, VirtualRobot::RobotNodeSetPtr > &rnsMap)
Definition: MPPool.cpp:500
armarx::control::common::mp::MPPool::setViaPoint
void setViaPoint(Ice::Double u, const DVec &viapoint, const Ice::Current &iceCurrent=Ice::emptyCurrent) override
Definition: MPPool.cpp:443
armarx::control::common::mp::MPPool::createMPs
void createMPs(const MPListConfig &mpListConfig)
Definition: MPPool.cpp:20
armarx::VariantType::Double
const VariantTypeId Double
Definition: Variant.h:919
armarx::control::common::mp::KeypointsMPOutput
Definition: KeypointsMP.h:39
armarx::MPPoolInterface::resetAll
void resetAll()
armarx::control::common::mp::TSMPOutputPtr
std::shared_ptr< TSMPOutput > TSMPOutputPtr
Definition: TSMP.h:47
armarx::control::common::mp::MPPool::resume
void resume(const std::string &mpName="all", const Ice::Current &iceCurrent=Ice::emptyCurrent) override
Definition: MPPool.cpp:255
armarx::control::common::mp::MPPool::set
void set(const ::armarx::StringDoubleSeqMap &, const ::armarx::StringDoubleSeqMap &, const ::armarx::StringDoubleMap &, const ::Ice::Current &iceCurrent=::Ice::emptyCurrent) override
Definition: MPPool.cpp:106
armarx::control::common::mp::KeypointsMPOutputPtr
std::shared_ptr< KeypointsMPOutput > KeypointsMPOutputPtr
Definition: KeypointsMP.h:46
armarx::MPPoolInterface::removeAllViaPoint
void removeAllViaPoint()
KeypointsMP.h
armarx::control::common::mp::DVec
Ice::DoubleSeq DVec
Definition: MP.h:46
armarx::control::common::mp::JSMPPtr
std::shared_ptr< JSMP > JSMPPtr
Definition: JSMP.h:61
armarx::control::common::mp::MPPool::deserialize
DVec deserialize(const std::string &, const Ice::Current &iceCurrent=Ice::emptyCurrent) override
Definition: MPPool.cpp:464
armarx::MPPoolInterface::startAll
void startAll()
armarx::control::common::mp::MPPool::mtx_mps
std::recursive_mutex mtx_mps
Definition: MPPool.h:128
armarx::control::common::mp::MPPool::reInitMPInputOutputData
void reInitMPInputOutputData(const std::map< std::string, VirtualRobot::RobotNodeSetPtr > &rnsMap)
Definition: MPPool.cpp:545
armarx::control::common::mp::MPPool::pause
void pause(const std::string &mpName="all", const Ice::Current &iceCurrent=Ice::emptyCurrent) override
Definition: MPPool.cpp:224
ARMARX_ERROR
#define ARMARX_ERROR
Definition: Logging.h:189
armarx::control::common::mp::MPPool::updateMPConfig
void updateMPConfig(const ::armarx::aron::data::dto::DictPtr &dto, const Ice::Current &iceCurrent=Ice::emptyCurrent) override
Definition: MPPool.cpp:493
armarx::control::common::mp::MPPool::learnFromCSV
void learnFromCSV(const Ice::StringSeq &fileNames=std::vector< std::string >(), const Ice::Current &iceCurrent=Ice::emptyCurrent) override
setting
Definition: MPPool.cpp:347
ExpressionException.h
armarx::aron::data::DictPtr
std::shared_ptr< Dict > DictPtr
Definition: Dict.h:41
GfxTL::Matrix4f
MatrixXX< 4, 4, float > Matrix4f
Definition: MatrixXX.h:601
ARMARX_INFO
#define ARMARX_INFO
Definition: Logging.h:174
armarx::control::common::mp::MPPool::setStartAndGoal
void setStartAndGoal(const DVec &starts, const DVec &goals, const Ice::Current &iceCurrent=Ice::emptyCurrent) override
Definition: MPPool.cpp:434
armarx::MPPoolInterface::pauseAll
void pauseAll()
armarx::control::common::mp::KeypointsMPInput
Definition: KeypointsMP.h:32
armarx::StringDoubleMap
dictionary< string, double > StringDoubleMap
Definition: MPPoolInterface.ice:35
armarx::control::common::mp::TSMPOutput
Definition: TSMP.h:40
armarx::control::common::mp::JSMP
Definition: JSMP.h:50
armarx::control::common::mp::MPPool::start
void start(const std::string &mpName="all", const DVec &startVec=std::vector< double >(), const DVec &goalVec=std::vector< double >(), Ice::Double timeDuration=-1.0, const Ice::Current &iceCurrent=Ice::emptyCurrent) override
control
Definition: MPPool.cpp:142
armarx::control::common::mp::JSMPInput
Definition: JSMP.h:34
armarx::control::common::mp::TSMPInput
Definition: TSMP.h:33
armarx::control::common::mp::MPPool::mps
std::map< std::string, MPInputOutput > mps
Definition: MPPool.h:127
armarx::MPPoolInterface::trainMP
void trainMP()
armarx::control::common::mp::TSMPInputPtr
std::shared_ptr< TSMPInput > TSMPInputPtr
Definition: TSMP.h:46
armarx::MPPoolInterface::serialize
string serialize()
serialze
ARMARX_WARNING
#define ARMARX_WARNING
Definition: Logging.h:186
MPPool.h
armarx::control::common::mp::KeypointsMP
Definition: KeypointsMP.h:50
ArmarXDataPath.h
armarx::StringDoubleSeqMap
dictionary< string, Ice::DoubleSeq > StringDoubleSeqMap
Definition: MPPoolInterface.ice:34
armarx::control::common::mp::KeypointsMPPtr
std::shared_ptr< KeypointsMP > KeypointsMPPtr
Definition: KeypointsMP.h:59
armarx::control::common::mp::KeypointsMPInputPtr
std::shared_ptr< KeypointsMPInput > KeypointsMPInputPtr
Definition: KeypointsMP.h:45
armarx::control::common::mp::MPPool::isFinished
bool isFinished(const std::string &mpName="all", const Ice::Current &iceCurrent=Ice::emptyCurrent) override
Definition: MPPool.cpp:317
armarx::control::common::mp::MPPool::mpConfig
MPListConfig mpConfig
this variable is only needed when constructing the MP instances, therefore you don't need to use trip...
Definition: MPPool.h:134