3 #include <SimoxUtility/algorithm/apply.hpp>
4 #include <VirtualRobot/BoundingBox.h>
9 #include <teb_local_planner/extension/obstacles/EllipseObstacle.h>
10 #include <teb_local_planner/obstacles.h>
19 visualizationIndex = 0;
25 return container.size();
35 for (
const auto& feature : features.
features)
38 simox::alg::apply(feature.convexHull,
39 [&](
const Eigen::Vector2f& point)
41 Eigen::Vector3f point3d = conv::to3D(point);
42 return conv::to2D(global_T_frame * point3d);
52 auto obst = boost::make_shared<teb_local_planner::PolygonObstacle>();
54 for (
const auto& vertex : polygon)
58 obst->finalizePolygon();
59 container.push_back(obst);
62 if (visLayer !=
nullptr)
66 .color(simox::Color::gray()));
78 poly.emplace_back(
min.x(),
max.y());
80 poly.emplace_back(
max.x(),
min.y());
91 for (
const auto& proxemicZone : proxemicZones)
96 auto obst = boost::make_shared<teb_local_planner::extension::EllipseObstacle>(
97 pose.position(), pose.theta(), shape.a, shape.b);
99 const auto& penalty = proxemicZone.penalty;
103 obst->setWeight(proxemicZone.weight);
104 obst->setHomotopicRelevance(proxemicZone.homotopicRelevance);
111 container.push_back(obst);
114 if (visLayer !=
nullptr)
116 const Eigen::Vector3f axisLength(
117 proxemicZone.shape.a, proxemicZone.shape.b, 10.f - i);
122 .axisLengths(axisLength)
123 .color(PROXEMIC_ZONE_COLOR[i % PROXEMIC_ZONE_COLOR.size()]));