-
Notifications
You must be signed in to change notification settings - Fork 1
/
simple_visual.cc
32 lines (27 loc) · 892 Bytes
/
simple_visual.cc
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
#include <functional>
#include <gazebo/gazebo.hh>
#include <gazebo/physics/physics.hh>
#include <gazebo/common/common.hh>
#include <ignition/math/Vector3.hh>
namespace gazebo
{
class GZ_RENDERING_VISIBLE SimpleVisualPlugin : public VisualPlugin
{
public: void Load(rendering::VisualPtr _visual, sdf::ElementPtr _sdf)
{
gzmsg << "IN Simple Visual" << std::endl;
// Listen to the update event. This event is broadcast every
// simulation iteration.
this->updateConnection = event::Events::ConnectRender(
std::bind(&SimpleVisualPlugin::OnUpdate, this));
}
// Called by the world update start event
public: void OnUpdate()
{
}
// Pointer to the update event connection
private: event::ConnectionPtr updateConnection;
};
// Register this plugin with the simulator
GZ_REGISTER_VISUAL_PLUGIN(SimpleVisualPlugin)
}