43 ROSserver(QObject* parent) : QThread(parent), ROS_run(true) {}
49 static const std::string begin(
"$ROS_WS/src/qt_ctrl/");
50 workspace = begin + wrksp;
57 void sleep(
const long& seconds)
const { QThread::sleep(seconds); }
73 #endif // QTCTRL_THREAD void threadError(QProcess::ProcessError error)
Signals which error occured when starting the process.
void run()
The main method of this thread.
ROSserver(QObject *parent)
Starts a ROS server in a separate thread.
std::string workspace
Name of the workspace selected.
void stop()
Stops the ROS server (and the thread's execution).
void setWorkspace(const std::string &wrksp)
Set the workspace name.
void errorOccurred(const int error, const QString &program)
Signals the error occured when starting the process.
bool ROS_run
Should the ROS server continue to run?
This class is used to start a ROS server.
void sleep(const long &seconds) const
Waits for a given duration, in seconds.