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
 
bool getMPEnabled (const Ice::Current &) override
 
std::string getNames (const Ice::Current &iceCurrent=Ice::emptyCurrent) override
 Interface functions.
 
bool isFinished (const std::string &mpName="all", const Ice::Current &iceCurrent=Ice::emptyCurrent) override
 
bool isFinishedAll (const Ice::Current &=Ice::emptyCurrent) override
 
void learnFromCSV (const Ice::StringSeq &fileNames=std::vector< std::string >(), const Ice::Current &iceCurrent=Ice::emptyCurrent) override
 setting
 
void learnFromTrajs (const ::armarx::aron::data::dto::DictPtr &dict, const Ice::Current &iceCurrent=Ice::emptyCurrent) override
 
 MPPool ()=default
 
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 requestStop (const std::string &mpName="all", 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)
 
bool resetMPsV1 (const ::armarx::aron::data::dto::DictPtr &dto, const std::map< std::string, VirtualRobot::RobotNodeSetPtr > &rnsMap, const std::shared_ptr< common::coordination::Coordination > &coordinator)
 
bool resetMPsV2 (const ::armarx::aron::data::dto::DictPtr &dto, const std::map< std::string, MPReInitData > &data)
 
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 (bool rtSafe)
 
std::string serialize (const Ice::Current &iceCurrent=Ice::emptyCurrent) override
 serialize
 
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
 
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
 
armarx::aron::data::dto::Dict getMPConfig ()
 
bool getMPEnabled ()
 
string getNames ()
 
bool isFinished (string mpName)
 
bool isFinishedAll ()
 
void learnFromCSV (Ice::StringSeq fileNames)
 setting
 
void learnFromTrajs (armarx::aron::data::dto::Dict config)
 
void pause (string mpName)
 
void pauseAll ()
 
void removeAllViaPoint ()
 
void requestStop (string mpName)
 
void reset (string mpName)
 
void resetAll ()
 
void resume (string mpName)
 
void resumeAll ()
 
string serialize ()
 serialze
 
void set (StringDoubleSeqMap startVec, StringDoubleSeqMap goalVec, StringDoubleMap durationSec)
 control
 
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
 

Protected Member Functions

void reInitMPInputOutputData (const std::map< std::string, VirtualRobot::RobotNodeSetPtr > &rnsMap)
 
void reInitMPInputOutputDataV1 (const std::map< std::string, VirtualRobot::RobotNodeSetPtr > &rnsMap, const std::shared_ptr< common::coordination::Coordination > &coordinator)
 
void reInitMPInputOutputDataV2 (const std::map< std::string, MPReInitData > &data)
 

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
 
std::map< std::string, MPInputOutput > mps
 
std::atomic_bool mpTaskRunning {false}
 
std::recursive_mutex mtx_mps
 
std::map< arondto::MPGroup, PhaseStopResult > phaseStops_
 

Constructor & Destructor Documentation

◆ MPPool()

MPPool ( )
default

◆ ~MPPool()

~MPPool ( )
inline

Member Function Documentation

◆ createMPs()

void createMPs ( const MPListConfig & mpListConfig)

◆ deserialize()

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

◆ getCanVal()

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

◆ getMPConfig()

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

config

◆ getMPEnabled()

bool getMPEnabled ( const Ice::Current & )
override

◆ getNames()

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

Interface functions.

◆ isFinished()

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

◆ isFinishedAll()

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

◆ learnFromCSV()

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

setting

◆ learnFromTrajs()

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

◆ pause()

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

◆ pauseAll()

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

◆ reconfigureMPs()

void reconfigureMPs ( const MPListConfig & mpListConfig)

◆ reInitMPInputOutputData()

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

◆ reInitMPInputOutputDataV1()

void reInitMPInputOutputDataV1 ( const std::map< std::string, VirtualRobot::RobotNodeSetPtr > & rnsMap,
const std::shared_ptr< common::coordination::Coordination > & coordinator )
protected

◆ reInitMPInputOutputDataV2()

void reInitMPInputOutputDataV2 ( const std::map< std::string, MPReInitData > & data)
protected

◆ removeAllViaPoint()

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

◆ requestStop()

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

◆ reset()

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

◆ resetAll()

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

◆ resetMPs()

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

◆ resetMPsV1()

bool resetMPsV1 ( const ::armarx::aron::data::dto::DictPtr & dto,
const std::map< std::string, VirtualRobot::RobotNodeSetPtr > & rnsMap,
const std::shared_ptr< common::coordination::Coordination > & coordinator )

◆ resetMPsV2()

bool resetMPsV2 ( const ::armarx::aron::data::dto::DictPtr & dto,
const std::map< std::string, MPReInitData > & data )

◆ resume()

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

◆ resumeAll()

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

◆ runMPs()

void runMPs ( bool rtSafe)

Since there may be MPs for TCP, posture and fingers, we group those for one arm to use the same phase stop signal, usually it is a good choice to use the Task Space MP to compute the phase stop signal and propagate this to other mps in the same group Compute phase stop

propagate phase top to other mps

◆ serialize()

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

serialize

◆ set()

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

◆ setGoal()

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

◆ setStartAndGoal()

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

◆ setViaPoint()

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

◆ 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

◆ startAll()

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

◆ stop()

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

◆ stopAll()

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

◆ trainMP()

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

◆ updateMPConfig()

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

Member Data Documentation

◆ isMPReady

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

◆ mpConfig

MPListConfig mpConfig
protected

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

◆ mps

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

◆ mpTaskRunning

std::atomic_bool mpTaskRunning {false}
protected

◆ mtx_mps

std::recursive_mutex mtx_mps
mutableprotected

◆ phaseStops_

std::map<arondto::MPGroup, PhaseStopResult> phaseStops_
protected

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