Get Parameter
R2026bLibraries:
ROS Toolbox /
ROS 2
Description
The Get Parameter block outputs the value of the specified ROS 2 parameter associated with the node of the Simulink® model. Simulink creates this node when you run the model and deletes it when the model terminates. If the model does not have a parameter, the block creates one.
At the start of the simulation, the block initializes the ROS 2 parameter with the specified initial value. For each sample hit, the block checks the ROS 2 parameter and outputs its value.
Examples
Ports
Output
Parameters
Programmatic Use: Add Block
To add the block programmatically, use the add_block function with one of these library block paths as the source.
"ros2lib/Get Parameter"
Example: add_block("ros2lib/Get Parameter","myModel/myBlock",MakeNameUnique="on")
Extended Capabilities
Version History
Introduced in R2022b
