Send Action Goal
R2026bLibraries:
ROS Toolbox /
ROS 2
Description
The Send Action Goal block enables you to send action goal messages to an action server available in a ROS 2 network. It takes in a Simulink® non-virtual bus as its Goal input, that corresponds to the specified ROS 2 action type.
To create a ROS 2 action client, create a ROS 2 Blank Message block
with class set to Action Goal. The output of this block is
connected to the Goal input of the Send Action Goal block. The action client is
associated with the node of the Simulink model.
You can assign a ROS 2 callback group to the action client using the Callback group type parameter to control how the ROS 2 executor schedules the action client callbacks relative to other callbacks on the same node. This is useful for preventing deadlocks, enabling concurrent callback execution, improving throughput, reducing jitter, and aligning Simulink simulation behavior with generated C++ code execution semantics.
Note
To monitor an active action goal, you must first create a paired Monitor Action Goal block. The paired block is based on the action parameters specified in the Send Action Goal block.
Ports
Input
Output
Parameters
Algorithms
On each simulation step, the Send Action Goal block checks whether a goal is active, leading to one of these outcomes:
If the goal is active, the block ignores any goal message available at the Goal input and outputs the active goal UUID as a Simulink non-virtual bus of
unique_identifier_msgs/UUIDmessage type.If there is no goal running and the Enable port is
true, the block sends any goal message available at the Goal input and outputs the new goal UUID as a Simulink non-virtual bus ofunique_identifier_msgs/UUIDmessage type.If there is no goal running and the Enable port is
false, the block ignores any goal message available at the Goal input and outputs the default goal UUID (empty message) as a Simulink non-virtual bus ofunique_identifier_msgs/UUIDmessage type.

