Task Class Reference

#include <RobotComponents/components/MotionPlanning/Tasks/AStar/Task.h>

+ Inheritance diagram for Task:

Public Member Functions

void abortTask (const Ice::Current &=Ice::emptyCurrent) override
 Aborts planning. More...
Path getPath (const Ice::Current &=Ice::emptyCurrent) const override
bool isPathCollisionFree (const VectorXf &from, const VectorXf &to)
void run (const RemoteObjectNodePrxList &, const Ice::Current &=Ice::emptyCurrent) override
 Runs the task. More...
 Task (const CSpaceBasePtr &cspace, const VectorXf &startCfg, const VectorXf &goalCfg, const std::string &taskName="AStarTask", float dcdStep=0.01f, float gridStepSize=2.5f, Ice::Long maximalPlanningTimeInSeconds=300)
 A task using the A* algorithm. More...
- Public Member Functions inherited from MotionPlanningTaskWithDefaultMembers
CSpaceBasePtr getCSpace (const Ice::Current &=Ice::emptyCurrent) const override
float getDcdStep (const Ice::Current &=Ice::emptyCurrent) const override
VectorXf getGoal (const Ice::Current &=Ice::emptyCurrent) const override
Ice::Long getMaximalPlanningTimeInSeconds (const Ice::Current &=Ice::emptyCurrent) const override
VectorXf getStart (const Ice::Current &=Ice::emptyCurrent) const override
 MotionPlanningTaskWithDefaultMembers (const VectorXf &startCfg, const VectorXf &goalCfg, const CSpaceBasePtr &cspace, Ice::Float dcdStep, Ice::Long maximalPlanningTimeInSeconds, const std::string &taskName)
 ctor More...
- Public Member Functions inherited from MotionPlanningTask
void addTaskStatusCallback (std::function< void(TaskStatus::Status)> cb)
Ice::Long getPlanningTime (const Ice::Current &) const override
MotionPlanningTaskBasePrx & getProxy ()
Ice::Long getRefiningTime (const Ice::Current &) const override
Ice::Long getRunningTime (const Ice::Current &) const override
std::string getTaskName (const Ice::Current &=Ice::emptyCurrent) const override
TaskStatus::Status getTaskStatus (const Ice::Current &=Ice::emptyCurrent) const override
 MotionPlanningTask ()=default
virtual void onPlanningDone ()
virtual void onRefiningDone ()
virtual void postEnqueueing ()
 Called by the planning server after the task was enqueued. More...
virtual void registerAtIceAdapter (Ice::ObjectAdapterPtr &adapter, const Ice::Identity ident)
bool setTaskStatus (TaskStatus::Status newTaskStatus, const Ice::Current &=Ice::emptyCurrent) override
 ~MotionPlanningTask () override=default
- Public Member Functions inherited from MotionPlanningTaskCI
bool finishedRunning (const Ice::Current &=Ice::emptyCurrent) const override
 Returns whether the task has finished planning. More...
bool isRunning (const Ice::Current &=Ice::emptyCurrent) const override
 Returns whether the task is currently planning. More...
void waitForFinishedPlanning_async (const AMD_MotionPlanningTaskControlInterface_waitForFinishedPlanningPtr &cb, const Ice::Current &=Ice::emptyCurrent) override
void waitForFinishedRunning_async (const AMD_MotionPlanningTaskControlInterface_waitForFinishedRunningPtr &cb, const Ice::Current &=Ice::emptyCurrent) override

Protected Member Functions

 Task ()=default
 Ctor used by object factories. More...
- Protected Member Functions inherited from MotionPlanningTaskWithDefaultMembers
 MotionPlanningTaskWithDefaultMembers ()=default

Protected Attributes

std::mutex mtx
Path solution = {{}, "Path"}
std::atomic_bool taskIsAborted {false}
- Protected Attributes inherited from MotionPlanningTask
Ice::Long planningTime = 0
 The planning time in microseconds. More...
Ice::Long refiningTime = 0
 The refining time in microseconds. More...
- Protected Attributes inherited from MotionPlanningTaskCI
AMDCallbackCollection waitForFinishedPlanning
AMDCallbackCollection waitForFinishedRunning


template<class Base , class Derived >
class ::armarx::GenericFactory

Detailed Description

Definition at line 45 of file Task.h.

Constructor & Destructor Documentation

◆ Task() [1/2]

Task ( const CSpaceBasePtr &  cspace,
const VectorXf &  startCfg,
const VectorXf &  goalCfg,
const std::string &  taskName = "AStarTask",
float  dcdStep = 0.01f,
float  gridStepSize = 2.5f,
Ice::Long  maximalPlanningTimeInSeconds = 300 

A task using the A* algorithm.

cspaceThe used cspace.
startCfgThe start configuration.
goalCfgThe goal configuration.
dcdStepThe step size used for discrete collision checking.
maximalPlanningTimeInSecondsThe maximal planning time in seconds.

Definition at line 32 of file Task.cpp.

◆ Task() [2/2]

Task ( )

Ctor used by object factories.

Member Function Documentation

◆ abortTask()

void abortTask ( const Ice::Current &  = Ice::emptyCurrent)

Aborts planning.

Definition at line 73 of file Task.h.

◆ getPath()

Path getPath ( const Ice::Current &  = Ice::emptyCurrent) const
The found path. (empty if no path is found)

Definition at line 55 of file Task.cpp.

◆ isPathCollisionFree()

bool isPathCollisionFree ( const VectorXf &  from,
const VectorXf &  to 

Definition at line 332 of file Task.cpp.

+ Here is the call graph for this function:

◆ run()

void run ( const RemoteObjectNodePrxList &  ,
const Ice::Current &  = Ice::emptyCurrent 

Runs the task.

remoteNodesThe list of RemoteObjectNodeInterfacePrx used to distribute work to computers.

Definition at line 61 of file Task.cpp.

+ Here is the call graph for this function:

Friends And Related Function Documentation

◆ ::armarx::GenericFactory

friend class ::armarx::GenericFactory

Definition at line 101 of file Task.h.

Member Data Documentation

◆ mtx

std::mutex mtx

Definition at line 97 of file Task.h.

◆ solution

Path solution = {{}, "Path"}

Definition at line 98 of file Task.h.

◆ taskIsAborted

std::atomic_bool taskIsAborted {false}

Definition at line 99 of file Task.h.

The documentation for this class was generated from the following files: