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