Send Action Goal
Libraries:
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.
Note
To monitor an active action goal, you must first create a paired Monitor Action Goal block. The paired block will be based on the action parameters specified in the Send Action Goal block.
Behavior
On each simulation step, the Send Action Goal block examines whether a goal is currently in progress (active goal), leading to one of these possible outcomes or occurrences:
If true, the block ignores any goal message available at Goal input and outputs the active goal UUID as a Simulink non-virtual bus of
unique_identifier_msgs/UUID
message type.If there is no goal running and the Enable port is
true
, the block sends any goal message available at Goal input and outputs new goal UUID as a Simulink non-virtual bus ofunique_identifier_msgs/UUID
message type.If there is no goal running and the Enable port is
false
, the block ignores any goal message available at Goal input and outputs default goal UUID (empty message) as a Simulink non-virtual bus ofunique_identifier_msgs/UUID
message type.
Ports
Input
Output
Parameters
Extended Capabilities
Version History
Introduced in R2024a