PathFactory.cpp
Go to the documentation of this file.
1#include "PathFactory.h"
2
3VirtualRobot::Path
4armarx::PathFactory::createPath(std::vector<std::vector<double>>& nodes, double maxDeviation)
5{
6 //Convert the input vector of vectors to a list of Eigen::VectorXd
7 std::list<Eigen::VectorXd> path;
8 for (unsigned int i = 0; i < nodes.size(); i++)
9 {
10 //Map the vector accordingly
11 Eigen::VectorXd doubleNode = Eigen::VectorXd::Map(&nodes[i][0], nodes[i].size());
12 path.push_back(doubleNode);
13 }
14 //Return the result
15 return VirtualRobot::Path(path, maxDeviation);
16}
static VirtualRobot::Path createPath(std::vector< std::vector< double > > &nodes, double maxDeviation)
Creates a Path out of the nodes with a maximum deviation.