Class LedsHardwareInterface

Inheritance Relationships

Base Type

Class Documentation

class bitbots_ros_control::LedsHardwareInterface : public bitbots_ros_control::HardwareInterface

Public Functions

LedsHardwareInterface(rclcpp::Node::SharedPtr nh, std::shared_ptr<DynamixelDriver> &driver, uint8_t id, uint8_t num_leds, uint8_t start_number)
virtual bool init()
virtual void read(const rclcpp::Time &t, const rclcpp::Duration &dt)
virtual void write(const rclcpp::Time &t, const rclcpp::Duration &dt)

Private Functions

void setLeds(const std::shared_ptr<bitbots_msgs::srv::Leds::Request> req, std::shared_ptr<bitbots_msgs::srv::Leds::Response> resp)
void ledCb0(std_msgs::msg::ColorRGBA msg)
void ledCb1(std_msgs::msg::ColorRGBA msg)
void ledCb2(std_msgs::msg::ColorRGBA msg)

Private Members

rclcpp::Node::SharedPtr nh_
std::shared_ptr<DynamixelDriver> driver_
uint8_t id_
uint8_t start_number_
bool write_leds_ = false
std::vector<std_msgs::msg::ColorRGBA> leds_
rclcpp::Service<bitbots_msgs::srv::Leds>::SharedPtr leds_service_
rclcpp::Subscription<std_msgs::msg::ColorRGBA>::SharedPtr sub0_
rclcpp::Subscription<std_msgs::msg::ColorRGBA>::SharedPtr sub1_
rclcpp::Subscription<std_msgs::msg::ColorRGBA>::SharedPtr sub2_