Skip to content
Snippets Groups Projects
DMPComponentBase.ice 2.35 KiB
Newer Older
Nikolaus Vahrenkamp's avatar
Nikolaus Vahrenkamp committed
/**
* This file is part of ArmarX.
*
* ArmarX is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
Nikolaus Vahrenkamp's avatar
Nikolaus Vahrenkamp committed
*
* ArmarX is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
Nikolaus Vahrenkamp's avatar
Nikolaus Vahrenkamp committed
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package    RobotCOMPONENTS::DMPComponent
* @author     You
* @date       2015 Humanoids Group, H2T, KIT
* @license    http://www.gnu.org/licenses/gpl-2.0.txt
*             GNU General Public License
*/

#ifndef _ROBOTCOMPONENTS_COMPONENT_DMPComponent_SLICE_
#define _ROBOTCOMPONENTS_COMPONENT_DMPComponent_SLICE_

#include <ArmarXCore/interface/core/UserException.ice>
#include <ArmarXCore/interface/core/BasicTypes.ice>
Nikolaus Vahrenkamp's avatar
Nikolaus Vahrenkamp committed

//#include <MemoryX/interface/memorytypes/MemoryEntities.ice>



module armarx
{
    struct cState{
        double pos;
        double vel;
        double acc;
    };

    sequence<double> DVector;

    sequence<cState> cStateVec;

    ["cpp:virtual"]
    class DMPComponentBase
    {
        bool is3rdOrder = false;

        void using3rdOrderDMP();
        void usingBasicDMP();
        void setDMPState(cStateVec state) throws InvalidArgumentException;
        void setParameter(int paraId, double value) throws InvalidArgumentException;
        void setGoal(DVector value) throws InvalidArgumentException;
        void setStartPosition(DVector value) throws InvalidArgumentException;
        void setTimeStamps(DVector value) throws InvalidArgumentException;
        void setCanonicalValues(DVector value) throws InvalidArgumentException;
        void getDMPFromDatabase(string filename) throws InvalidArgumentException;
        cStateVec getNextState() throws InvalidArgumentException;
        void instantiateDMP(int dmptype) throws InvalidArgumentException;
        void trainDMP() throws InvalidArgumentException;
        void storeDMPInDatabase(string cname) throws InvalidArgumentException;
        void readTrajectoryFromFile(string file);
Martin Do's avatar
Martin Do committed
        void setDimensionsToLearn(DVector dimensions);
Nikolaus Vahrenkamp's avatar
Nikolaus Vahrenkamp committed
        void removeDMPFromDatabase(string dmpname);

    };

  
};

#endif