Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Another nice thing about ROS2 is the ability to tweak the values of parameters rather than hard-coding them and recompiling if a number needs to change. You can create config files (typically a yaml YAML file) defining values for parameters you’d like, which can be loaded on launch. Then your node can read parameters by name in order to set values (eg scales, thresholds, topic names, speed/joint angle limits, etc). Parameters read from file are loaded onto the ROS2 parameter serverfiles are hosted on that current node (As compared to ROS1 where there was a parameter server). A nice feature in ROS2 is the ability to declare parameters from within our nodes (fairly easily) that can then be modified from a configuration file. Keep in mind that if other things modify the parameter, it's up to the programmer to catch changes in the value and deal with itthem. Keep an eye out for parameters in the tutorials linked below.

...