diff --git a/data/assets/curiosity.scene b/data/assets/curiosity.scene index e25e80ec6d..661ca5adf3 100644 --- a/data/assets/curiosity.scene +++ b/data/assets/curiosity.scene @@ -78,7 +78,7 @@ asset.onInitialize(function () ) openspace.markInterestingNodes({ - "Earth", "Mars", "Curiosity", "HeightMap", "Body_staticParts_2" + "Earth", "Mars", "Curiosity", "HeightMap" }) openspace.addVirtualProperty( @@ -105,6 +105,6 @@ asset.onDeinitialize(function () openspace.removeVirtualProperty("*Trail.renderable.Enabled") openspace.removeInterestingNodes({ - "Earth", "Mars", "Curiosity", "HeightMap", "Body_staticParts_2" + "Earth", "Mars", "Curiosity", "HeightMap" }) end) \ No newline at end of file diff --git a/data/assets/scene/solarsystem/planets/mars/rovers/transforms.asset b/data/assets/scene/solarsystem/planets/mars/rovers/transforms.asset index 4f1c3e8658..b6e60b9d22 100644 --- a/data/assets/scene/solarsystem/planets/mars/rovers/transforms.asset +++ b/data/assets/scene/solarsystem/planets/mars/rovers/transforms.asset @@ -439,10 +439,9 @@ local Wheel_base_Location = { Parent = MSL_Body.Identifier, --Transform = { -- Rotation = { - -- Type = "RksmlRotation", - -- DataPath = wheeldata .. "/rksml/", + -- Type = "RksmlRotation", -- Object = "LEFT_BOGIE", - -- RotationAxis = 1; + -- RotationAxis = 1 -- } --}, GUI = { @@ -686,12 +685,11 @@ local Wheel_F_R_Location = { Identifier = "Wheel_F_R_Location", Parent = Wrist_F_R_Location.Identifier, Transform = { - --Rotation = { - -- Type = "RksmlRotation", - -- DataPath = wheeldata .. "/rksml/", - -- Object = "RF_DRIVE", - -- RotationAxis = 2; - --}, + Rotation = { + Type = "RksmlRotation", + Object = "RF_DRIVE", + RotationAxis = 2 + }, Translation = { Type = "StaticTranslation", Position = {0.0, 0.0, 0.426} diff --git a/modules/marsrover/marsrovermodule.cpp b/modules/marsrover/marsrovermodule.cpp index c3827b8f28..1c9e87066d 100644 --- a/modules/marsrover/marsrovermodule.cpp +++ b/modules/marsrover/marsrovermodule.cpp @@ -34,6 +34,13 @@ #include #include #include +#include + +#include + +namespace { + const std::string _loggerCat = "MarsroverModule"; +} namespace openspace { @@ -60,9 +67,18 @@ void MarsroverModule::internalInitialize(const ghoul::Dictionary&) { fTranslation->registerClass("SpacecraftProjection"); - auto fProjectionProvider = std::make_unique>(); - fProjectionProvider->registerClass("WheelDataProvider"); - FactoryManager::ref().addFactory(std::move(fProjectionProvider)); + WheelData = std::make_unique(); + //fwheelDataProvider->registerClass("WheelDataProvider"); + //FactoryManager::ref().addFactory(std::move(fProjectionProvider)); + + WheelData->initialize(); + //WheelData2 = WheelData; + //fProjectionProvider->WheelDataProvider::loadData("./OpenSpace/"); + + //slutade här!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + //std::string filepath = ".\sync\http\marscuriosity_wheeldata\1\rksml"; + //fProjectionProvider->loadData(filepath); + //Read heightmap once //MslTerrain terrainMap; @@ -72,4 +88,13 @@ void MarsroverModule::internalInitialize(const ghoul::Dictionary&) { //fTranslation->registerClass("MarsProjection"); } +//Timeline &MarsroverModule::getFrameData(const std::string f, Timeline obj) + +//void MarsroverModule::getFrameData(const std::string f) +Timeline &MarsroverModule::getFrameData(const std::string f) +{ + LERROR(fmt::format("(getFrameData marsrovermodule) f: '{}'", f)); + return WheelData->getNode(f); +} + } // namespace openspace diff --git a/modules/marsrover/marsrovermodule.h b/modules/marsrover/marsrovermodule.h index 5f0ba35d66..46b8084dbd 100644 --- a/modules/marsrover/marsrovermodule.h +++ b/modules/marsrover/marsrovermodule.h @@ -29,6 +29,10 @@ #include #include +#include +#include + + namespace openspace { @@ -41,8 +45,18 @@ public: static ghoul::opengl::ProgramObjectManager ProgramObjectManager; //nej + std::unique_ptr WheelData; + + Timeline &getFrameData(const std::string f); + //void getFrameData(const std::string f); + //void getFrameData(const std::string f); + + protected: void internalInitialize(const ghoul::Dictionary&) override; //used always typ + + //static const auto WheelData = 0; + }; } // namespace openspace diff --git a/modules/marsrover/rotation/rksmlrotation.cpp b/modules/marsrover/rotation/rksmlrotation.cpp index 6b8ec63d2b..7b8d023b34 100644 --- a/modules/marsrover/rotation/rksmlrotation.cpp +++ b/modules/marsrover/rotation/rksmlrotation.cpp @@ -22,10 +22,6 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -//FIX: -//Everything should be saved once in another file -//No need to declare all tags for all objects, for every object!! - #include #include #include @@ -36,11 +32,13 @@ #include #include #include - +#include +#include #include #include #include +#include #include @@ -50,13 +48,6 @@ namespace { const char* DefaultReferenceFrame = "GALACTIC"; - - static const openspace::properties::Property::PropertyInfo DataPathInfo = { - "DataPath", - "Path", - "This value specifies the angle of correction around staticAxisRotation2." - "Valid strings are expressed in radians" - }; static const openspace::properties::Property::PropertyInfo ObjectPartInfo = { "Object", @@ -81,15 +72,13 @@ namespace openspace { constexpr const char* _loggerCat = "RksmlRotation"; RksmlRotation::RksmlRotation(const ghoul::Dictionary& dictionary) - : _dataPath(DataPathInfo) - , _objectPart(ObjectPartInfo, DefaultReferenceFrame) + : _frame(ObjectPartInfo, DefaultReferenceFrame) , _rotationAxis(AxisInfo, 1) { //Fix: move down to matrix? double now = OsEng.windowWrapper().applicationTime(); - _dataPath = dictionary.value(DataPathInfo.identifier); - _objectPart = dictionary.value(ObjectPartInfo.identifier); + _frame = dictionary.value(ObjectPartInfo.identifier); _rotationAxis = static_cast(dictionary.value(AxisInfo.identifier)); ghoul::Dictionary modelDic; @@ -97,20 +86,17 @@ RksmlRotation::RksmlRotation(const ghoul::Dictionary& dictionary) //calls the projectionprovider std::unique_ptr _projectionProvider; - - addProperty(_dataPath); - addProperty(_objectPart); + addProperty(_frame); addProperty(_rotationAxis); - openFile(); + //openFile(); auto update = [this]() { requireUpdate(); }; //Fix: needed? - _dataPath.onChange(update); - _objectPart.onChange(update); + _frame.onChange(update); _rotationAxis.onChange(update); } @@ -121,9 +107,12 @@ glm::dmat3 RksmlRotation::matrix(const UpdateData& data) const { double currentTime = data.time.j2000Seconds();// * pow(10.0, 8.0); - //double tt = 402555992.017; //00057 (middle of two frames) - const Keyframe* nextKeyframe = Object_Timeline.firstKeyframeAfter(currentTime); - const Keyframe* prevKeyframe = Object_Timeline.lastKeyframeBefore(currentTime); + // Get timeline object + LERROR(fmt::format("_Frame: '{}'", _frame)); + Timeline Object_Timeline = OsEng.moduleEngine().module()->getFrameData(_frame); + + const Keyframe* nextKeyframe = Object_Timeline.firstKeyframeAfter(currentTime); + const Keyframe* prevKeyframe = Object_Timeline.lastKeyframeBefore(currentTime); double radiansResult = 0.0; double radians1 = 0.0; @@ -132,7 +121,6 @@ glm::dmat3 RksmlRotation::matrix(const UpdateData& data) const { double time1 = 0.0; double time2 = 0.0; - if (prevKeyframe != nullptr) { if (nextKeyframe != nullptr) @@ -157,11 +145,14 @@ glm::dmat3 RksmlRotation::matrix(const UpdateData& data) const { else if (nextKeyframe != nullptr) radiansResult = nextKeyframe->data.rotValue; - double sin = glm::sin(radiansResult); double cos = glm::cos(radiansResult); + LERROR(fmt::format("sin: '{}'", sin)); + LERROR(fmt::format("cos: '{}'", cos)); + glm::dmat3 rotMatrix = glm::dmat3(1.0); + switch(_rotationAxis) { //currently opposite direction for all matrises @@ -181,114 +172,9 @@ glm::dmat3 RksmlRotation::matrix(const UpdateData& data) const { -sin, cos, 0.0, 0.0, 0.0, 1.0 ); break; - } return rotMatrix; - -} - - -void RksmlRotation::openFile() { - - std::string path = _dataPath;// + "/*/rksml_playback_filt_eha.rksml"; - std::string fileName; - - const int start = 28; - const int end = 2072; - - for (int i = 0; i < (end - start); i++) { - if (i < (100 - start)) - fileName = path + "000" + std::to_string(i + start); - - else if (i < (1000 - start)) - fileName = path + "00" + std::to_string(i + start); - - else - fileName = path + "0" + std::to_string(i + start); - - fileName = fileName + "/rksml_playback_filt_eha.rksml"; - std::replace(fileName.begin(), fileName.end(), '\\', '/'); - - //parse file - parseFile(fileName); - } - -} - -void RksmlRotation::parseFile(std::string path) { - //call file that will parse the data - double val; - double e; - std::ifstream myfile (path); - std::istringstream iss; - - std::string theline, - trash, - time, - unit, - name, - value, - tag, - raised, - line; - - if (myfile.is_open()) - { - while (getline (myfile, line) ) - { - iss.clear(); - iss = std::istringstream(line); - - //get first node tag - std::getline(iss, trash, '<'); - std::getline(iss, tag, ' '); - - if (tag == "Node") - { - std::getline(iss, trash, '"'); - std::getline(iss, time, '"'); - } - - else if (tag == "Knot") - { - std::getline(iss, trash, '"'); - std::getline(iss, name, '"'); - std::getline(iss, trash, '"'); - std::getline(iss, unit, '"'); - std::getline(iss, trash, '>'); - std::getline(iss, value, '<'); - //If moved to another file, if statement is not neccessary - if (name == _objectPart.value()) { - Node nodeObject; - nodeObject.frameName = name; - //double te = 399958865.0; - nodeObject.frameTime = atof(time.c_str()); - //nodeObject.frameTime = te; - - //if *10^x is found - if (value.find('E') != std::string::npos) - { - raised = value.substr(value.find('E') + 1, value.find('E') + 3 ); - value.erase(value.find('E'), value.length()); - val = atof(value.c_str()); - e = atof(raised.c_str()); - - nodeObject.rotValue = val * pow(10.0, e); - } - else - nodeObject.rotValue = atof(value.c_str()); - - Object_Timeline.addKeyframe(nodeObject.frameTime, nodeObject); - } - } - iss.clear(); - //trash = ""; - } - myfile.close(); - } else { - throw ghoul::RuntimeError("Never opened file"); - } } } // namespace openspace diff --git a/modules/marsrover/rotation/rksmlrotation.h b/modules/marsrover/rotation/rksmlrotation.h index 77d076b499..37c9ce1ea3 100644 --- a/modules/marsrover/rotation/rksmlrotation.h +++ b/modules/marsrover/rotation/rksmlrotation.h @@ -28,9 +28,8 @@ #include #include -//#include #include -//#include +#include #include #include @@ -45,7 +44,7 @@ namespace openspace { namespace documentation { struct Documentation; } -class RksmlRotation : public Rotation { //change to : public ProjectionProvider +class RksmlRotation : public Rotation { //change to : public ProjectionProvider , public Rotation public: struct Node { @@ -59,42 +58,15 @@ public: ~RksmlRotation(); - //Timeline& timeline(); //void addKeyframe(double timestamp, RksmlRotation::Node data); glm::dmat3 matrix(const UpdateData& data) const override; private: - //void addTimelineObject(std::string s, Node n); - void openFile(); - void parseFile(std::string path); - Timeline& getNode(std::string s); Timeline Object_Timeline; //creates a Timeline object of the structure type Node - //Not a good way - /* - Timeline LF_DRIVE_Timeline; //creates a Timeline object of the structure type Node - Timeline LF_STEER_Timeline; - Timeline LM_DRIVE_Timeline; - Timeline LR_DRIVE_Timeline; - Timeline LR_STEER_Timeline; - Timeline RF_DRIVE_Timeline; - Timeline RF_STEER_Timeline; - Timeline RM_DRIVE_Timeline; - Timeline RR_DRIVE_Timeline; - Timeline RR_STEER_Timeline; - Timeline LEFT_BOGIE_Timeline; - Timeline LEFT_DIFFERENTIAL_Timeline; - Timeline RIGHT_BOGIE_Timeline; - Timeline RIGHT_DIFFERENTIAL_Timeline; - Timeline QUAT_C_Timeline; - Timeline QUAT_X_Timeline; - Timeline QUAT_Y_Timeline; - Timeline QUAT_Z_Timeline; - */ - properties::StringProperty _dataPath; - properties::StringProperty _objectPart; + properties::StringProperty _frame; properties::IntProperty _rotationAxis; }; diff --git a/modules/marsrover/surfaceprojection/projectionprovider.cpp b/modules/marsrover/surfaceprojection/projectionprovider.cpp index 42c155de6f..92da72ce0e 100644 --- a/modules/marsrover/surfaceprojection/projectionprovider.cpp +++ b/modules/marsrover/surfaceprojection/projectionprovider.cpp @@ -28,30 +28,46 @@ #include #include +#include +#include + namespace { const std::string _loggerCat = "ProjectionProvider"; const std::string Type = "Type"; } namespace openspace { +/* std::unique_ptr ProjectionProvider::createFromDictionary(const ghoul::Dictionary& dictionary) { + LERROR(fmt::format("init projection provider1")); std::string type = "ProjectionProvider"; dictionary.getValue(Type, type); - auto factory = FactoryManager::ref().factory(); - std::unique_ptr projProvider = factory->create(type, dictionary); - if (!projProvider) { + ghoul::TemplateFactory* factory + = FactoryManager::ref().factory(); + //auto factory = FactoryManager::ref().factory(); + std::unique_ptr result = factory->create(type, dictionary); + result->setIdentifier("ProjectionProvider"); + if (!result) { throw ghoul::RuntimeError("Unable to create projection provider"); } - return projProvider; + return result; } +/* ProjectionProvider::ProjectionProvider(const ghoul::Dictionary& dictionary) : properties::PropertyOwner(openspace::properties::PropertyOwner::PropertyOwnerInfo{ "projectionProvider", "projectionProvider" }) + //,_wheelData() { -} + LERROR(fmt::format("init projection provider3")); +}*/ +/* +ProjectionProvider::ProjectionProvider() : properties::PropertyOwner({ "ProjectionProvider" }) {} + void ProjectionProvider::initialize() { + // _wheelData->loadData(); + LERROR(fmt::format("init projection provider2")); return; } - +*/ } // namespace openspace \ No newline at end of file diff --git a/modules/marsrover/surfaceprojection/projectionprovider.h b/modules/marsrover/surfaceprojection/projectionprovider.h index 874d35469f..58b62e74dd 100644 --- a/modules/marsrover/surfaceprojection/projectionprovider.h +++ b/modules/marsrover/surfaceprojection/projectionprovider.h @@ -27,19 +27,31 @@ //#include #include +#include +#include + +#include +#include +#include + +namespace ghoul { class Dictionary; } namespace openspace { -class ProjectionProvider : public properties::PropertyOwner { +class ProjectionProvider { public: - static std::unique_ptr createFromDictionary(const ghoul::Dictionary& dictionary); - ProjectionProvider(const ghoul::Dictionary& dictionary); + ProjectionProvider(); + //virtual ~Translation() = default; + //ProjectionProvider(const ghoul::Dictionary& dictionary); - //virtual std::vector> calculate(const std::vector>> subsites, - // const RenderData& data, const SceneGraphNode* parent) = 0; + // virtual std::vector> calculate(const std::vector>> subsites, + // const RenderData& data, const SceneGraphNode* parent) = 0; + void initialize(); + +private: + WheelDataProvider _wheelData; - virtual void initialize() = 0; }; } // namespace openspace diff --git a/modules/marsrover/surfaceprojection/spacecraftprojection.cpp b/modules/marsrover/surfaceprojection/spacecraftprojection.cpp index 511b718c8b..183aac744b 100644 --- a/modules/marsrover/surfaceprojection/spacecraftprojection.cpp +++ b/modules/marsrover/surfaceprojection/spacecraftprojection.cpp @@ -51,6 +51,9 @@ #include #include +#include +#include + #include #include #include diff --git a/modules/marsrover/surfaceprojection/wheeldataprovider.cpp b/modules/marsrover/surfaceprojection/wheeldataprovider.cpp index 25a230b3b3..2fc0a1acaa 100644 --- a/modules/marsrover/surfaceprojection/wheeldataprovider.cpp +++ b/modules/marsrover/surfaceprojection/wheeldataprovider.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include @@ -41,40 +42,44 @@ namespace { } namespace openspace { -WheelDataProvider::WheelDataProvider(const ghoul::Dictionary& dictionary) - : ProjectionProvider(dictionary) { -} +WheelDataProvider::WheelDataProvider() {} -void WheelDataProvider::loadData(std::string path) { - std::string fileName; +void WheelDataProvider::loadData(const std::string path) { + //LERROR(fmt::format("load data")); + //LERROR(fmt::format("filepath1 '{}'", path)); + + std::string fileName; const int start = 28; const int end = 2072; - LERROR(fmt::format("hej")); - for (int i = 0; i < (end - start); i++) { if (i < (100 - start)) - fileName = path + "000" + std::to_string(i + start); + fileName = path + "/000" + std::to_string(i + start); else if (i < (1000 - start)) - fileName = path + "00" + std::to_string(i + start); + fileName = path + "/00" + std::to_string(i + start); else - fileName = path + "0" + std::to_string(i + start); + fileName = path + "/0" + std::to_string(i + start); fileName = fileName + "/rksml_playback_filt_eha.rksml"; std::replace(fileName.begin(), fileName.end(), '\\', '/'); //parse file - //parseFile(fileName); + parseFile(fileName); } - std::string testFile = path + "/00048/rksml_playback_filt_eha.rksml"; - parseFile(testFile); + //testfile + //std::string testFile = path + "/00048/rksml_playback_filt_eha.rksml"; + //parseFile(testFile); + + //for (auto x : Timeline_Objects) + //LERROR(fmt::format(x.first)); } -void WheelDataProvider::parseFile(std::string path) +void WheelDataProvider::parseFile(const std::string path) { + double val; double e; std::ifstream myfile (path); @@ -89,7 +94,7 @@ void WheelDataProvider::parseFile(std::string path) tag, raised, line; - /* + if (myfile.is_open()) { while (getline (myfile, line) ) @@ -116,15 +121,9 @@ void WheelDataProvider::parseFile(std::string path) std::getline(iss, trash, '>'); std::getline(iss, value, '<'); - //Send to new object with time to - //If moved to another file, if statement is not neccessary - //if (name == std::to_string(_objectPart)) { - Node nodeObject; nodeObject.frameName = name; - //double te = 399958865.0; nodeObject.frameTime = atof(time.c_str()); - //nodeObject.frameTime = te; //if *10^x is found if (value.find('E') != std::string::npos) @@ -136,83 +135,79 @@ void WheelDataProvider::parseFile(std::string path) nodeObject.rotValue = val * pow(10.0, e); } - else { + + else nodeObject.rotValue = atof(value.c_str()); - //If not empty, fix: make correct - if (getNode(std::to_string(nodeObject.name + "_Timeline")->data.name =! "") - getNode(std::to_string(nodeObject.name + "_Timeline").addKeyframe(nodeObject.frameTime, nodeObject))); - } + + if (nodeObject.frameName != "") + addKeyframe(nodeObject); + } iss.clear(); //trash = ""; } myfile.close(); } - else LERROR(fmt::format("never opened file")); */ + else LERROR(fmt::format("never opened file")); + } -Timeline& WheelDataProvider::getNode(std::string s) +void WheelDataProvider::addKeyframe(const Node &node) { - if ( "LF_DRIVE_Timeline" == s) - return LF_DRIVE_Timeline; + bool found = false; - else if ("LF_STEER_Timeline" == s) - return LF_STEER_Timeline; + // If Frame timeline object already exist, add new time + if (Timeline_Objects.size() > 0) + { - else if ("LM_DRIVE_Timeline" == s) - return LM_DRIVE_Timeline; - - else if ("LR_DRIVE_Timeline" == s) - return LR_DRIVE_Timeline; - - else if ("LR_STEER_Timeline" == s) - return LR_STEER_Timeline; - - else if ("RF_DRIVE_Timeline" == s) - return RF_DRIVE_Timeline; - - else if ("RF_STEER_Timeline" == s) - return RF_STEER_Timeline; - - else if ("RM_DRIVE_Timeline" == s) - return RM_DRIVE_Timeline; - - else if ("RR_DRIVE_Timeline" == s) - return RR_DRIVE_Timeline; - - else if ("RR_STEER_Timeline" == s) - return RR_STEER_Timeline; - - else if ("LEFT_BOGIE_Timeline" == s) - return LEFT_BOGIE_Timeline; - - else if ("LEFT_DIFFERENTIAL_Timeline" == s) - return LEFT_DIFFERENTIAL_Timeline; - - else if ("RIGHT_BOGIE_Timeline" == s) - return RIGHT_BOGIE_Timeline; - - else if ("RIGHT_DIFFERENTIAL_Timeline" == s) - return RIGHT_DIFFERENTIAL_Timeline; - - else if ("QUAT_C_Timeline" == s) - return QUAT_C_Timeline; - - else if ("QUAT_X_Timeline" == s) - return QUAT_X_Timeline; - - else if ("QUAT_Y_Timeline" == s) - return QUAT_Y_Timeline; - - else if("QUAT_Z_Timeline" == s) - return QUAT_Z_Timeline; + for (auto obj : Timeline_Objects) + { + if (node.frameName == obj.first) // if already in vector -> add time + { + obj.second.addKeyframe(node.frameTime, node); + found = true; + break; + } + } + } - //fix - //return empty object - return QUAT_Z_Timeline; + // Add new timeline object to vector + if (!found) + { + Timeline timeline_obj; + timeline_obj.addKeyframe(node.frameTime, node); + Timeline_Objects.push_back(std::make_pair(node.frameName, timeline_obj)); + } +} + + +Timeline &WheelDataProvider::getNode(const std::string s) const +{ + LERROR(fmt::format("(getNode) s: '{}'", s)); + + for (auto obj : Timeline_Objects) + { + LERROR(fmt::format("(getNode) obj.first '{}'", obj.first)); + + if (s == obj.first) + { + //LERROR(fmt::format("init projection provider1: '{}'", obj.second.firstKeyframeAfter(100000.0)->data.rotValue)); + + return obj.second; + } + } + + + + // No data for object + LERROR(fmt::format("No data for frame")); + Timeline empty; + return empty; } void WheelDataProvider::initialize() { + std::string path = "../../../sync/http/marscuriosity_wheeldata/1/rksml"; + loadData(path); return; } diff --git a/modules/marsrover/surfaceprojection/wheeldataprovider.h b/modules/marsrover/surfaceprojection/wheeldataprovider.h index b55691f158..4b34f92dfa 100644 --- a/modules/marsrover/surfaceprojection/wheeldataprovider.h +++ b/modules/marsrover/surfaceprojection/wheeldataprovider.h @@ -25,54 +25,35 @@ #ifndef __OPENSPACE_MODULE_MARSROVER___WHEEL_DATA_PROVIDER___H__ #define __OPENSPACE_MODULE_MARSROVER___WHEEL_DATA_PROVIDER___H__ -#include +//#include #include #include +#include namespace openspace { -class WheelDataProvider : public ProjectionProvider { +class WheelDataProvider { // : public ProjectionProvider public: struct Node { - std::string frameName; - double frameTime; - double rotValue; //radians - int axis; + std::string frameName = ""; + double frameTime = 0; + double rotValue = 0; //radians + int axis = -1; }; - - WheelDataProvider(const ghoul::Dictionary& dictionary); + WheelDataProvider(); //const ghoul::Dictionary& dictionary //virtual std::vector> calculate(const std::vector>> subsites, // const RenderData& data, const SceneGraphNode* parent); - static void loadData(std::string path); - static void parseFile(std::string path); - Timeline& getNode(std::string s); - virtual void initialize(); + void loadData(const std::string path); + void parseFile(const std::string path); + void addKeyframe(const WheelDataProvider::Node &node); + Timeline &getNode(const std::string s) const; + void initialize(); private: - Timeline Object_Timeline; + std::vector>> Timeline_Objects; - Timeline LF_DRIVE_Timeline; - Timeline LF_STEER_Timeline; - Timeline LM_DRIVE_Timeline; - Timeline LR_DRIVE_Timeline; - Timeline LR_STEER_Timeline; - Timeline RF_DRIVE_Timeline; - Timeline RF_STEER_Timeline; - Timeline RM_DRIVE_Timeline; - Timeline RR_DRIVE_Timeline; - Timeline RR_STEER_Timeline; - Timeline LEFT_BOGIE_Timeline; - Timeline LEFT_DIFFERENTIAL_Timeline; - Timeline RIGHT_BOGIE_Timeline; - Timeline RIGHT_DIFFERENTIAL_Timeline; - Timeline QUAT_C_Timeline; - Timeline QUAT_X_Timeline; - Timeline QUAT_Y_Timeline; - Timeline QUAT_Z_Timeline; - - //const int timelinesNr = 18; };