This class is a Qt widget which displays the data (odometry and commands) of the controller.
More...
#include <display.hpp>
|
enum | Labels {
tOdom,
xOdom,
yOdom,
thOdom,
vOdom,
omOdom,
vCmd,
omCmd,
nbLabels,
nbOdoms = vCmd,
nbCmds = nbLabels - nbOdoms
} |
| These are the indexes of the array of labels. More...
|
|
|
static const char * | names [] |
| Labels shown before the values, and headers in the ouput file. More...
|
|
This class is a Qt widget which displays the data (odometry and commands) of the controller.
- Since
- 0.2.2
Definition at line 25 of file display.hpp.
These are the indexes of the array of labels.
Enumerator |
---|
tOdom |
Index of the odometry's time.
|
xOdom |
Index of the odometry's position abscissa.
|
yOdom |
Index of the odometry's position ordinate.
|
thOdom |
Index of the odometry's orientation.
|
vOdom |
Index of the odometry's translation velocity.
|
omOdom |
Index of the odometry's rotation velocity.
|
vCmd |
Index of the commands' translation velocity.
|
omCmd |
Index of the commands' rotation velocity.
|
nbLabels |
Number of labels in the array.
|
nbOdoms |
Number of odometry indexes.
|
nbCmds |
Number of commands indexes.
|
Definition at line 33 of file display.hpp.
DataWidget::DataWidget |
( |
QWidget & |
parent | ) |
|
The constructor needs the ROS node whose data will be displayed.
- Parameters
-
parent | The windget containing this widget. |
Definition at line 25 of file display.cpp.
DataWidget::~DataWidget |
( |
| ) |
|
|
inline |
The destructor closes the output stream, if any.
- Since
- 0.2.3
Definition at line 91 of file display.hpp.
void DataWidget::addTrajectory |
( |
const std::list< State * > & |
trajectory | ) |
|
|
inline |
void DataWidget::newTrajectory |
( |
| ) |
|
|
inline |
void DataWidget::outputEnd |
( |
| ) |
|
|
inlineprivate |
Close and terminate the output stream.
- Since
- 0.2.3
Definition at line 78 of file display.hpp.
bool DataWidget::outputOK |
( |
| ) |
const |
|
inlineprivate |
Is the output stream OK for writting?
- Returns
- Yes if OK, no otherwise.
- Since
- 0.2.3
Definition at line 74 of file display.hpp.
void DataWidget::setLabels |
( |
const Labels & |
offset, |
|
|
const Labels & |
nbData, |
|
|
const double * |
data |
|
) |
| |
|
private |
Transfer data into the labels.
This is the common part of updateOdometry and updateCommands.
- Parameters
-
offset | The initial index in the label array, |
nbData | the number of data to transfer, |
data | the array of data to display. |
- See also
- labels.
Definition at line 69 of file display.cpp.
void DataWidget::setOutput |
( |
const char * |
output_file_name | ) |
|
|
inline |
Change the output stream to a new file.
- Parameters
-
output_file_name | The output file name. |
- Since
- 0.2.3
Definition at line 95 of file display.hpp.
void DataWidget::updateCommands |
( |
const double & |
trans_vel, |
|
|
const double & |
rot_vel |
|
) |
| |
Update the display of the controller's commands.
- Parameters
-
trans_vel | the translation velocity sent to ROS, |
rot_vel | the rotation velocity sent to ROS. |
- Since
- 0.3.1
Definition at line 105 of file display.cpp.
void DataWidget::updateState |
( |
const State & |
state | ) |
|
Update the display of the state.
- Parameters
-
state | The state of the robot. |
- Since
- 0.3.1
Definition at line 85 of file display.cpp.
QPointF DataWidget::last_vel |
|
private |
The last command published.
- Since
- 0.2.3
Definition at line 28 of file display.hpp.
Window showing the motion's path and velocities.
- Since
- 0.3.1
Definition at line 57 of file display.hpp.
const char * DataWidget::names |
|
staticprivate |
Initial value:=
{"t", "x", "y", "theta", "v", "omega", "v", "omega"}
Labels shown before the values, and headers in the ouput file.
- Since
- 0.2.3
Definition at line 49 of file display.hpp.
std::ofstream* DataWidget::output |
|
private |
The output stream, if any.
- Since
- 0.2.3
Definition at line 29 of file display.hpp.
The documentation for this class was generated from the following files: