30 #include <Ice/ObjectAdapter.h>
32 #include <RobotComponents/interface/components/MotionPlanning/Tasks/MotionPlanningTask.h>
33 #include "../MotionPlanningServer.h"
44 class MotionPlanningTask;
57 virtual public MotionPlanningTaskBase,
83 bool setTaskStatus(TaskStatus::Status newTaskStatus,
const Ice::Current& = Ice::emptyCurrent)
override;
85 TaskStatus::Status
getTaskStatus(
const Ice::Current& = Ice::emptyCurrent)
const override
94 throw std::logic_error {
"Task already registered as: category: " + selfProxy->ice_getIdentity().category +
", name: " + selfProxy->ice_getIdentity().name};
96 selfProxy = MotionPlanningTaskBasePrx::uncheckedCast(adapter->add(
this, ident));
99 std::string
getTaskName(
const Ice::Current& = Ice::emptyCurrent)
const override
106 taskStatusCallbacks.emplace_back(cb);
136 MotionPlanningTaskBasePrx selfProxy;
137 std::atomic<TaskStatus::Status> taskStatus {TaskStatus::eNew};
138 std::deque<std::function<void(TaskStatus::Status)>> taskStatusCallbacks;
143 virtual public MotionPlanningTaskWithDefaultMembersBase,
155 const VectorXf& startCfg,
156 const VectorXf& goalCfg,
157 const CSpaceBasePtr& cspace,
160 const std::string& taskName
162 MotionPlanningTaskBase(taskName),
163 MotionPlanningTaskWithDefaultMembersBase(taskName, startCfg, goalCfg, cspace, dcdStep, maximalPlanningTimeInSeconds)
171 VectorXf
getStart(
const Ice::Current& = Ice::emptyCurrent)
const override
179 VectorXf
getGoal(
const Ice::Current& = Ice::emptyCurrent)
const override
187 CSpaceBasePtr
getCSpace(
const Ice::Current& = Ice::emptyCurrent)
const override
195 float getDcdStep(
const Ice::Current& = Ice::emptyCurrent)
const override
205 return maximalPlanningTimeInSeconds;
214 virtual public PostprocessingMotionPlanningTaskBase
218 MotionPlanningTaskBase(taskName),
219 PostprocessingMotionPlanningTaskBase(taskName, previousStep)
224 CSpaceBasePtr
getCSpace(
const Ice::Current& = Ice::emptyCurrent)
const override
227 return previousStep->getCSpace();
234 auto prev = MotionPlanningTaskPtr::dynamicCast(previousStep);
239 prev->registerAtIceAdapter(adapter, subIdent);
245 MotionPlanningTaskPtr::dynamicCast(previousStep)->postEnqueueing();