Action (ROS Action)
动作CommonA ROS communication style for tasks that take a while, with progress feedback partway through and the option to cancel.
Action is one of ROS’s three main communication mechanisms, alongside topics (continuously broadcast data) and services (a single request and response). It’s designed for tasks that take some time to finish: a client sends a goal, the server sends back feedback continuously while it executes, and returns a result when done, with the option to cancel partway through. In ROS 1 it’s implemented by the actionlib library; in ROS 2 it’s a built-in mechanism, built underneath from a combination of services and topics. Tasks such as navigating to a point or an arm executing a trajectory are usually exposed as an action interface.
ExampleNav2’s NavigateToPose action: send a goal point, and the robot reports its remaining distance while it walks, returning success or failure once it arrives.
- Also called
- ROS Action, actionlib
- Related
- Topic (ROS) · Service (ROS) · Node (ROS) · Message (msg / srv / action interface) · ROS 2 Navigation Stack (Nav2) · MoveIt Motion Planning Framework
- Sources
- ROS 2 Documentation: Understanding actions