Basic question regarding plugin
Hi guys. I have basic questions regarding plugins and I am using Gazebo with ROS. Firstly, in the plugin examples given in the tutorial, there is no main function, only class declaration. So how are the functions within the class in the plugin implemented? Is it that all the functions in “public” will be executed?
Secondly, can I know what this piece of code does?
// Listen to the update event. This event is broadcast every
// simulation iteration.
this->updateConnection = event::Events::ConnectWorldUpdateStart(
boost::bind(&ModelPush::OnUpdate, this));
From what I gather, this means that the ModelPush is binded as a function pointer and it will be call every time the world update by receiving a "world update" signal. Am I right?
If so, why is it that in the "Hello world" example (the first tutorial), the print function will executed?
Thanks