Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

What is the mechanism of "OnNewFrame" in CameraPlugin??

I investigated into the source code but did not understand how it works, especially confused about how the arguments are passed into the function. I only found these cues. I understand it as some callback function but where are the values of placeholders come from?

private: event::ConnectionPtr newFrameConnection;
this->newFrameConnection = this->camera->ConnectNewImageFrame(
std::bind(&CameraPlugin::OnNewFrame, this,
        std::placeholders::_1, std::placeholders::_2, std::placeholders::_3,
        std::placeholders::_4, std::placeholders::_5));