Skip to content

Commit c8df1cb

Browse files
authored
Add ros2 param load documentation (#1101)
* Add ros2 param load documentation * Fix trailing space
1 parent 01d3446 commit c8df1cb

1 file changed

Lines changed: 35 additions & 1 deletion

File tree

source/Tutorials/Parameters/Understanding-ROS2-Parameters.rst

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,41 @@ However, you can save your settings changes and reload them next time you start
189189
background_r: 150
190190
use_sim_time: false
191191
192-
6 Load parameter file
192+
6 ros2 param load
193+
^^^^^^^^^^^^^^^^^
194+
195+
.. tabs::
196+
197+
.. group-tab:: Foxy and newer
198+
199+
You can load parameters from a file to a currently running node using the command:
200+
201+
.. code-block:: console
202+
203+
ros2 param load <node_name> <parameter_file>
204+
205+
To load the ./turtlesim.yaml file generated with ``ros2 param dump`` into ``/turtlesim`` node’s parameters, enter the command:
206+
207+
.. code-block:: console
208+
209+
ros2 param load /turtlesim ./turtlesim.yaml
210+
211+
Your terminal will return the message:
212+
213+
.. code-block:: console
214+
215+
Set parameter background_b succesful
216+
Set parameter background_g succesful
217+
Set parameter background_r succesful
218+
Set parameter use_sim_time succesful
219+
220+
221+
.. group-tab:: Eloquent
222+
223+
Eloquent and earlier do not have the ``param load`` command.
224+
See the next section on how to start a node with parameters from a YAML file.
225+
226+
7 Load parameter file
193227
^^^^^^^^^^^^^^^^^^^^^
194228

195229
.. tabs::

0 commit comments

Comments
 (0)