Unit 05 · lesson

Save and Reload Parameter Configuration

A runtime change disappears when a node exits unless you preserve and reapply configuration.

The official parameter tutorial demonstrates saving parameters as YAML.

Dump configuration

ros2 param dump /turtlesim > turtlesim.yaml

Open the file:

cat turtlesim.yaml

You should see a node key and a ros__parameters mapping containing current values.

Load into a running node

The source tutorial uses:

ros2 param load /turtlesim turtlesim.yaml

Some read-only parameters may report that they cannot be changed at runtime. That is useful evidence, not necessarily a broken file.

Load at startup

The documentation also demonstrates:

ros2 run turtlesim turtlesim_node --ros-args --params-file turtlesim.yaml

Startup configuration can apply values at the time the node is created.

Configuration as an artifact

You now have a portable text file that documents node settings.

That becomes much more important in larger ROS systems where repeatability matters.

Checkpoint

Restart Turtlesim with the parameter file and prove one saved visual/configuration value returned.

Record:

Parameter:
Saved value:
YAML evidence:
Startup command:
Observed result: