Class NodeletManager

Inheritance Relationships

Derived Type

Class Documentation

class NodeletManager

Nodelet manager with customizable instance creation mechanism.

The standard usage of this class is creating its instance, calling init() and then ros::spin().

Subclassed by cras::NodeletManagerSharingTfBuffer

Public Functions

explicit NodeletManager(::ros::NodeHandle nh = {"~"})

Create the nodelet manager.

Parameters:

nh[in] The nodehandle used for nodelet load/unload ROS services.

virtual void init()

Initialize all class members.

Protected Types

typedef ::pluginlib::ClassLoader<::nodelet::Nodelet> ClassLoader

Type of the class loader used for loading nodelets.

Protected Functions

::boost::shared_ptr<::nodelet::Nodelet> createInstance(const ::std::string &lookupName)

Create an instance of the given type.

Parameters:

lookupName[in] The type to create instance of.

Returns:

The instance (or nullptr if creation failed).

Protected Attributes

::std::unique_ptr<ClassLoader> classLoader

Class loader used for loading nodelets.

::std::unique_ptr<::nodelet::Loader> loader

Nodelet loader that loads and runs the nodelets.

::std::unique_ptr<::cras::LoaderROS> loaderRos

ROS API for the nodelet manager.

::ros::NodeHandle nh

Node handle for the ROS API services.