What is a ROS parameter?
A ROS node can be configured using parameters. It can store parameters such as integers, floats, Booleans, strings, and lists. The node can read these parameters and control the program flow. These parameter values can be set/get through the ros2 param
command-line tool. Commonly, in robotic applications, we use a YAML file to hold this parameter. The main reason is that there will be multiple parameters per node, and there can be multiple nodes inside a robotic application. Keeping parameters inside a YAML file will give great flexibility in saving and loading during the startup of the node. The ROS launch files help to load multiple nodes along with all these parameter files. ROS 2 parameters are stored in the nodes themselves, and whenever there is a change in the parameter, it can be handled inside the node using a callback if required. We will see more about the launch file in the next section.
Here is the ROS 2 command-line tool to list set/get parameters...