Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
cras::NodeletManager Class Reference

Nodelet manager with customizable instance creation mechanism. More...

#include <nodelet_manager.h>

Inheritance diagram for cras::NodeletManager:
Inheritance graph
[legend]

Public Member Functions

virtual void init ()
 Initialize all class members. More...
 
 NodeletManager (::ros::NodeHandle nh={"~"})
 Create the nodelet manager. More...
 

Protected Types

typedef ::pluginlib::ClassLoader<::nodelet::NodeletClassLoader
 Type of the class loader used for loading nodelets. More...
 

Protected Member Functions

virtual ::boost::shared_ptr<::nodelet::NodeletcreateInstance (const ::std::string &lookupName)
 Create an instance of the given type. More...
 

Protected Attributes

::std::unique_ptr< ClassLoaderclassLoader
 Class loader used for loading nodelets. More...
 
::std::unique_ptr<::nodelet::Loaderloader
 Nodelet loader that loads and runs the nodelets. More...
 
::std::unique_ptr<::cras::LoaderROSloaderRos
 ROS API for the nodelet manager. More...
 
::ros::NodeHandle nh
 Node handle for the ROS API services. More...
 

Detailed Description

Nodelet manager with customizable instance creation mechanism.

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

Definition at line 31 of file nodelet_manager.h.

Member Typedef Documentation

◆ ClassLoader

Type of the class loader used for loading nodelets.

Definition at line 54 of file nodelet_manager.h.

Constructor & Destructor Documentation

◆ NodeletManager()

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

Create the nodelet manager.

Parameters
[in]nhThe nodehandle used for nodelet load/unload ROS services.

Member Function Documentation

◆ createInstance()

virtual ::boost::shared_ptr<::nodelet::Nodelet> cras::NodeletManager::createInstance ( const ::std::string &  lookupName)
protected

Create an instance of the given type.

Parameters
[in]lookupNameThe type to create instance of.
Returns
The instance (or nullptr if creation failed).

◆ init()

virtual void cras::NodeletManager::init ( )
virtual

Initialize all class members.

Reimplemented in cras::NodeletManagerSharingTfBuffer.

Member Data Documentation

◆ classLoader

::std::unique_ptr<ClassLoader> cras::NodeletManager::classLoader
protected

Class loader used for loading nodelets.

Definition at line 57 of file nodelet_manager.h.

◆ loader

::std::unique_ptr<::nodelet::Loader> cras::NodeletManager::loader
protected

Nodelet loader that loads and runs the nodelets.

Definition at line 62 of file nodelet_manager.h.

◆ loaderRos

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

ROS API for the nodelet manager.

Definition at line 65 of file nodelet_manager.h.

◆ nh

::ros::NodeHandle cras::NodeletManager::nh
protected

Node handle for the ROS API services.

Definition at line 68 of file nodelet_manager.h.


The documentation for this class was generated from the following file:


cras_cpp_common
Author(s): Martin Pecka
autogenerated on Tue Nov 26 2024 03:49:04