Class SegmentQueueLayer
Defined in File segment_queue_layer.hpp
Inheritance Relationships
Base Type
public husarion_ugv_lights::SegmentLayerInterface(Class SegmentLayerInterface)
Class Documentation
-
class SegmentQueueLayer : public husarion_ugv_lights::SegmentLayerInterface
Class that represents virtual LED segment of the robot.
Public Functions
-
SegmentQueueLayer(const std::size_t num_led, const bool invert_led_order, const float controller_frequency)
Parses basic parameters of the LED segment.
- Parameters:
num_led – number of LEDs
invert_led_order – if true will invert the order of LEDs
controller_frequency – frequency at which animation will be updated.
- Throws:
std::runtime_error – or std::invalid_argument if missing required description key or key couldn’t be parsed
-
virtual void SetAnimation(const std::string &type, const YAML::Node &animation_description, const bool repeating, const std::string ¶m = "") override
Overwrite current animation.
- Parameters:
type – pluginlib animation type
animation_description – YAML description of the animation. Must contain ‘type’ key - pluginlib animation type
repeating – if true, will set the default animation for the panel
param – optional parameter to pass to animation when initializing
- Throws:
std::runtime_error – if ‘type’ key is missing, given pluginlib fails to load or animation fails to initialize
-
virtual void UpdateAnimation() override
Update animation frame.
- Throws:
std::runtime_error – if fails to update animation
-
SegmentQueueLayer(const std::size_t num_led, const bool invert_led_order, const float controller_frequency)