From 9adf272a9440931475fc416a99edf9cc2e1474b1 Mon Sep 17 00:00:00 2001 From: Chris Lalancette Date: Wed, 17 Feb 2021 09:18:49 -0500 Subject: [PATCH] Add ros2 param load documentation to the rolling branch. Signed-off-by: Chris Lalancette --- .../Understanding-ROS2-Parameters.rst | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/source/Tutorials/Parameters/Understanding-ROS2-Parameters.rst b/source/Tutorials/Parameters/Understanding-ROS2-Parameters.rst index 70421571af1..837b6114441 100644 --- a/source/Tutorials/Parameters/Understanding-ROS2-Parameters.rst +++ b/source/Tutorials/Parameters/Understanding-ROS2-Parameters.rst @@ -168,9 +168,32 @@ If you open this file, you’ll see the following contents: Dumping parameters comes in handy if you want to reload the node with the same parameters in the future. -6 Load parameter file -^^^^^^^^^^^^^^^^^^^^^ +6 ros2 param load +^^^^^^^^^^^^^^^^^ + +You can load parameters from a file to a currently running node using the command: + +.. code-block:: console + + ros2 param load + +To load the ./turtlesim.yaml file generated with ``ros2 param dump`` into ``/turtlesim`` node’s parameters, enter the command: + +.. code-block:: console + + ros2 param load /turtlesim ./turtlesim.yaml + +Your terminal will return the message: +.. code-block:: console + + Set parameter background_b successful + Set parameter background_g successful + Set parameter background_r successful + Set parameter use_sim_time successful + +7 Load parameter file +^^^^^^^^^^^^^^^^^^^^^ To start the same node using your saved parameter values, use: