49 GPIO_COMMAND_CONTROLLER_PUBLIC
52 GPIO_COMMAND_CONTROLLER_PUBLIC
55 GPIO_COMMAND_CONTROLLER_PUBLIC
58 GPIO_COMMAND_CONTROLLER_PUBLIC
59 CallbackReturn
on_init()
override;
61 GPIO_COMMAND_CONTROLLER_PUBLIC
62 CallbackReturn on_configure(
const rclcpp_lifecycle::State & previous_state)
override;
64 GPIO_COMMAND_CONTROLLER_PUBLIC
65 CallbackReturn on_activate(
const rclcpp_lifecycle::State & previous_state)
override;
67 GPIO_COMMAND_CONTROLLER_PUBLIC
68 CallbackReturn on_deactivate(
const rclcpp_lifecycle::State & previous_state)
override;
70 GPIO_COMMAND_CONTROLLER_PUBLIC
71 controller_interface::return_type
update(
72 const rclcpp::Time & time,
const rclcpp::Duration & period)
override;
75 void store_command_interface_types();
76 void store_state_interface_types();
77 void initialize_gpio_state_msg();
78 void update_gpios_states();
79 controller_interface::return_type update_gpios_commands();
81 std::unordered_map<std::string, std::reference_wrapper<T>> create_map_of_references_to_interfaces(
82 const InterfacesNames & interfaces_from_params, std::vector<T> & configured_interfaces);
84 bool check_if_configured_interfaces_matches_received(
85 const InterfacesNames & interfaces_from_params,
const T & configured_interfaces);
86 void apply_state_value(
87 StateType & state_msg, std::size_t gpio_index, std::size_t interface_index)
const;
89 const CmdType & gpio_commands, std::size_t gpio_index,
90 std::size_t command_interface_index)
const;
91 InterfacesNames get_gpios_state_interfaces_names(
const std::string & gpio_name)
const;
92 bool update_dynamic_map_parameters();
93 std::vector<hardware_interface::ComponentInfo> get_gpios_from_urdf()
const;
96 InterfacesNames command_interface_types_;
97 InterfacesNames state_interface_types_;
98 MapOfReferencesToCommandInterfaces command_interfaces_map_;
99 MapOfReferencesToStateInterfaces state_interfaces_map_;
102 rclcpp::Subscription<CmdType>::SharedPtr gpios_command_subscriber_{};
104 std::shared_ptr<rclcpp::Publisher<StateType>> gpio_state_publisher_{};
105 std::shared_ptr<realtime_tools::RealtimePublisher<StateType>> realtime_gpio_state_publisher_{};
107 std::shared_ptr<gpio_command_controller_parameters::ParamListener> param_listener_{};
108 gpio_command_controller_parameters::Params params_;
GPIO_COMMAND_CONTROLLER_PUBLIC CallbackReturn on_init() override
Extending interface with initialization method which is individual for each controller.
Definition gpio_command_controller.cpp:42