3 #include <SimoxUtility/algorithm/apply.hpp>
7 #include <teb_local_planner/extension/obstacles/EllipseObstacle.h>
8 #include <teb_local_planner/obstacles.h>
17 visualizationIndex = 0;
23 return container.size();
32 for (
const auto& feature : features.
features)
35 simox::alg::apply(feature.convexHull,
36 [&](
const Eigen::Vector2f& point)
38 Eigen::Vector3f point3d = conv::to3D(point);
39 return conv::to2D(global_T_frame * point3d);
49 auto obst = boost::make_shared<teb_local_planner::PolygonObstacle>();
51 for (
const auto& vertex : polygon)
55 obst->finalizePolygon();
56 container.push_back(obst);
59 if (visLayer !=
nullptr)
63 .color(simox::Color::gray()));
75 poly.emplace_back(
min.x(),
max.y());
77 poly.emplace_back(
max.x(),
min.y());
88 for (
const auto& proxemicZone : proxemicZones)
93 auto obst = boost::make_shared<teb_local_planner::extension::EllipseObstacle>(
94 pose.position(), pose.theta(), shape.a, shape.b);
96 const auto& penalty = proxemicZone.penalty;
100 obst->setWeight(proxemicZone.weight);
101 obst->setHomotopicRelevance(proxemicZone.homotopicRelevance);
108 container.push_back(obst);
111 if (visLayer !=
nullptr)
113 const Eigen::Vector3f axisLength(
114 proxemicZone.shape.a, proxemicZone.shape.b, 10.f - i);
119 .axisLengths(axisLength)
120 .color(PROXEMIC_ZONE_COLOR[i % PROXEMIC_ZONE_COLOR.size()]));