Implements the functionalities of the robot visualization widget. Inherits form QWidget and Ui_robotVisualization (auto created from ui file) More...
#include <stdr_robot_visualization.h>
Public Member Functions | |
void | closeEvent (QCloseEvent *event) |
Called when the close event is triggered. | |
CRobotVisualisation (QString name, float resolution) | |
Default contructor. | |
void | destruct (void) |
Destroys the visualizer. | |
bool | getActive (void) |
Returns true if the visualizer is active. | |
int | getInternalImageSize (void) |
Returns the internal image size. | |
void | setCurrentPose (geometry_msgs::Pose2D pose) |
Sets the robot's current pose. | |
void | setCurrentSpeed (std::vector< float > msg) |
Sets the robot's current speed. | |
void | setImage (QImage img) |
Sets the image to be shown. | |
~CRobotVisualisation (void) | |
Default destructor. | |
Private Attributes | |
bool | active_ |
< True if the visualizer is active | |
QImage | internal_image_ |
A void image. | |
QString | name_ |
float | resolution_ |
The image to draw into. | |
QImage | void_image_ |
The robot frame id. |
Implements the functionalities of the robot visualization widget. Inherits form QWidget and Ui_robotVisualization (auto created from ui file)
Definition at line 38 of file stdr_robot_visualization.h.
stdr_gui::CRobotVisualisation::CRobotVisualisation | ( | QString | name, |
float | resolution | ||
) |
Default contructor.
name | [QString] Robot frame id |
resolution | [float] Map resolution |
Definition at line 32 of file stdr_robot_visualization.cpp.
void stdr_gui::CRobotVisualisation::closeEvent | ( | QCloseEvent * | event | ) |
Called when the close event is triggered.
event | [QCloseEvent*] The close event |
Definition at line 75 of file stdr_robot_visualization.cpp.
void stdr_gui::CRobotVisualisation::destruct | ( | void | ) |
bool stdr_gui::CRobotVisualisation::getActive | ( | void | ) |
Returns true if the visualizer is active.
Definition at line 85 of file stdr_robot_visualization.cpp.
int stdr_gui::CRobotVisualisation::getInternalImageSize | ( | void | ) |
Returns the internal image size.
void stdr_gui::CRobotVisualisation::setCurrentPose | ( | geometry_msgs::Pose2D | pose | ) |
Sets the robot's current pose.
pose | [geometry_msgs::Pose2D] the robot pose |
Definition at line 107 of file stdr_robot_visualization.cpp.
void stdr_gui::CRobotVisualisation::setCurrentSpeed | ( | std::vector< float > | msg | ) |
Sets the robot's current speed.
msg | [std::vector<float>] the robot speeds |
msg | [std::pair<float,float>] the robot speeds |
Definition at line 122 of file stdr_robot_visualization.cpp.
void stdr_gui::CRobotVisualisation::setImage | ( | QImage | img | ) |
Sets the image to be shown.
img | [QImage] The drawn image |
Definition at line 95 of file stdr_robot_visualization.cpp.
bool stdr_gui::CRobotVisualisation::active_ [private] |
< True if the visualizer is active
The map resolution
Definition at line 46 of file stdr_robot_visualization.h.
QImage stdr_gui::CRobotVisualisation::internal_image_ [private] |
A void image.
Definition at line 50 of file stdr_robot_visualization.h.
QString stdr_gui::CRobotVisualisation::name_ [private] |
Definition at line 53 of file stdr_robot_visualization.h.
float stdr_gui::CRobotVisualisation::resolution_ [private] |
The image to draw into.
Definition at line 48 of file stdr_robot_visualization.h.
QImage stdr_gui::CRobotVisualisation::void_image_ [private] |
The robot frame id.
Definition at line 52 of file stdr_robot_visualization.h.