Call Service
Libraries:
ROS Toolbox /
ROS 2
Description
The Call Service block takes a ROS 2 service request message, sends it to
the ROS 2 service server, and waits for a response. A ROS 2 service server should be set up
somewhere on the network before using this block. Check the available services on a ROS 2
network by executing ros2 service list
command, which uses ros2
function. Use
ros2svcserver
to set
up a service server in MATLAB®.
Specify the name for your ROS 2 service and the service type in the block mask. If connected to a ROS 2 network, you can select from a list of available services. You can create a blank service request or response message to populate with data using the Blank Message block.
Always specify the quality of service (QoS) parameters in the block mask. QoS parameters for this block must be compatible with the service server to send requests and receive responses.
Ports
Input
Output
Parameters
Extended Capabilities
Version History
Introduced in R2021b