45 CallbackReturn on_init(
46 const hardware_interface::HardwareComponentInterfaceParams & params)
override;
48 std::vector<hardware_interface::StateInterface::ConstSharedPtr> on_export_state_interfaces()
51 std::vector<hardware_interface::CommandInterface::SharedPtr> on_export_command_interfaces()
54 CallbackReturn on_activate(
const rclcpp_lifecycle::State & previous_state)
override;
56 CallbackReturn on_deactivate(
const rclcpp_lifecycle::State & previous_state)
override;
58 hardware_interface::return_type
read(
59 const rclcpp::Time & time,
const rclcpp::Duration & period)
override;
61 hardware_interface::return_type
write(
62 const rclcpp::Time & time,
const rclcpp::Duration & period)
override;
65 std::unique_ptr<zenoh::Session> session_;
70 realtime_tools::RealtimeThreadSafeBox<std::vector<uint8_t>> state_buffer_;
71 std::vector<uint8_t> command_buffer_;
74 std::unique_ptr<zenoh::Subscriber<void>> state_sub_;
75 std::unique_ptr<zenoh::Publisher> command_pub_;
77 std::vector<double> hw_commands_;
78 std::vector<double> hw_states_;
79 std::vector<hardware_interface::StateInterface::SharedPtr> state_interfaces_;
80 std::vector<hardware_interface::CommandInterface::SharedPtr> command_interfaces_;
81 std::string zenoh_endpoint_;
82 std::string zenoh_mode_;
83 std::string state_topic_;
84 std::string command_topic_;
85 rclcpp::Clock steady_clock_{RCL_STEADY_TIME};
hardware_interface::return_type read(const rclcpp::Time &time, const rclcpp::Duration &period) override
Read the current state values from the actuator.
Definition zenbedded_hardware.cpp:197
hardware_interface::return_type write(const rclcpp::Time &time, const rclcpp::Duration &period) override
Write the current command values to the actuator.
Definition zenbedded_hardware.cpp:218