Commit c21ee498 authored by Peter Kaiser's avatar Peter Kaiser

pyMMM now works with the Legacy interface of MMMCore

parent 472043fd
......@@ -5,9 +5,9 @@
#include "MMM/Model/ModelProcessor.h"
#include "MMM/Model/ModelProcessorWinter.h"
#include "MMM/Model/ModelReaderXML.h"
#include "MMM/Motion/MotionReaderXML.h"
#include "MMM/Motion/Motion.h"
#include "MMM/Motion/MotionFrame.h"
#include "MMM/Motion/Legacy/LegacyMotion.h"
#include "MMM/Motion/Legacy/MotionFrame.h"
#include "MMM/Motion/Legacy/LegacyMotionReaderXML.h"
#include "MMMSimoxTools/MMMSimoxTools.h"
%}
......@@ -20,13 +20,13 @@ namespace std {
}
%include "boost_shared_ptr.i"
%shared_ptr(MMM::Motion)
%shared_ptr(MMM::LegacyMotion)
%shared_ptr(MMM::MotionFrame)
%shared_ptr(MMM::MotionFrameEntry)
%shared_ptr(MMM::Model)
%shared_ptr(MMM::ModelProcessor)
%template(MotionPtr) boost::shared_ptr<MMM::Motion>;
%template(LegacyMotionPtr) boost::shared_ptr<MMM::LegacyMotion>;
%template(MotionFramePtr) boost::shared_ptr<MMM::MotionFrame>;
%template(MotionFrameEntryPtr) boost::shared_ptr<MMM::MotionFrameEntry>;
%template(ModelPtr) boost::shared_ptr<MMM::Model>;
......@@ -49,8 +49,8 @@ namespace VirtualRobot {
}
namespace MMM {
class Motion;
typedef boost::shared_ptr<Motion> MotionPtr;
class LegacyMotion;
typedef boost::shared_ptr<LegacyMotion> LegacyMotionPtr;
class MotionFrame;
typedef boost::shared_ptr<MotionFrame> MotionFramePtr;
......@@ -64,23 +64,23 @@ namespace MMM {
class ModelProcessor;
typedef boost::shared_ptr<ModelProcessor> ModelProcessorPtr;
typedef std::vector<MotionPtr> MotionList;
typedef std::vector<LegacyMotionPtr> LegacyMotionList;
class MotionReaderXML {
class LegacyMotionReaderXML {
public:
MotionReaderXML();
MotionPtr loadMotion(const std::string &xmlFile, const std::string &motionName = std::string());
MotionList loadAllMotions(const std::string &xmlFile);
MotionList loadAllMotionsFromString(const std::string &xmlDataString);
LegacyMotionReaderXML();
LegacyMotionPtr loadMotion(const std::string &xmlFile, const std::string &motionName = std::string());
LegacyMotionList loadAllMotions(const std::string &xmlFile);
LegacyMotionList loadAllMotionsFromString(const std::string &xmlDataString);
std::vector<std::string> getMotionNames(const std::string &xmlFile) const;
};
typedef boost::shared_ptr<MotionReaderXML> MotionReaderXMLPtr;
typedef boost::shared_ptr<LegacyMotionReaderXML> LegacyMotionReaderXMLPtr;
class Motion {
class LegacyMotion {
public:
Motion(const std::string& name);
Motion(const Motion& m);
LegacyMotion(const std::string& name);
LegacyMotion(const LegacyMotion& m);
bool addMotionFrame(MotionFramePtr md);
bool removeMotionFrame(size_t frame);
bool setJointOrder(const std::vector<std::string> &jointNames);
......@@ -111,9 +111,9 @@ namespace MMM {
void calculateAccelerations(int method = 0);
enum jointEnum{eValues, eVelocities, eAccelerations};
void smoothJointValues(jointEnum type, int windowSize);
MotionPtr getSegmentMotion(size_t frame1, size_t frame2);
MotionPtr copy();
MotionList getSegmentMotions(std::vector<int> segmentPoints);
LegacyMotionPtr getSegmentMotion(size_t frame1, size_t frame2);
LegacyMotionPtr copy();
LegacyMotionList getSegmentMotions(std::vector<int> segmentPoints);
};
class MotionFrame {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment