Class LightsDriverNode
Defined in File lights_driver_node.hpp
Inheritance Relationships
Base Type
public rclcpp::Node
Class Documentation
-
class LightsDriverNode : public rclcpp::Node
Class for controlling APA102 LEDs based on a ROS Image topic.
Protected Functions
-
void ClearLEDs()
Clears all LEDs on both channels.
Callback to execute when service invoked to toggle LED control returns response.
- Parameters:
future – Future object with request and response of the service call.
Callback to execute when a message with new frame is received.
- Parameters:
msg – ROS Image message received.
panel – APA102 panel for which LEDs should be set.
last_time – ROS time of the last message received.
panel_name – name of the panel for which the message was received, used for improved logging. Valid names are: ‘channel_1’, ‘channel_2’.
-
void PanelThrottleWarnLog(const std::string panel_name, const std::string message)
Logs a warning message to the panel throttle log. Since this is throttle warning, we need to add panel name condition to log from both panels.
- Parameters:
panel_name – name of the panel for which the message was received, used for improved logging. Valid names are: ‘channel_1’, ‘channel_2’.
message – warning message to log.
-
void ClearLEDs()