Skip to content

Instantly share code, notes, and snippets.

@mani-monaj
Created September 16, 2016 18:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mani-monaj/65dae3848482341593d999e6463c7cc3 to your computer and use it in GitHub Desktop.
Save mani-monaj/65dae3848482341593d999e6463c7cc3 to your computer and use it in GitHub Desktop.
#include <pluginlib/class_loader.h>
#include <rqt_gui_cpp/plugin.h>
...
pluginlib::ClassLoader<rqt_gui_cpp::Plugin> iv_loader("rqt_gui_cpp", "Plugin");
try
{
// also tried: rqt_image_view/ImageView
boost::shared_ptr<rqt_gui_cpp::Plugin> iv = iv_loader.createInstance("rqt_image_view::ImageView");
}
catch (const pluginlib::PluginlibException& ex)
{
ROS_ERROR("Error: %s", ex.what());
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment