Skip to content

Files

Latest commit

Apr 26, 2025
2a01c22 · Apr 26, 2025

History

History

action_tutorials

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Apr 26, 2025
Apr 26, 2025
Sep 6, 2024

ROS 2 Action Tutorials

This tutorial demonstrates implementing ROS action servers and action clients.

The action server in this case takes in an integer value between 0 and 45 named order and returns the Fibonacci sequence, a sequence with the form: F 0 = 0 F 1 = 1 F o r d e r = F o r d e r 1 + F o r d e r 2

The action server calculates each number in the sequence one at a time and returns a partial sequence as feedback at each iteration. If the action is cancelled before the entire sequence is calculated, the server stops calculating the sequence and no result is returned. The action client in this tutorial sends a goal to the action server with an order of 10. It logs each partial sequence returned as feedback. Once the action is finished executing, the action client logs the resulting sequence.

Packages

  • action_tutorials_cpp implements the described action server and client using the rclcpp library in C++.
  • action_tutorials_py implements the described action server and client using the rclpy library in Python.