Go to the documentation of this file.
27 #include <RobotComponents/interface/components/FunctionApproximatorBase.h>
28 #include <dmp/functionapproximation/radialbasisfunctioninterpolator.h>
29 #include <dmp/functionapproximation/functionapproximation.h>
30 #include <dmp/functionapproximation/locallyweightedlearning.h>
31 #include <dmp/functionapproximation/functionapproximationregistration.h>
33 #include <boost/archive/text_oarchive.hpp>
34 #include <boost/archive/text_iarchive.hpp>
36 #include <boost/archive/xml_iarchive.hpp>
37 #include <boost/archive/xml_oarchive.hpp>
39 #include <boost/archive/binary_iarchive.hpp>
40 #include <boost/archive/binary_oarchive.hpp>
71 using FuncAppMap = std::map<std::string, DMP::FunctionApproximationInterfacePtr>;
72 using FuncAppPair = std::pair<std::string, DMP::FunctionApproximationInterfacePtr> ;
75 virtual public armarx::FunctionApproximatorBase
83 widthFactor.push_back(10);
84 widthFactor.push_back(10);
92 return "FunctionApproximator";
125 void initialize(
const std::string& fappName,
const Ice::DoubleSeq& factors,
const Ice::Current&)
override;
126 void learn(
const std::string& name,
const DVector2d&,
const DVector2d&,
const Ice::Current&)
override;
127 Ice::Double predict(
const std::string& name,
const Ice::DoubleSeq&,
const Ice::Current&)
override;
128 void ilearn(
const std::string& name,
const Ice::DoubleSeq&,
Ice::Double,
const Ice::Current&)
override;
129 void blearn(
const std::string& name,
const Ice::DoubleSeq&,
const Ice::DoubleSeq&,
const Ice::Current&)
override;
130 Ice::DoubleSeq
bpredict(
const std::string& name,
const Ice::DoubleSeq& x,
const Ice::Current&)
override;
139 void reset(
const Ice::Current&)
override;
142 void initializeTest(
const std::string& fappName,
const Ice::DoubleSeq& widthFactors);
std::pair< std::string, DMP::FunctionApproximationInterfacePtr > FuncAppPair
void onInitComponent() override
std::map< std::string, DMP::FunctionApproximationInterfacePtr > FuncAppMap
void onDisconnectComponent() override
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
std::string getDefaultName() const override
Ice::Double predict(const std::string &name, const Ice::DoubleSeq &, const Ice::Current &) override
Ice::DoubleSeq bpredict(const std::string &name, const Ice::DoubleSeq &x, const Ice::Current &) override
void learn(const std::string &name, const DVector2d &, const DVector2d &, const Ice::Current &) override
FunctionApproximatorPropertyDefinitions(std::string prefix)
void onExitComponent() override
void saveFunctionApproximatorInFile(const std::string &funcName, const std::string &name, const Ice::Current &) override
const VariantTypeId Double
void onConnectComponent() override
void reset(const Ice::Current &) override
void saveFunctionApproximatorInFileTest(const std::string &funcName, const std::string &name)
void initialize(const std::string &fappName, const Ice::DoubleSeq &factors, const Ice::Current &) override
Brief description of class FunctionApproximator.
Baseclass for all ArmarX ManagedIceObjects requiring properties.
void blearn(const std::string &name, const Ice::DoubleSeq &, const Ice::DoubleSeq &, const Ice::Current &) override
Default component property definition container.
void ilearn(const std::string &name, const Ice::DoubleSeq &, Ice::Double, const Ice::Current &) override
void getFunctionApproximatorFromFile(const std::string &funcName, const std::string &name, const Ice::Current &) override
void getFunctionApproximatorsFromFile(const std::vector< std::string > &funcNameList, const std::string &filename, const Ice::Current &) override
void initializeTest(const std::string &fappName, const Ice::DoubleSeq &widthFactors)
This file offers overloads of toIce() and fromIce() functions for STL container types.