Skip to content

Conversation

@ArashdeepSinghMaan
Copy link
Contributor

Expanded explanation of the main function and ROS 2 initialization process.

Description

Fixes # (issue)

Did you use Generative AI?

Additional Information

Expanded explanation of the main function and ROS 2 initialization process.

Signed-off-by: Arashdeep Singh <[email protected]>
…p-Publisher-And-Subscriber.rst

Co-authored-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Arashdeep Singh <[email protected]>
Copy link
Collaborator

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


Following the ``MinimalPublisher`` class is ``main``, where the node actually executes.
``rclcpp::init`` initializes ROS 2, and ``rclcpp::spin`` starts processing data from the node, including callbacks from the timer.
``rclcpp::init`` initializes ROS 2, and ``rclcpp::spin`` starts processing data from the node, including callbacks from the timer. The ``main()`` function begins by calling ``rclcpp::init(argc, argv);`` which initializes the ROS 2 client library.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

single sentence per line.

Suggested change
``rclcpp::init`` initializes ROS 2, and ``rclcpp::spin`` starts processing data from the node, including callbacks from the timer. The ``main()`` function begins by calling ``rclcpp::init(argc, argv);`` which initializes the ROS 2 client library.
``rclcpp::init`` initializes ROS 2, and ``rclcpp::spin`` starts processing data from the node, including callbacks from the timer.
The ``main()`` function begins by calling ``rclcpp::init(argc, argv);`` which initializes the ROS 2 client library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants