A custom gazebo plugin that provides an interface to programatically alter visuals during simulation. More...
#include <VisualUtils.hh>
Public Member Functions | |
VisualUtils () | |
Constructs the object. More... | |
virtual | ~VisualUtils () |
Destroys the object. More... | |
virtual void | Load (rendering::VisualPtr _visual, sdf::ElementPtr _sdf) |
Loads the plugin. More... | |
void | Update () |
Update once per simulation iteration. More... | |
void | onRequest (VisualUtilsRequestPtr &_msg) |
Callback function for handling incoming requests. More... | |
Private Member Functions | |
void | loadResources () |
Loads names of available materials. More... | |
void | randomMaterialName (std::string &name) |
Randomly generates a new material name. More... | |
Private Attributes | |
std::unique_ptr< VisualUtilsPrivate > | dataPtr |
Private data pointer. More... | |
A custom gazebo plugin that provides an interface to programatically alter visuals during simulation.
Materials are assumed to be loaded and name [pattern][index] See the example usage below:
See worlds/visual.world for a complete example.
VisualUtils | ( | ) |
Constructs the object.
Register this plugin with the simulator.
|
virtual |
Destroys the object.
|
virtual |
Loads the plugin.
_visual | The visual to which the plugin is attached |
_sdf | The SDF element with plugin parameters |
|
private |
Loads names of available materials.
void onRequest | ( | VisualUtilsRequestPtr & | _msg | ) |
Callback function for handling incoming requests.
_msg | The message |
|
private |
Randomly generates a new material name.
name | Output random material name |
void Update | ( | ) |
Update once per simulation iteration.
|
private |
Private data pointer.