rosActionServerExecuteGoalFcn
Description
rosActionServerExecuteGoalFcn
provides a predefined callback
framework for use as the goal execution callback in a ROS action server. The callback
framework is a set of callback functions, one for each of these tasks the server must carry
out during goal execution:
Check if the goal is reached
Execute items in every iteration towards the goal
Construct feedback message for the action client
Construct result message if the goal is preempted
Construct result message if the goal is reached successfully
You can specify custom functions for these tasks by using the respective name-value
arguments of rosActionServerExecuteGoalFcn
.
returns a
function handle, cb
= rosActionServerExecuteGoalFcncb
, with a predefined callback framework for action
server goal execution. You can specify cb
as value for the
ExecuteGoalFcn
name-value argument when you create the rosactionserver
object. When you use the function handle from this syntax in the action server, the callback
immediately indicates that the goal has been reached and returns the default result
message.
specifies additional options using one or more name-value arguments. To customize the
behavior of the predefined callback framework, specify handles of custom functions using the
corresponding name-value arguments. The custom functions must have two input arguments: a
shared object containing cb
= rosActionServerExecuteGoalFcn(Name=Value)UserData
as the first, and an appropriate ROS
message as the second. Most functions must also provide appropriate output. For more
information about each function signature, see Name-Value
Arguments.
Examples
Input Arguments
Output Arguments
Extended Capabilities
Version History
Introduced in R2022a