Unit 05 · lesson
Read and Change Parameters
The beginner parameter tutorial calls parameters node settings.
Each node maintains its own parameters.
List parameters
With Turtlesim and teleop running:
ros2 param list
You should see parameter names grouped under nodes.
Read a value
The official tutorial uses:
ros2 param get /turtlesim background_g
The output reports both the parameter type and current value.
Change a value
Try:
ros2 param set /turtlesim background_r 150
The Turtlesim background should change.
Important boundary
You changed runtime configuration.
You did not edit Turtlesim source code or rebuild the package.
That distinction is why parameters are useful.
Inspect before/after
Run:
ros2 param get /turtlesim background_r
before and after your set operation.
Checkpoint
Explain the difference between:
- changing a topic message;
- calling a service;
- setting a parameter.
Use the Turtlesim examples you actually ran.