#include <glWidget.hh>
|
void | obstacleDataReady (const std::map< float, int > &lidarData) |
| Slot to get lidar data when parser sent signal that this data is ready. More...
|
|
|
virtual void | init () override |
| Initialize openGL widget. More...
|
|
virtual void | draw () override |
| Draw content in openGL widget. More...
|
|
virtual QString | helpString () const override |
| Construct help string for openGL widget. More...
|
|
|
void | drawRobot () |
| Draw robot shape. More...
|
|
void | drawOneObstacle (GLfloat x, GLfloat y, GLfloat z, GLfloat color) |
| Draw one obstacle. More...
|
|
void | _drawCube (GLfloat size, GLubyte R, GLubyte G, GLubyte B) |
| Draw cube shape. More...
|
|
void | _drawCylinder (GLfloat radius, GLfloat height, GLubyte R, GLubyte G, GLubyte B) |
| Draw cylinder shape. More...
|
|
Definition at line 19 of file glWidget.hh.
◆ GLWidget()
GLWidget::GLWidget |
( |
QWidget * |
parent | ) |
|
- Parameters
-
[in] | parent | Poiter to parent widget |
Definition at line 14 of file glWidget.cpp.
◆ _drawCube()
void GLWidget::_drawCube |
( |
GLfloat |
size, |
|
|
GLubyte |
R, |
|
|
GLubyte |
G, |
|
|
GLubyte |
B |
|
) |
| |
|
private |
- Parameters
-
[in] | size | Cube size |
[in] | R | Red color value [0-255] |
[in] | G | Green color value [0-255] |
[in] | B | Blue color value [0-255] |
Definition at line 122 of file glWidget.cpp.
◆ _drawCylinder()
void GLWidget::_drawCylinder |
( |
GLfloat |
radius, |
|
|
GLfloat |
height, |
|
|
GLubyte |
R, |
|
|
GLubyte |
G, |
|
|
GLubyte |
B |
|
) |
| |
|
private |
- Parameters
-
[in] | radius | Cylinder radius |
[in] | height | Cylinder height |
[in] | R | Red color value [0-255] |
[in] | G | Green color value [0-255] |
[in] | B | Blue color value [0-255] |
Definition at line 169 of file glWidget.cpp.
◆ draw()
◆ drawOneObstacle()
void GLWidget::drawOneObstacle |
( |
GLfloat |
x, |
|
|
GLfloat |
y, |
|
|
GLfloat |
z, |
|
|
GLfloat |
color |
|
) |
| |
|
private |
- Parameters
-
[in] | x | Coordinate on x axis |
[in] | y | Coordinate on y axis |
[in] | z | Coordinate on z axis |
[in] | color | Obstacle color |
Definition at line 113 of file glWidget.cpp.
◆ drawRobot()
void GLWidget::drawRobot |
( |
| ) |
|
|
private |
◆ helpString()
QString GLWidget::helpString |
( |
| ) |
const |
|
overrideprotectedvirtual |
◆ init()
◆ obstacleDataReady
void GLWidget::obstacleDataReady |
( |
const std::map< float, int > & |
lidarData | ) |
|
|
slot |
- Parameters
-
[in] | lidarData | Lidar data from frame parser |
Definition at line 16 of file glWidget.cpp.
◆ __lidarHeight
const float GLWidget::__lidarHeight = 210.0 * __scale |
|
private |
◆ __obstacleSize
const float GLWidget::__obstacleSize = 30.0 * __scale |
|
private |
◆ __robotHeight
const float GLWidget::__robotHeight = 200.0 * __scale |
|
private |
◆ __robotRadius
const float GLWidget::__robotRadius = 300.0 * __scale |
|
private |
◆ __robotWheelRadius
const float GLWidget::__robotWheelRadius = 100.0 * __scale |
|
private |
◆ __robotWheelThickness
const float GLWidget::__robotWheelThickness = 50.0 * __scale |
|
private |
◆ __scale
const float GLWidget::__scale = 1.0f / 4000.0f |
|
private |
Some dimensions used in drawing im millimiters
Scale is important because max distance from lidar is 4m so we have to scale down other dimensions to fit all data in 1x1x1 cube
Definition at line 102 of file glWidget.hh.
◆ _obstacleCoordinates
std::vector<std::vector<float> > GLWidget::_obstacleCoordinates |
|
private |
◆ _obstacleRadius
std::vector<float> GLWidget::_obstacleRadius |
|
private |
The documentation for this class was generated from the following files: