11 std::vector<ConfigElement> gripPoints;
14 if (gripPoints.size() == 0)
16 this->
logger->logFatal(
"No gripMap points provided!");
20 for (
auto& point : gripPoints)
23 std::vector<double> position;
24 point.getElement<std::vector<double>>(&position,
"position");
25 Eigen::Vector3d positionEigen(position.at(0), position.at(1), position.at(2));
26 point.getElement<
double>(&gripValue,
"value");
28 this->
mapPoints.push_back(std::make_pair(positionEigen, gripValue));
34 std::array<double, 4> temp;
35 for (
int i = 0; i < 4; ++i)
38 auto bestPoint = std::min_element(std::begin(this->
mapPoints), std::end(this->
mapPoints),
39 [&el](
const std::pair<Eigen::Vector3d, double>& a,
const std::pair<Eigen::Vector3d, double>& b)
40 {
return (a.first - el).norm() < (b.first - el).norm(); });
41 temp[i] = ((*bestPoint).second);
std::shared_ptr< Logger > logger