13 #include <QMainWindow> 27 Q_DECLARE_METATYPE(
State)
105 void writeSettings();
111 connect( controller, SIGNAL( stateUpdated(
const State&) ),
112 this, SLOT( updateState(
const State&) ) );
114 SIGNAL( commandsUpdated(
const double&,
const double&) ),
115 this, SLOT( updateCommands(
const double&,
const double&)
130 QtCtrlGUI(
const int argc,
char** argv, QWidget *parent = 0);
159 { ctrl_node.
end(); ROS_server.
stop(); }
160 writeSettings(); QMainWindow::closeEvent(event);
161 qApp->closeAllWindows();
188 void threadError(
const int error,
const QString& program);
194 void buttonStartStop();
207 ->getAimedTrajectory() ); }
ROSnode ctrl_node
The ROS node at the center of this GUI.
Controller is the abstract class inherited by all the implemented controllers.
QMenuBar menu_bar
The menu bar of this GUI.
Oriented point reaching controller class using a smooth path generator.
void updateState(const State &state)
Update the display of the state.
void updateLogging()
Method activated when this GUI's log view is updated.
QMenu app_menu
The actions' menu of this GUI.
ROSserver ROS_server
The instance used to start a ROS server, if needed.
const MotionModel & motionModel() const
The motion model of the controlled robot.
QToolBar tool_bar
The tool bar of this GUI.
void updateCommands(const double &trans_vel, const double &rot_vel)
Update the display of the controller's commands.
QMenu help_menu
The help menu of this GUI.
void connectCtrl()
Connects the controller signals to this class' methods.
ControlWidget * ctrl_wdgt
The widget showing the controller's velocities can also change.
static const double time_step
The default time step.
void newTrajectory(const std::list< State * > &trajectory)
Adds a trajectory to the motion display.
Qt widget displaying data for qt_ctrl.
void stop()
Stops the ROS server (and the thread's execution).
This class defines a state, i.e. a configuration and its (translation and rotation) velocities...
Controller * controller
The controller of the ROS node can change.
bool connected() const
Indicates whether the node is connected to ROS.
SmoothPathCtrl aims at reaching an oriented point with the robot, using a smooth path generator...
Qt based thread for qt_ctrl package.
QAction about_action
The Qt action starting a dialog box about Qt Ctrl.
void keyReleaseEvent(QKeyEvent *event)
When a key is released, it is transmitted to the control widget.
void keyPressEvent(QKeyEvent *event)
All key press events are transmitted to the control widget.
Qt based control widget for qt_ctrl.
This class defines a motion model, with the motion limits.
~QtCtrlGUI()
Freeing the allocated pointer.
MotionModel motion_model
The motion model of the controlled robot.
DataWidget display
The data display widget of the ROS node.
void updateTrajectory()
Update the display of the .
QAction about_Qt_action
The Qt action starting a dialog box about Qt.
This class is the Qt main window of qt_ctrl package.
QAction start_stop_action
The Qt action starting the ROS node.
This class is used to start a ROS server.
void end()
Stops ROS if it has been started.
QListView logs
The Qt list view showing the logs of the ROS node.
void closeEvent(QCloseEvent *event)
The closing method of QMainWindow is surcharged to save settings before closing.
ROS node, getting sensors data and sending commands.