26 #include <ArmarXCore/interface/observers/Serialization.h>
27 #include <ArmarXCore/interface/serialization/JSONSerialization.h>
29 #include <Ice/CommunicatorF.h>
30 #include "../KinematicSolver.h"
41 const Ice::Current&
c = Ice::emptyCurrent;
42 auto communicator =
c.adapter.get()->getCommunicator();
45 std::string jsonString;
61 trajectory->deserialize(&jsonSerializer,
c);
62 std::vector<std::string> nodeNames = trajectory->getDimensionNames();
63 std::vector<VirtualRobot::RobotNodePtr> nodeSet;
64 for (
unsigned int i = 0; i < nodeNames.size(); i++)
66 nodeSet.push_back(environment->getRobot()->getRobotNode(nodeNames[i]));
69 VirtualRobot::RobotNodeSetPtr rns;
71 for (VirtualRobot::RobotNodeSetPtr
set : environment->getRobot()->getRobotNodeSets())
74 std::vector<VirtualRobot::RobotNodePtr> nodes =
set->getAllRobotNodes();
75 for (VirtualRobot::RobotNodePtr node : nodeSet)
77 if (std::find(nodes.begin(), nodes.end(), node) == nodes.end())
82 if (rns->getAllRobotNodes().size() == nodes.size())
91 throw NotImplementedYetException();
94 std::vector<UserWaypointPtr> points = std::vector<UserWaypointPtr>();
96 for (
unsigned int i = 1; i < trajectory->size(); i++)
106 userPoint->setIsTimeOptimalBreakpoint(
true);
107 points.push_back(userPoint);
110 for (
unsigned int i = 1; i < points.size(); i++)
112 result->addLastUserWaypoint(points[i]);