MPPool Class Reference

#include <armarx/control/common/mp/MPPool.h>

+ Inheritance diagram for MPPool:

Public Member Functions

void createMPs (const MPListConfig &mpListConfig)
 
DVec deserialize (const std::string &, const Ice::Current &iceCurrent=Ice::emptyCurrent) override
 
Ice::Double getCanVal (const std::string &mpName, const Ice::Current &iceCurrent=Ice::emptyCurrent) override
 
::armarx::aron::data::dto::DictPtr getMPConfig (const Ice::Current &iceCurrent=Ice::emptyCurrent) override
 config More...
 
bool getMPEnabled (const Ice::Current &) override
 
std::string getNames (const Ice::Current &iceCurrent=Ice::emptyCurrent) override
 Interface functions. More...
 
bool isFinished (const std::string &mpName="all", const Ice::Current &iceCurrent=Ice::emptyCurrent) override
 
bool isFinishedAll (const Ice::Current &iceCurrent=Ice::emptyCurrent) override
 
void learnFromCSV (const Ice::StringSeq &fileNames=std::vector< std::string >(), const Ice::Current &iceCurrent=Ice::emptyCurrent) override
 setting More...
 
void learnFromTrajs (const ::armarx::aron::data::dto::DictPtr &dto, const Ice::Current &iceCurrent=Ice::emptyCurrent) override
 
 MPPool ()
 
void pause (const std::string &mpName="all", const Ice::Current &iceCurrent=Ice::emptyCurrent) override
 
void pauseAll (const Ice::Current &iceCurrent=Ice::emptyCurrent) override
 
void reconfigureMPs (const MPListConfig &mpListConfig)
 
void removeAllViaPoint (const Ice::Current &iceCurrent=Ice::emptyCurrent) override
 
void reset (const std::string &mpName="all", const Ice::Current &iceCurrent=Ice::emptyCurrent) override
 
void resetAll (const Ice::Current &iceCurrent=Ice::emptyCurrent) override
 
bool resetMPs (const ::armarx::aron::data::dto::DictPtr &dto, const std::map< std::string, VirtualRobot::RobotNodeSetPtr > &rnsMap)
 
void resume (const std::string &mpName="all", const Ice::Current &iceCurrent=Ice::emptyCurrent) override
 
void resumeAll (const Ice::Current &iceCurrent=Ice::emptyCurrent) override
 
void runMPs (const bool rtSafe)
 
std::string serialize (const Ice::Current &iceCurrent=Ice::emptyCurrent) override
 serialize More...
 
void set (const ::armarx::StringDoubleSeqMap &, const ::armarx::StringDoubleSeqMap &, const ::armarx::StringDoubleMap &, const ::Ice::Current &iceCurrent=::Ice::emptyCurrent) override
 
void setGoal (const DVec &goals, const Ice::Current &iceCurrent=Ice::emptyCurrent) override
 
void setStartAndGoal (const DVec &starts, const DVec &goals, const Ice::Current &iceCurrent=Ice::emptyCurrent) override
 
void setViaPoint (Ice::Double u, const DVec &viapoint, const Ice::Current &iceCurrent=Ice::emptyCurrent) override
 
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 More...
 
void startAll (const Ice::Current &iceCurrent=Ice::emptyCurrent) override
 
void stop (const std::string &mpName="all", const Ice::Current &iceCurrent=Ice::emptyCurrent) override
 
void stopAll (const Ice::Current &iceCurrent=Ice::emptyCurrent) override
 
void trainMP (const Ice::Current &iceCurrent=Ice::emptyCurrent) override
 
void updateMPConfig (const ::armarx::aron::data::dto::DictPtr &dto, const Ice::Current &iceCurrent=Ice::emptyCurrent) override
 
 ~MPPool ()
 
- Public Member Functions inherited from MPPoolInterface
Ice::DoubleSeq deserialize (string mpAsString)
 
double getCanVal (string mpName)
 utilities More...
 
armarx::aron::data::dto::Dict getMPConfig ()
 
bool getMPEnabled ()
 
string getNames ()
 
bool isFinished (string mpName)
 
bool isFinishedAll ()
 
void learnFromCSV (Ice::StringSeq fileNames)
 setting More...
 
void learnFromTrajs (armarx::aron::data::dto::Dict config)
 
void pause (string mpName)
 
void pauseAll ()
 
void removeAllViaPoint ()
 
void reset (string mpName)
 
void resetAll ()
 
void resume (string mpName)
 
