10 #include <QGraphicsView> 11 #include <QVBoxLayout> 22 QWidget *vel_wdgt =
new QWidget();
23 QLayout *vel_layout =
new QVBoxLayout(vel_wdgt);
30 static const Qt::GlobalColor traj_color = Qt::green;
32 for(std::list<State*>::const_iterator it = trajectory.begin();
33 it != trajectory.end(); it++) {
40 const Qt::GlobalColor motion_color) {
41 static const int abscIdx = 0, ordoIdx = abscIdx + 1,
42 timeIdx = ordoIdx + 1, tranIdx = timeIdx + 1,
43 rotaIdx = tranIdx + 1, nmbrIdx = rotaIdx + 1;
46 const QPen motion_pen = QColor(motion_color);
48 static const double factors[nmbrIdx]
49 = {50, 50, 25, 100, 300 / M_PI};
53 const iSeeML::geom::Point old_P = old_q.position(),
57 ( factors[abscIdx] * old_P.xCoord(), - factors[ordoIdx]
58 * old_P.yCoord(), factors[abscIdx] * P.xCoord(),
59 - factors[ordoIdx] * P.yCoord(), motion_pen );
64 factors[timeIdx] * state.
date(),
70 factors[timeIdx] * state.
date(),
QGraphicsScene rot_vel_scene
The scene containing the rotation velocity profile.
const double & rotationVelocity() const
Gives the rotation velocity of the state.
const iSeeML::rob::OrPtConfig & configuration() const
Gives the configuration of the state.
void addTrajectory(const std::list< State * > &trajectory)
const double & translationVelocity() const
Gives the translation velocity of the state.
const double & date() const
Gives the configuration of the state.
This class defines a state, i.e. a configuration and its (translation and rotation) velocities...
void addState(const State &state, const Qt::GlobalColor motion_color=Qt::blue)
QGraphicsScene path_scene
bool not_first_state
Is next state the first one?
QTabWidget motion_window
The window containing the displays.
State last_state
Last state added.
Qt based overview of the robot's motion.
QGraphicsScene trans_vel_scene
The scene containing the translation velocity profile.