runtime/env_manager/include/component_manager/node_component.hpp

36 lines
1,015 B
C++

#ifndef ENV_MANAGER__COMPONENT_MANAGER__NODE_COMPONENT_HPP__
#define ENV_MANAGER__COMPONENT_MANAGER__NODE_COMPONENT_HPP__
#include "component_manager/visibility_control.h"
#include "rclcpp/node.hpp"
namespace env_manager
{
namespace component_manager
{
const std::string DEFAULT_NODE_NODE_NAME = "env_manager_node";
//TODO: interhit all another components from this node_component
class NodeComponent: public rclcpp::Node
{
public:
explicit NodeComponent(const rclcpp::NodeOptions& options)
:Node(DEFAULT_NODE_NODE_NAME, options)
{
auto ret = rcutils_logging_set_logger_level(
get_logger().get_name(), RCUTILS_LOG_SEVERITY_FATAL);
if (ret != RCUTILS_RET_OK)
{
RCLCPP_ERROR(get_logger(),
"Error setting severity: %s", rcutils_get_error_string().str);
rcutils_reset_error();
}
}
};
} // namesapce component_manager
} // namesapce env_manager
#endif // ENV_MANAGER__COMPONENT_MANAGER__NODE_COMPONENT_HPP__