Main Content

Services and Actions

Send requests, perform tasks, and get feedback for services and actions

ROS services and actions enable users to perform tasks. Services use request-response communication to gather information and trigger callback functions in the ROS network. Actions can be used to trigger tasks or goals and receive feedback during operation of these tasks.

Functions

expand all

rosactionRetrieve information about ROS actions
rosactionserverCreate ROS Action Server
getFeedbackMessageCreate new action feedback message
isPreemeptRequestedCheck if a goal has been preempted
sendFeedbackSend feedback to action client during goal execution
rosActionServerExecuteGoalFcnReturn function handle for ROS action server callback
rosactionclientCreate ROS action client
cancelAllGoalsCancel all goals on action server
cancelGoalCancel last goal sent by client
sendGoalSend goal message to action server
sendGoalAndWaitSend goal message and wait for result
waitForServerWait for action server to start
callCall ROS or ROS 2 service server and receive a response
isServerAvailableDetermine if ROS or ROS 2 service server is available
rosserviceRetrieve information about services in ROS network
rossvcclientConnect to ROS service server
rossvcserverCreate ROS service server
waitForServerWait for ROS or ROS 2 service server to start
callCall ROS or ROS 2 service server and receive a response
isServerAvailableDetermine if ROS or ROS 2 service server is available
ros2Retrieve information about ROS 2 network
ros2svcclientConnect to ROS 2 service server
ros2svcserverCreate ROS 2 service server
waitForServerWait for ROS or ROS 2 service server to start

Blocks

Call ServiceCall service in ROS network
Call ServiceCall service in ROS 2 network

Topics