15#ifndef GZ_RESOURCE_MANAGER_HPP_
16#define GZ_RESOURCE_MANAGER_HPP_
23#include <gz/sim/Entity.hh>
24#include <gz/sim/EntityComponentManager.hh>
26#include <hardware_interface/resource_manager.hpp>
27#include <hardware_interface/types/resource_manager_params.hpp>
28#include <pluginlib/class_loader.hpp>
29#include <rclcpp/logger.hpp>
30#include <rclcpp/node.hpp>
32#include "gz_ros2_control/gz_system_interface.hpp"
36namespace gz_ros2_control
45 std::unique_ptr<GazeboSimSystemInterface>(
const std::string & plugin_name)>;
54 rclcpp::Node::SharedPtr & node,
55 gz::sim::EntityComponentManager & ecm,
56 std::map<std::string, gz::sim::Entity> enabledJoints,
68 std::shared_ptr<rclcpp::Node> node_;
69 gz::sim::EntityComponentManager * ecm_;
70 std::map<std::string, gz::sim::Entity> enabledJoints_;
73 std::unique_ptr<pluginlib::ClassLoader<GazeboSimSystemInterface>> gz_system_loader_;
77 rclcpp::Logger logger_;
Resource manager that loads GazeboSimSystemInterface plugins and initializes them with the simulation...
Definition gz_resource_manager.hpp:41
std::function< std::unique_ptr< GazeboSimSystemInterface >(const std::string &plugin_name)> SystemLoader
Creates a hardware component from its plugin name, throws std::exception on failure.
Definition gz_resource_manager.hpp:45
bool load_and_initialize_components(const hardware_interface::ResourceManagerParams ¶ms) override
Called from Controller Manager when robot description is initialized from callback.
Definition gz_resource_manager.cpp:55
Definition resource_manager.hpp:59
Parameters required for the construction and initial setup of a ResourceManager. This struct is typic...
Definition resource_manager_params.hpp:30