15 #ifndef HARDWARE_INTERFACE__SYSTEM_HPP_
16 #define HARDWARE_INTERFACE__SYSTEM_HPP_
23 #include "hardware_interface/handle.hpp"
24 #include "hardware_interface/hardware_info.hpp"
25 #include "hardware_interface/types/hardware_interface_return_values.hpp"
26 #include "hardware_interface/visibility_control.h"
27 #include "rclcpp/duration.hpp"
28 #include "rclcpp/time.hpp"
29 #include "rclcpp_lifecycle/state.hpp"
33 class SystemInterface;
40 HARDWARE_INTERFACE_PUBLIC
41 explicit System(std::unique_ptr<SystemInterface> impl);
47 HARDWARE_INTERFACE_PUBLIC
48 const rclcpp_lifecycle::State & initialize(
const HardwareInfo & system_info);
50 HARDWARE_INTERFACE_PUBLIC
51 const rclcpp_lifecycle::State & configure();
53 HARDWARE_INTERFACE_PUBLIC
54 const rclcpp_lifecycle::State & cleanup();
56 HARDWARE_INTERFACE_PUBLIC
57 const rclcpp_lifecycle::State & shutdown();
59 HARDWARE_INTERFACE_PUBLIC
60 const rclcpp_lifecycle::State & activate();
62 HARDWARE_INTERFACE_PUBLIC
63 const rclcpp_lifecycle::State & deactivate();
65 HARDWARE_INTERFACE_PUBLIC
66 const rclcpp_lifecycle::State & error();
68 HARDWARE_INTERFACE_PUBLIC
69 std::vector<StateInterface> export_state_interfaces();
71 HARDWARE_INTERFACE_PUBLIC
72 std::vector<CommandInterface> export_command_interfaces();
74 HARDWARE_INTERFACE_PUBLIC
75 return_type prepare_command_mode_switch(
76 const std::vector<std::string> & start_interfaces,
77 const std::vector<std::string> & stop_interfaces);
79 HARDWARE_INTERFACE_PUBLIC
80 return_type perform_command_mode_switch(
81 const std::vector<std::string> & start_interfaces,
82 const std::vector<std::string> & stop_interfaces);
84 HARDWARE_INTERFACE_PUBLIC
85 std::string get_name()
const;
87 HARDWARE_INTERFACE_PUBLIC
88 const rclcpp_lifecycle::State & get_state()
const;
90 HARDWARE_INTERFACE_PUBLIC
91 return_type read(
const rclcpp::Time & time,
const rclcpp::Duration & period);
93 HARDWARE_INTERFACE_PUBLIC
94 return_type write(
const rclcpp::Time & time,
const rclcpp::Duration & period);
97 std::unique_ptr<SystemInterface> impl_;
Definition: system.hpp:36
Definition: actuator.hpp:31
This structure stores information about hardware defined in a robot's URDF.
Definition: hardware_info.hpp:106