rosactionclient
Create ROS action client
Description
Use the rosactionclient
to connect to an action server
using a SimpleActionClient
object and request the execution of action
goals. You can get feedback on the execution process and cancel the goal at any time.
The SimpleActionClient
object encapsulates a simple action client and
enables you to track a single goal at a time.
Creation
Syntax
Description
creates a client for the specified ROS client
= rosactionclient(actionname
)ActionName
. The
client determines the action type automatically. If the action is not
available, this function displays an error.
Use rosactionclient
to connect to an action server and
request the execution of action goals. You can get feedback on the execution
progress and cancel the goal at any time.
creates an action client with the specified name and type
(client
= rosactionclient(actionname
,actiontype
)ActionType
). If the action is not available, or
the name and type do not match, the function displays an error.
[
returns a goal message to send the action client created using any of the
arguments from the previous syntaxes. The client
,goalMsg
]
= rosactionclient(___)Goal
message
is initialized with default values for that message.
If the ActionFcn
, FeedbackFcn
,
and ResultFcn
callbacks are defined, they are called
when the goal is processing on the action server. All callbacks associated
with a previously sent goal are disabled, but the previous goal is not
canceled.
[___]
= rosactionclient(___,"DataFormat","struct")
uses message structures instead of objects. For more information, see ROS Message Structures.
creates a client for the specified ROS action name. The
client
= ros.SimpleActionClient(node
,actionname
)node
is the Node
object that is connected to
the ROS network. The client determines the action type automatically. If the
action is not available, the function displays an error.
creates an action client with the specified name and type. You can get the
type of an action using client
= ros.SimpleActionClient(node
,actionname
,actiontype
)
.rosaction
type
actionname
uses message structures instead of objects. For more information, see ROS Message Structures.client
= ros.SimpleActionClient(___,"DataFormat","struct")
Properties
Object Functions
cancelGoal | Cancel last goal sent by client |
cancelAllGoals | Cancel all goals on action server |
rosmessage | Create ROS messages |
sendGoal | Send goal message to action server |
sendGoalAndWait | Send goal message and wait for result |
waitForServer | Wait for action server to start |
Examples
Extended Capabilities
Version History
Introduced in R2019bSee Also
rosactionserver
| sendGoal
| cancelGoal
| waitForServer
| rosmessage
| rosaction