In the module 5.7, which explains the source code of the hardware implementation, it says
" In the first line, the parent on_init is called to process the parameters read from the .yaml configuration file. This is done using hardware_interface::HardwareComponentInterface::on_init(params). This validation should return CallbackReturn::ERROR if an internal error occurred during parameter reading."
Yes, you’re correct. In this case, the text should refer to the URDF rather than the YAML file. The on_init() method receives the hardware configuration parsed from the <ros2_control> section of the robot description. The YAML files are generally used to configure the controllers and controller manager. We’ll update that explanation to make it clearer.