This is the main script of the current section. The main difference between it and previous script is in the "direct line navigation", when the robot is already facing the charger, and needs to approach it. Also, after the crarging is completed, robot backs up from the charger, so that it can turn without getting stuck.
As this script was mostly explained in a previous section, I will only show the important changes. The complete code is available in an archive by the link above.
11a_charger_docking.py