As was already mentioned, we need to use a more precise navigation.
You can easily see it: robot doesn't turn towards the charger,
it turns the wrong angle!
But this isn't all.
The code is not flexible: add an obstacle, and robot will not notice it. Add an object that covers a charger, and robot will never find it. Even worse: it can find charger, go to a charger line and discover that from the "arrived to charger line" position the charger is not visible.
Or you can push robot to the side while it is going to a charged - and it will get lost. And so on.
So we need to account for this sort of errors. Also, we need to make sure robot navigates using ROS2 nav. stack, rather than simply driving in a set distance with the set speed, for the set time.
I am going to address these problems in the following sections.