9 #ifndef QTCTRL_GUI_CTRL_VIEW 10 #define QTCTRL_GUI_CTRL_VIEW 35 QPoint
plot(
const QPointF& velocities)
const;
40 QRect
region(
const QPointF& vel)
const {
41 static const int offset = 2;
42 const QPoint intVel =
plot(vel);
43 return QRect(intVel, intVel).adjusted(-offset, -offset,
50 void modify(QPointF& variable,
const QPointF& value) {
91 {
modify( commands, QPointF(trans_vel, rot_vel) ); }
95 #endif // QTCTRL_CTRL_VIEW void updateState(const State &state)
Update the display of the odometry.
Controller is the abstract class inherited by all the implemented controllers.
~ViewCtrlWdgt()
The destructor needs to be redefined.
QPoint plot(const QPointF &velocities) const
Returns the graphical point corresponding to a couple of velocities.
const double & rotationVelocity() const
Gives the rotation velocity of the state.
void modify(QPointF &variable, const QPointF &value)
Memorizes a new value in a variable and redraw.
This class is a Qt widget which allows to show the controller's behaviour (current and aimed velociti...
QWidget & widget()
Returns the widget used to display the behaviour.
void updateCommands(const double &trans_vel, const double &rot_vel)
Update the display of the ROS node.
const double & translationVelocity() const
Gives the translation velocity of the state.
ViewCtrlWdgt(QWidget &parent, Controller &control, const MotionModel &motion_model)
The constructor needs the containing graphical object, the motion model and the related controller...
This class defines a state, i.e. a configuration and its (translation and rotation) velocities...
void paintEvent(QPaintEvent *event)
Draws the controller's velocities and their evolution.
Qt based control widget for qt_ctrl.
This class defines a motion model, with the motion limits.
QRect region(const QPointF &vel) const
Returns the graphical region drawn around velocities.
QPointF commands
The velocities sent as commands.
QPointF velocities
The velocities from the odometry.