Go to the documentation of this file. 1 #ifndef TASK_EXECUTOR_HPP
2 #define TASK_EXECUTOR_HPP
8 #include <QSharedPointer>
88 bool constructPath(
const QString &basePath,
const QString &addition, QString &result,
const QString &errorMsg,
bool checkExists =
true);
90 QList<ScriptWorker*> scriptWorkers;
93 #endif // TASK_EXECUTOR_HPP
void resetRobotStarted()
Signal emitted when robot reset starts.
QString evaluationFilePath
The file path to the evaluation script of the subtask.
Definition: task.hpp:37
void finished()
Signal emitted when the script execution finishes.
void executePythonScript(const QString &scriptPath, const QString &name)
Executes a given Python script.
Definition: script_worker.cpp:172
void forceStop()
Forces the stop of all currently running tasks.
Definition: task_executor.cpp:62
void failed(const QString &error)
Signal emitted when the script execution fails.
Executes tasks and manages their execution state.
Definition: task_executor.hpp:19
int timeoutSeconds
The timeout for the subtask execution in seconds.
Definition: task.hpp:40
const QString RESET_ROBOT_SCRIPT_PATH
Path to the reset robot script.
Definition: folder_structure_constants.hpp:27
void resetRobotFinished()
Signal emitted when robot reset finishes.
QString solutionFilePath
The file path to the solution of the subtask.
Definition: task.hpp:36
QString getPackagePath()
Retrieves the path of the package.
Definition: folder_structure_constants.hpp:80
QWeakPointer< Task > parentTask
Weak pointer to the parent task.
Definition: task.hpp:45
void taskExecutionFinished()
Signal emitted when task execution finishes.
void taskExecutionStarted()
Signal emitted when task execution starts.
QString filePath
The file path of the subtask.
Definition: task.hpp:35
void executeTask(const Subtask &subtask, bool startSolution=false)
Executes a given subtask.
Definition: task_executor.cpp:10
void taskExecutionFailed(const QString &error)
Signal emitted when task execution fails.
void resetRobotFailed(const QString &error)
Signal emitted when robot reset fails.
const QString CONVERTED_SCRIPT_PATH
Path to the converted script.
Definition: folder_structure_constants.hpp:21
void startExecution()
Starts the execution of the scripts.
Definition: script_worker.cpp:38
bool parallelizedEvaluationRequired
Whether parallelized evaluation is required.
Definition: task.hpp:41
Represents a subtask within a task.
Definition: task.hpp:31
TaskExecutor(QObject *parent=nullptr)
Constructs a TaskExecutor object.
Definition: task_executor.cpp:8
Manages the execution of scripts for tasks.
Definition: script_worker.hpp:21
void resetRobot()
Triggers python script to reset the robot to its initial state and removes all objects from the scene...
Definition: task_executor.cpp:68