-
Notifications
You must be signed in to change notification settings - Fork 0
/
static_ground_image.hpp
63 lines (45 loc) · 1.69 KB
/
static_ground_image.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef STATIC_GROUND_IMAGE_HPP_
#define STATIC_GROUND_IMAGE_HPP_
#include <QtCore> // NOLINT
#include "rviz_ground_image/utils/static_image_texture.hpp"
#include "rviz_common/message_filter_display.hpp"
#include "rviz_common/properties/property.hpp"
#include "rviz_common/properties/float_property.hpp"
#include "rviz_common/properties/tf_frame_property.hpp"
#include "rviz_common/render_panel.hpp"
#include "rviz_default_plugins/visibility_control.hpp"
#include "rviz_default_plugins/displays/image/ros_image_texture.hpp"
#include "rviz_rendering/render_window.hpp"
#include <OgreManualObject.h>
#include <rviz_common/display.hpp>
#include <OgreSceneNode.h>
namespace rviz_ground_image
{
class RVIZ_DEFAULT_PLUGINS_PUBLIC StaticGroundImage: public rviz_common::Display
{
Q_OBJECT
public:
explicit StaticGroundImage(rviz_common::DisplayContext * context);
StaticGroundImage();
protected:
void onInitialize() override;
void reset() override;
// Overrides from Display
void update(float dt, float ros_dt) override;
private Q_SLOTS:
void updateImageAndDimensions();
private:
void setupProperties();
void setupScreenRectangle();
std::unique_ptr<StaticImageTexture> texture_;
Ogre::ManualObject * screen_rect_;
bool image_loaded_ = false;
Ogre::SceneNode * object_node_;
Ogre::MaterialPtr material_;
rviz_common::properties::StringProperty * image_path_property_;
rviz_common::properties::TfFrameProperty * frame_property_;
rviz_common::properties::FloatProperty * width_property_;
rviz_common::properties::FloatProperty * height_property_;
};
} // namespace ground_image
#endif // GROUND_IMAGE__GROUND_IMAGE_DISPLAY_HPP_