Core component that filters incoming image messages by modifying their headers and republishing them on a timer.
More...
|
bool | activate () override |
| Activates the ImageFilter component by initializing a timer.
|
|
bool | configure () override |
| Configures the ImageFilter component.
|
|
bool | deactivate () override |
| Deactivates the ImageFilter component by disabling the timer.
|
|
| ImageFilter (rclcpp_lifecycle::LifecycleNode::SharedPtr parent) |
| Constructs an ImageFilter object and initializes the parent lifecycle node.
|
|
void | process_in_image (sensor_msgs::msg::Image::UniquePtr msg) |
| Processes an incoming image message by modifying its header.
|
|
void | timer_callback () |
| Timer callback function that retrieves an image message and processes it.
|
|
| Core (rclcpp_lifecycle::LifecycleNode::SharedPtr parent) |
| Constructs a Core object associated with a parent lifecycle node.
|
|
void | set_afferent (cs4home_core::Afferent::SharedPtr afferent) |
| Sets the Afferent component associated with this Core.
|
|
void | set_efferent (cs4home_core::Efferent::SharedPtr efferent) |
| Sets the Efferent component associated with this Core.
|
|
|
cs4home_core::Afferent::SharedPtr | afferent_ |
| Shared pointer to the Afferent component.
|
|
cs4home_core::Efferent::SharedPtr | efferent_ |
| Shared pointer to the Efferent component.
|
|
rclcpp_lifecycle::LifecycleNode::SharedPtr | parent_ |
| Shared pointer to the parent lifecycle node.
|
|
Core component that filters incoming image messages by modifying their headers and republishing them on a timer.
◆ ImageFilter()
ImageFilter |
( |
rclcpp_lifecycle::LifecycleNode::SharedPtr | parent | ) |
|
|
explicit |
Constructs an ImageFilter object and initializes the parent lifecycle node.
- Parameters
-
parent | Shared pointer to the lifecycle node managing this ImageFilter instance. |
◆ activate()
Activates the ImageFilter component by initializing a timer.
The timer is set to call timer_callback
every 50 milliseconds.
- Returns
- True if activation is successful.
Implements Core.
◆ configure()
Configures the ImageFilter component.
- Returns
- True if configuration is successful.
Implements Core.
◆ deactivate()
Deactivates the ImageFilter component by disabling the timer.
The timer is reset to null, stopping periodic message processing.
- Returns
- True if deactivation is successful.
Implements Core.
◆ process_in_image()
void process_in_image |
( |
sensor_msgs::msg::Image::UniquePtr | msg | ) |
|
Processes an incoming image message by modifying its header.
The frame_id
in the image header is converted to an integer, doubled, and set as the new frame_id
. The modified message is then sent to the efferent component.
- Parameters
-
msg | Unique pointer to the incoming image message of type sensor_msgs::msg::Image . |
◆ timer_callback()
Timer callback function that retrieves an image message and processes it.
This function is called periodically and attempts to retrieve an image message from the afferent component. If a message is received, it is passed to process_in_image
.
The documentation for this class was generated from the following file: