For now, the best thing to do is to follow the template provided in gazebo_plugins or mimic any of the examples in gazebo_plugins. Also take a look at gazebo configuration page to see how to setup plugin paths in your own packages.
Please keep in mind, plugin API's will change soon in F-Turtle, and will require some significant migratory changes/rewrites.
Proceeding on with the current setup, if you take a look at the template presented, there are 4 relevant member functions,
- constructor - this is called once when the plugin is instantiated in
Model::Load(...)
- InitChild() - this is called once during
Model::Init()
- UpdateChild() - this is called once per
Model::Update()
call - FiniChild() - this is called once when a Model / Body is deleted, or simulator is shutting down, before destruction happens
- destructor
The new plugin API for gazebo 1.0.0 RC to be released with Fuerte is described on the new gazebo wiki. Conversion from old plugin to the new format requires rewrite work described here.
@hsu I have a question here: http://answers.ros.org/question/25018... and I need custom plugin to actuate joints. I have seen some; But, I am having a hard time understanding function calls. Thanks for time and consideration.