void resumeAll ()
 
string serialize ()
 serialze More...
 
void set (StringDoubleSeqMap startVec, StringDoubleSeqMap goalVec, StringDoubleMap durationSec)
 control More...
 
void setGoal (Ice::DoubleSeq goals)
 
void setStartAndGoal (Ice::DoubleSeq starts, Ice::DoubleSeq goals)
 
void setViaPoint (double u, Ice::DoubleSeq viapoint)
 
void start (string mpName, Ice::DoubleSeq startVec, Ice::DoubleSeq goalVec, double durationSec)
 
void startAll ()
 
void stop (string mpName)
 
void stopAll ()
 
void trainMP ()
 
void updateMPConfig (armarx::aron::data::dto::Dict config)
 config More...
 

Protected Member Functions

void reInitMPInputOutputData (const std::map< std::string, VirtualRobot::RobotNodeSetPtr > &rnsMap)
 

Protected Attributes

std::atomic< bool > isMPReady {false}
 
MPListConfig mpConfig
 this variable is only needed when constructing the MP instances, therefore you don't need to use triple buffers More...
 
std::map< std::string, MPInputOutputmps
 
std::atomic_bool mpTaskRunning {false}
 

Detailed Description

Definition at line 47 of file MPPool.h.

Constructor & Destructor Documentation

◆ MPPool()

MPPool ( )
inline

Definition at line 50 of file MPPool.h.

◆ ~MPPool()

~MPPool ( )
inline

Definition at line 51 of file MPPool.h.

Member Function Documentation

◆ createMPs()

void createMPs ( const MPListConfig &  mpListConfig)

Definition at line 20 of file MPPool.cpp.

+ Here is the caller graph for this function:

◆ deserialize()

DVec deserialize ( const std::string &  ,
const Ice::Current &  iceCurrent = Ice::emptyCurrent 
)
override

Definition at line 464 of file MPPool.cpp.

◆ getCanVal()

Ice::Double getCanVal ( const std::string &  mpName,
const Ice::Current &  iceCurrent = Ice::emptyCurrent 
)
override

Definition at line 471 of file MPPool.cpp.

◆ getMPConfig()

armarx::aron::data::dto::DictPtr getMPConfig ( const Ice::Current &  iceCurrent = Ice::emptyCurrent)
override

config

Definition at line 538 of file MPPool.cpp.

◆ getMPEnabled()

bool getMPEnabled ( const Ice::Current &  )
override

Definition at line 487 of file MPPool.cpp.

◆ getNames()

std::string getNames ( const Ice::Current &  iceCurrent = Ice::emptyCurrent)
override

Interface functions.

Definition at line 95 of file MPPool.cpp.

◆ isFinished()

bool isFinished ( const std::string &  mpName = "all",
const Ice::Current &  iceCurrent = Ice::emptyCurrent 
)
override

Definition at line 317 of file MPPool.cpp.

+ Here is the caller graph for this function:

◆ isFinishedAll()

bool isFinishedAll ( const Ice::Current &  iceCurrent = Ice::emptyCurrent)
override

Definition at line 311 of file MPPool.cpp.

+ Here is the call graph for this function:

◆ learnFromCSV()

void learnFromCSV ( const Ice::StringSeq &  fileNames = std::vector<std::string>(),
const Ice::Current &  iceCurrent = Ice::emptyCurrent 
)
override

setting

Definition at line 347 of file MPPool.cpp.

◆ learnFromTrajs()

void learnFromTrajs ( const ::armarx::aron::data::dto::DictPtr &  dto,
const Ice::Current &  iceCurrent = Ice::emptyCurrent 
)
override

Definition at line 367 of file MPPool.cpp.

◆ pause()

void pause ( const std::string &  mpName = "all",
const Ice::Current &  iceCurrent = Ice::emptyCurrent 
)
override

Definition at line 224 of file MPPool.cpp.

+ Here is the caller graph for this function:

◆ pauseAll()

void pauseAll ( const Ice::Current &  iceCurrent = Ice::emptyCurrent)
override

Definition at line 218 of file MPPool.cpp.

+ Here is the call graph for this function:

◆ reconfigureMPs()

void reconfigureMPs ( const MPListConfig &  mpListConfig)

Definition at line 76 of file MPPool.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reInitMPInputOutputData()

void reInitMPInputOutputData ( const std::map< std::string, VirtualRobot::RobotNodeSetPtr > &  rnsMap)
protected

Definition at line 544 of file MPPool.cpp.

