31 #include <ArmarXCore/interface/core/RemoteObjectNode.h>
33 #include <RobotComponents/interface/components/MotionPlanning/Tasks/PathCollection/Task.h>
35 #include "../../util/Metrics.h"
36 #include "../MotionPlanningTask.h"
45 public virtual TaskBase,
49 Task(
const std::string& taskName =
"PathCollection")
51 this->taskName = taskName;
54 ~Task()
override =
default;
69 getPath(
const Ice::Current& = Ice::emptyCurrent)
const override
75 abortTask(
const Ice::Current& = Ice::emptyCurrent)
override
80 getCSpace(
const Ice::Current& = Ice::emptyCurrent)
const override
89 void run(
const RemoteObjectNodePrxList&,
const Ice::Current& = Ice::emptyCurrent)
override;
94 return maximalPlanningTimeInSeconds;
98 getPathCount(
const Ice::Current& = Ice::emptyCurrent)
const override
104 getBestPath(
const Ice::Current& = Ice::emptyCurrent)
const override
112 if (
static_cast<std::size_t
>(n) < paths.size())
116 return {{}, std::numeric_limits<float>::infinity(),
"Path_" +
to_string(n)};
129 for (std::size_t i = 0; i + 1 < p.nodes.size(); ++i)
132 p.nodes.at(i).begin(), p.nodes.at(i).end(), p.nodes.at(i + 1).begin());
134 addPath(PathWithCost{std::move(p.nodes), len, std::move(p.pathName)});
140 paths.emplace_back(std::move(p));