34#include <RobotComponents/interface/components/MotionPlanning/Tasks/RRTConnect/WorkerNode.h>
43 template <
class IceBaseClass,
class DerivedClass>
61 using WorkerNodeBase::WorkerNodeBase;
68#pragma GCC diagnostic push
69#pragma GCC diagnostic ignored "-Wterminate"
71#pragma GCC diagnostic pop
83 return "RRTConnectWorkerNode";
88 const Ice::Current& = Ice::emptyCurrent)
const override;
90 const Ice::Current& = Ice::emptyCurrent)
override;
93 abort(const ::Ice::Current& = Ice::emptyCurrent)
override
99 void updateTree(
const Update& u,
const Ice::Current& = Ice::emptyCurrent)
override;
121 ARMARX_VERBOSE_S <<
"[worker " << workerId <<
"] requesting update " << workerNodeId
122 <<
" / " << updateSubId;
124 return workers.at(workerNodeId)->getUpdate(updateSubId);
135 NodeId
addNode(
const ConfigType& cfg,
const NodeId& parent,
bool addToPrimaryTree);
140 return addNode(cfg, parent,
true);
146 return addNode(cfg, parent,
false);
155 return cspace->getDimensionality();
The ManagedIceObject is the base class for all ArmarX objects.
void updateTree(const Update &u, const Ice::Current &=Ice::emptyCurrent) override
void onInitComponent() override
Pure virtual hook for the subclass.
void abort(const ::Ice::Current &=Ice::emptyCurrent) override
void ice_postUnmarshal() override
NodeId addNodeToSecondaryTree(const ConfigType &cfg, const NodeId &parent)
void workerTask()
The worker task.
std::unique_ptr< CuboidSampler > sampler
Ice::Byte getSecondaryTreeId() const
std::deque< Update > localUpdates
Ice::Byte getPrimaryTreeId() const
TreeUpdateInterfacePrx globalWorkers
Update getUpdate(Ice::Long updateId, const Ice::Current &=Ice::emptyCurrent) const override
WorkerNodeBasePrxList workers
Tree & getSecondaryTree()
~WorkerNode() override
dtor.
NodeId addNodeToPrimaryTree(const ConfigType &cfg, const NodeId &parent)
std::atomic_bool abortRequest
std::size_t getDimensionality()
std::atomic_bool doApplyUpdates
NodeId addNode(const ConfigType &cfg, const NodeId &parent, bool addToPrimaryTree)
void onConnectComponent() override
Pure virtual hook for the subclass.
Update getRemoteUpdate(Ice::Long workerNodeId, Ice::Long updateSubId)
void setWorkerNodes(const WorkerNodeBasePrxList &workers, const Ice::Current &=Ice::emptyCurrent) override
bool fromStartIsPrimaryTree
void onExitComponent() override
Hook for subclass.
WorkerNode()=default
Only used when transmitting through ice.
std::string getDefaultName() const override
Retrieve default name of component.
#define ARMARX_CHECK_EXPRESSION(expression)
This macro evaluates the expression and if it turns out to be false it will throw an ExpressionExcept...
IceInternal::Handle< WorkerNode > WorkerNodePtr
An ice handle for a WorkerNode of the RRTConnect algorithm.
This file offers overloads of toIce() and fromIce() functions for STL container types.