+ Here is the caller graph for this function:

◆ removeAllViaPoint()

void removeAllViaPoint ( const Ice::Current &  iceCurrent = Ice::emptyCurrent)
override

Definition at line 448 of file MPPool.cpp.

◆ reset()

void reset ( const std::string &  mpName = "all",
const Ice::Current &  iceCurrent = Ice::emptyCurrent 
)
override

Definition at line 286 of file MPPool.cpp.

+ Here is the caller graph for this function:

◆ resetAll()

void resetAll ( const Ice::Current &  iceCurrent = Ice::emptyCurrent)
override

Definition at line 280 of file MPPool.cpp.

+ Here is the call graph for this function:

◆ resetMPs()

bool resetMPs ( const ::armarx::aron::data::dto::DictPtr &  dto,
const std::map< std::string, VirtualRobot::RobotNodeSetPtr > &  rnsMap 
)

Definition at line 500 of file MPPool.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resume()

void resume ( const std::string &  mpName = "all",
const Ice::Current &  iceCurrent = Ice::emptyCurrent 
)
override

Definition at line 255 of file MPPool.cpp.

+ Here is the caller graph for this function:

◆ resumeAll()

void resumeAll ( const Ice::Current &  iceCurrent = Ice::emptyCurrent)
override

Definition at line 249 of file MPPool.cpp.

+ Here is the call graph for this function:

◆ runMPs()

void runMPs ( const bool  rtSafe)

Definition at line 83 of file MPPool.cpp.

+ Here is the caller graph for this function:

◆ serialize()

std::string serialize ( const Ice::Current &  iceCurrent = Ice::emptyCurrent)
override

serialize

Definition at line 458 of file MPPool.cpp.

◆ set()

void set ( const ::armarx::StringDoubleSeqMap startVec,
const ::armarx::StringDoubleSeqMap goalVec,
const ::armarx::StringDoubleMap durationSec,
const ::Ice::Current &  iceCurrent = ::Ice::emptyCurrent 
)
override

Definition at line 106 of file MPPool.cpp.

◆ setGoal()

void setGoal ( const DVec goals,
const Ice::Current &  iceCurrent = Ice::emptyCurrent 
)
override

Definition at line 429 of file MPPool.cpp.

◆ setStartAndGoal()

void setStartAndGoal ( const DVec starts,
const DVec goals,
const Ice::Current &  iceCurrent = Ice::emptyCurrent 
)
override

Definition at line 434 of file MPPool.cpp.

◆ setViaPoint()

void setViaPoint ( Ice::Double  u,
const DVec viapoint,
const Ice::Current &  iceCurrent = Ice::emptyCurrent 
)
override

Definition at line 443 of file MPPool.cpp.

◆ 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 at line 142 of file MPPool.cpp.

+ Here is the caller graph for this function:

◆ startAll()

void startAll ( const Ice::Current &  iceCurrent = Ice::emptyCurrent)
override

Definition at line 136 of file MPPool.cpp.

+ Here is the call graph for this function:

◆ stop()

void stop ( const std::string &  mpName = "all",
const Ice::Current &  iceCurrent = Ice::emptyCurrent 
)
override

Definition at line 193 of file MPPool.cpp.

+ Here is the caller graph for this function:

◆ stopAll()

void stopAll ( const Ice::Current &  iceCurrent = Ice::emptyCurrent)
override

Definition at line 187 of file MPPool.cpp.

+ Here is the call graph for this function:

◆ trainMP()

void trainMP ( const Ice::Current &  iceCurrent = Ice::emptyCurrent)
override

Definition at line 418 of file MPPool.cpp.

◆ updateMPConfig()

void updateMPConfig ( const ::armarx::aron::data::dto::DictPtr &  dto,
const Ice::Current &  iceCurrent = Ice::emptyCurrent 
)
override

Definition at line 493 of file MPPool.cpp.

Member Data Documentation

◆ isMPReady

std::atomic<bool> isMPReady {false}
protected

Definition at line 128 of file MPPool.h.

◆ mpConfig

MPListConfig mpConfig
protected

this variable is only needed when constructing the MP instances, therefore you don't need to use triple buffers

Definition at line 133 of file MPPool.h.

◆ mps

std::map<std::string, MPInputOutput> mps
protected

Definition at line 127 of file MPPool.h.

◆ mpTaskRunning

std::atomic_bool mpTaskRunning {false}
protected

Definition at line 137 of file MPPool.h.


The documentation for this class was generated from the following files: