31#include <ArmarXCore/interface/core/RemoteObjectNode.h>
33#include <RobotComponents/interface/components/MotionPlanning/Tasks/PathCollection/Task.h>
45 public virtual TaskBase,
49 Task(
const std::string& taskName =
"PathCollection")
51 this->taskName = taskName;
63 getNthPath(Ice::Long n,
const Ice::Current& = Ice::emptyCurrent)
const override
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));
Path getNthPath(Ice::Long n, const Ice::Current &=Ice::emptyCurrent) const override
PathWithCost getPathWithCost(const Ice::Current &=Ice::emptyCurrent) const override
MotionPlanningTask()=default
Path getPath(const Ice::Current &=Ice::emptyCurrent) const override
The RemoteHandle class wrapps a ClientSideRemoteHandleControlBlock and can be used just as a Ice prox...
PathWithCostSeq getAllPathsWithCost(const Ice::Current &=Ice::emptyCurrent) const override
Ice::Long getPathCount(const Ice::Current &=Ice::emptyCurrent) const override
Task(const std::string &taskName="PathCollection")
void run(const RemoteObjectNodePrxList &, const Ice::Current &=Ice::emptyCurrent) override
Runs the task.
Path getPath(const Ice::Current &=Ice::emptyCurrent) const override
void addPath(PathWithCost p)
PathWithCost getNthPathWithCost(Ice::Long n, const Ice::Current &=Ice::emptyCurrent) const override
void abortTask(const Ice::Current &=Ice::emptyCurrent) override
Ice::Long getMaximalPlanningTimeInSeconds(const Ice::Current &=Ice::emptyCurrent) const override
PathWithCost getBestPath(const Ice::Current &=Ice::emptyCurrent) const override
CSpaceBasePtr getCSpace(const Ice::Current &=Ice::emptyCurrent) const override
Path getNthPath(Ice::Long n, const Ice::Current &=Ice::emptyCurrent) const override
PathWithCost getPathWithCost(const Ice::Current &=Ice::emptyCurrent) const override
IceInternal::Handle< Task > TaskPtr
This file offers overloads of toIce() and fromIce() functions for STL container types.
float euclideanDistance(IteratorType1 first1, IteratorType1 last1, IteratorType2 first2)
Returns the euclidean distance.
IceUtil::Handle< PathCollection > PathCollectionPtr
RemoteHandle< MotionPlanningMultiPathWithCostTaskControlInterfacePrx > PathCollectionHandle
pathcol::Task PathCollection
const std::string & to_string(const std::string &s)