Class MotionTask

Class Documentation

class MotionTask

Abstract base class for robot motion tasks.

This class defines the interface for robot motion tasks. Derived classes should implement the execute, cancel, isFinished, isActive, getName, getStatus, and getErrorMessage methods.

Public Functions

inline explicit MotionTask(std::string task_name, std::function<void()> execute)

Initialize the task with task_name and execute function.

Parameters:
  • task_name

  • execute

inline explicit MotionTask(std::string task_name, std::function<void()> init, std::function<void()> execute)

Initialize the task with task_name and init function, and execute function.

Parameters:
  • task_name

  • init

  • execute

inline void init()

Initialize the cartesian motion task.

inline void execute()

Execute the cartesian motion task.

inline std::string get_name()

Get the name of the task.

Returns:

std::string

inline TaskState get_state()

Get the state of the task.

Returns:

TaskState

inline void set_state(TaskState state)

Set the state of the task.

Parameters:

state