A ROS Action is an asynchronous communication interface built on ROS topics that allows a client node to request a long-running goal from a server node and receive periodic feedback and a final result. It is designed for tasks like navigation or manipulation, where execution takes significant time and the client needs status updates without blocking. The protocol uses three separate topic channels: a goal, a feedback stream, and a result, managed by an Action Server and an Action Client.
Glossary
ROS Action

What is ROS Action?
An asynchronous communication interface for managing long-running tasks in robotic systems.
The action lifecycle provides a structured way to handle task preemption, cancellation, and failure recovery, making it superior to a simple service call for non-instantaneous operations. It is formally defined by an .action file, which specifies the goal, result, and feedback message types. This pattern is a core building block in ROS 2 Navigation2 and other complex robotic behaviors, enabling robust, stateful task execution within the ROS graph.
Core Characteristics of ROS Actions
ROS Actions are a specialized communication interface designed for long-running, interruptible tasks. They extend the basic publish-subscribe model with a structured client-server protocol for goals, feedback, and results.
Asynchronous Goal-Based Protocol
A ROS Action is fundamentally an asynchronous, goal-oriented communication pattern. A client sends a goal (e.g., 'navigate to pose X, Y') to an action server. The server executes the potentially long-running task without blocking the client, which can continue other operations, preempt the goal, or cancel it. This contrasts with synchronous ROS Services, which block the client for the entire request duration. The protocol is built on three ROS topics: goal, feedback, and result.
Feedback for Progress Monitoring
A key advantage over services is the built-in feedback mechanism. During goal execution, the action server can publish periodic feedback messages on a dedicated topic. This allows the client to monitor progress in real-time (e.g., '60% complete', 'current position: X, Y'). Feedback is crucial for user interfaces and for higher-level planning nodes that need to make decisions based on the progress of subordinate tasks.
- Example: A navigation action server might stream feedback containing the robot's estimated distance to the goal and current velocity.
Preemptable and Cancelable Execution
ROS Actions are designed to be interruptible. A client can send a new goal to the same server, which will preempt the currently executing goal. The client can also explicitly send a cancel request. The action server must handle these interrupts gracefully, typically stopping the current task, performing any necessary cleanup, and sending a canceled result status. This is essential for reactive robotic systems where priorities can change dynamically (e.g., 'stop moving and return to base').
Structured Result with Terminal State
Upon completion (successful, preempted, aborted, etc.), the action server sends a final result message to the client. This result is distinct from feedback and contains the outcome of the task. The action protocol defines a standard set of terminal states: SUCCEEDED, ABORTED, CANCELED, etc. This structured termination provides deterministic error handling and allows clients to programmatically react to different completion scenarios.
- Result vs. Feedback: Feedback is for interim progress; the result is the final, conclusive output of the action (e.g., the final pose achieved, a list of objects grasped).
Built on ROS Topics and Services
An Action is not a primitive communication type but a convention and API layer built atop standard ROS Topics and a Service. The ActionLib library in ROS 1 and the rclpy.action/rclcpp::action client libraries in ROS 2 implement this convention. Internally, it uses:
- A Service for goal submission and cancellation.
- Three Topics: one for the goal, one for feedback, and one for the result. This design leverages the existing, robust ROS communication infrastructure while providing a higher-level abstraction for complex tasks.
Common Use Cases in Robotics
ROS Actions are ideal for any robotic task that is non-instantaneous and benefits from monitoring or interruption.
- Autonomous Navigation:
MoveBaseaction for sending navigation goals. - Manipulation:
PickPlaceaction for complex pick-and-place sequences. - Perception:
ObjectDetectionaction for a lengthy scan-and-identify routine. - Human-Robot Interaction:
SpeechRecognitionaction for listening and processing audio. In these cases, the action client (e.g., a task planner) can monitor feedback, handle failures, and send new goals without managing low-level topic communication directly.
How ROS Actions Work: The Three-Topic Protocol
The ROS Action protocol is an asynchronous communication interface built on three dedicated ROS topics, enabling long-running, interruptible tasks with continuous feedback.
A ROS Action is an asynchronous client-server interface for executing long-running, preemptible tasks, built on three core ROS topics. The Action Client sends a goal to the Action Server via the /goal topic. The server then publishes periodic feedback on a separate topic while processing the task, and finally sends a result message upon completion or cancellation. This three-topic architecture separates command, status updates, and outcome.
This protocol directly addresses the limitations of ROS Services for extended operations. Unlike a blocking service call, an action allows the client to monitor progress via the feedback stream and cancel the goal mid-execution. The server's state machine manages goal acceptance, execution, and final states (SUCCEEDED, ABORTED, PREEMPTED), providing a robust framework for tasks like navigation, manipulation, or any operation requiring progress tracking and safe interruption.
ROS Action vs. Service vs. Topic
A comparison of the three primary communication mechanisms in the Robot Operating System (ROS), detailing their protocol, use cases, and characteristics.
| Feature | Topic (Publish/Subscribe) | Service (Request/Response) | Action (Goal/Feedback/Result) |
|---|---|---|---|
Communication Model | Asynchronous, one-way stream | Synchronous, blocking call | Asynchronous, long-running task |
Message Direction | One-to-many / Many-to-many | One-to-one (Client/Server) | One-to-one (Action Client/Server) |
Blocking Behavior | Non-blocking (fire-and-forget) | Blocking (client waits for reply) | Non-blocking (client can poll/cancel) |
Feedback Mechanism | None (independent messages) | None (single result only) | Periodic feedback stream |
Preemption/Cancellation | Not applicable | Not applicable | Supported (goal can be canceled) |
Primary Use Case | Continuous data streams (e.g., sensor data, odometry) | Quick, deterministic operations (e.g., toggle, calculation) | Long-duration, interruptible tasks (e.g., navigation, manipulation) |
Built On | Core ROS messaging | Core ROS messaging | Topics (two topics + one service) |
Typical Latency | Low (best-effort or reliable QoS) | Medium (RTT of request + processing) | Variable (depends on task duration) |
Common Use Cases for ROS Actions
ROS Actions are designed for long-running, interruptible tasks that require feedback. This section details the primary robotic scenarios where this asynchronous communication pattern is essential.
Long-Running Perception Tasks
Complex perception algorithms like 3D mapping, object recognition in a cluttered scene, or a full system calibration can take seconds. A ROS Action provides the ideal interface: a client requests a scan or analysis, receives periodic feedback (e.g., 'processing scan line 150 of 200', 'percentage of scene segmented'), and gets a final result containing the processed data (e.g., a point cloud map, a list of detected objects).
- Feedback:
percent_complete,current_processing_step - Result:
point_cloud,detected_objects_array,calibration_transform - Client State: The client is not blocked and can perform other computations while waiting for the final result.
Autonomous Charging or Docking
Docking a mobile robot with a charging station is a precise, multi-stage process involving approach, alignment, and final connection. A ROS Action manages this sequence: the goal initiates docking, feedback provides status (e.g., 'approaching', 'aligning', 'connected'), and the result confirms success or failure. The action can be preempted if an obstacle blocks the path or if a higher-priority task emerges.
- Sequential States: Feedback clearly communicates which phase of the docking procedure is active.
- Error Handling: The result can specify failure modes like
alignment_failedorcharger_unavailable. - Safety: Allows for immediate cancellation if a person enters the docking zone.
Multi-Step Task Orchestration
ROS Actions can be composed into hierarchical state machines or behavior trees. A high-level task manager acts as an action client to lower-level skill servers. For example, a 'Deliver Item' task might sequentially call: NavigateToKitchenAction, PickUpObjectAction, NavigateToOfficeAction, PlaceObjectAction. Each sub-action provides its own feedback and result, allowing the orchestrator to monitor the overall task's progress and handle failures at the granular skill level.
- Composability: Actions are the natural building block for complex, recoverable behaviors.
- Fault Tolerance: Failure in a sub-action (e.g., object not found) can be reported cleanly to the orchestrator for re-planning.
- Progress Tracking: The orchestrator can aggregate feedback from all sub-actions to estimate total task completion.
Software Update & System Diagnostics
Applying a firmware update or running a comprehensive system self-test are long-running operations with distinct progress stages. A management node sends an update or diagnostics goal. The server provides feedback on the current step (downloading, flashing, testing_motors, testing_sensors) and a final result with a detailed log and pass/fail status. This pattern is superior to a service call, which would block the client for the entire, potentially lengthy, duration.
- User Feedback: Critical for providing operational status to a human operator via a UI.
- Interruptibility: Allows an update to be canceled before the irreversible flashing phase.
- Result Data: The final result can contain a full diagnostic report or update verification hash.
Frequently Asked Questions
ROS Action is a core communication protocol for handling long-running, interruptible tasks in robotic systems. These FAQs address its mechanics, use cases, and how it differs from other ROS communication patterns.
A ROS Action is an asynchronous communication interface built on ROS topics that allows a client to request a long-running, interruptible goal from a server and receive periodic feedback and a final result. It operates via a client-server model using three distinct communication channels: a goal topic for sending the task request, a feedback topic for streaming intermediate progress updates, and a result topic for delivering the final outcome. The server executes the task, publishing feedback at its discretion, and eventually sends a result message with a status (e.g., SUCCEEDED, PREEMPTED, ABORTED). This design is ideal for tasks like navigation, manipulation, or any process where completion is not instantaneous and the client needs visibility into progress and the ability to cancel.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
ROS Actions are one of several core communication primitives within the ROS graph. Understanding the related patterns is essential for designing robust robotic software.
ROS Topic
A ROS Topic is the primary mechanism for asynchronous, many-to-many data streaming. Nodes publish messages to a named topic, and any number of subscriber nodes can receive them concurrently.
- Communication Model: Publish-Subscribe.
- Data Flow: Unidirectional, streaming.
- Use Case: Continuously publishing sensor data (e.g., camera images, LiDAR scans, odometry).
- Key Difference from Actions: Topics lack a formal goal, feedback, and result structure; they are pure data streams.
ROS Service
A ROS Service provides a synchronous, request-response communication pattern. A client sends a request to a server node and blocks execution until it receives a reply.
- Communication Model: Client-Server (blocking).
- Data Flow: Bidirectional, single exchange.
- Use Case: Performing quick, atomic operations like looking up a transformation, calculating a value, or toggling a setting.
- Key Difference from Actions: Services are designed for short-duration tasks; they do not provide intermediate feedback and block the client for the duration.
Action Protocol
The Action Protocol is the underlying specification that defines the structure of a ROS Action. It is implemented using three dedicated topics under a common namespace:
- Goal Topic: Client sends the goal description.
- Feedback Topic: Server streams periodic progress updates.
- Result Topic: Server sends the final outcome upon completion.
This protocol also defines a simple state machine (PENDING, ACTIVE, PREEMPTED, SUCCEEDED, etc.) tracked by an Action Server and monitored by an Action Client.
Action Server
An Action Server is the node that receives goal requests, executes the corresponding long-running task, and manages the action's lifecycle.
- Responsibilities: Accepts/rejects goals, executes the task logic, streams feedback, and provides a final result or cancellation notice.
- Preemption: A core capability is handling goal preemption, where a newer goal can cancel the currently executing one.
- Implementation: Typically contains a callback (e.g.,
execute_callback) where the developer writes the task's business logic.
Action Client
An Action Client is the node that sends a goal to an Action Server and monitors its execution.
- Responsibilities: Sends the goal, can cancel it, and listens for feedback and the final result.
- Non-Blocking: The client can send a goal and continue with other processing, polling for completion or using a callback to be notified of the result.
- Feedback Handling: The client can define a callback function to process incoming feedback messages during task execution.
Behavior Trees (Nav2)
Behavior Trees are a decision-making architecture often used with ROS Actions, most notably in the ROS 2 Navigation2 (Nav2) stack. They orchestrate complex robotic behaviors by structuring actions, conditions, and logic into a hierarchical tree.
- Integration with Actions: Behavior Tree nodes (called Action Nodes) frequently wrap ROS Action clients. For example, a
ComputePathToPoseaction node sends a goal to the planner's action server. - Advantages: Provides modularity, reactivity (through preemption), and improved maintainability over monolithic state machines for task sequencing.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us