rclcpp_components  master
Package containing tools for dynamically loadable components
Macros
register_node_macro.hpp File Reference
#include "class_loader/class_loader.hpp"
#include "rclcpp_components/node_factory_template.hpp"
Include dependency graph for register_node_macro.hpp:

Go to the source code of this file.

Macros

#define RCLCPP_COMPONENTS_REGISTER_NODE(NodeClass)
 Register a component that can be dynamically loaded at runtime. More...
 

Macro Definition Documentation

◆ RCLCPP_COMPONENTS_REGISTER_NODE

#define RCLCPP_COMPONENTS_REGISTER_NODE (   NodeClass)
Value:

Register a component that can be dynamically loaded at runtime.

The registration macro should appear once per component per library. The macro should appear in a single translation unit.

Valid arguments for NodeClass shall:

  • Have a constructor that takes a single argument that is a rclcpp::NodeOptions instance.
  • Have a method of of the signature: rclcpp::node_interfaces::NodeBaseInterface::SharedPtr get_node_base_interface

Note: NodeClass does not need to inherit from rclcpp::Node, but it is the easiest way.

CLASS_LOADER_REGISTER_CLASS
#define CLASS_LOADER_REGISTER_CLASS(Derived, Base)
rclcpp_components::NodeFactory
The NodeFactory interface is used by the class loader to instantiate components.
Definition: node_factory.hpp:29
rclcpp_components::NodeFactoryTemplate
NodeFactoryTemplate is a convenience class for instantiating components.
Definition: node_factory_template.hpp:32