a minimal publisher class that extends the rclcpp::Node class to demonstrate how to create ROS2 Node
More...
#include <minimal_publisher_node.hpp>
|
| std::string | message_ |
| |
| rclcpp::TimerBase::SharedPtr | timer_ |
| | Shared pointer to the timer.
|
| |
| rclcpp::Publisher< std_msgs::msg::String >::SharedPtr | publisher_ |
| | Shared pointer to the publisher.
|
| |
| size_t | count_ |
| | Counter for the number of messages published.
|
| |
a minimal publisher class that extends the rclcpp::Node class to demonstrate how to create ROS2 Node
This class is used to create a ROS2 publisher that regularly publishes messages to a topic.
◆ MinimalPublisherNode()
| NS_HEAD MinimalPublisherNode::MinimalPublisherNode |
( |
| ) |
|
Construct a new Minimal Publisher object.
The constructor initializes the publisher and timer.
◆ timer_callback()
| void MinimalPublisherNode::timer_callback |
( |
| ) |
|
|
protected |
Callback function for the timer.
This function is called periodically by the timer. It publishes a message containing a string with a counter.
◆ count_
| size_t template_pkg::MinimalPublisherNode::count_ |
|
protected |
Counter for the number of messages published.
◆ message_
| std::string template_pkg::MinimalPublisherNode::message_ |
|
protected |
◆ publisher_
| rclcpp::Publisher<std_msgs::msg::String>::SharedPtr template_pkg::MinimalPublisherNode::publisher_ |
|
protected |
Shared pointer to the publisher.
◆ timer_
| rclcpp::TimerBase::SharedPtr template_pkg::MinimalPublisherNode::timer_ |
|
protected |
Shared pointer to the timer.
The documentation for this class was generated from the following files: