## 2 Related Work  
Over the past decade, the attention of researchers in public transport has focused mainly on environmentally friendly solutions, such as electric buses. An overview of recent developments in this area is presented in [7]. The effective use of electric vehicles in urban transportation requires an optimisation of charging operations, with respect to the efficient planning of routes and scheduling of charging operations, and with respect to the strategies for deploying the charging stations in urban infrastructure [8]. Although there are attempts to make buses autonomous [9], advanced driver-assistance systems [10] can operate where full autonomy is not permitted in public transportation. Unfortunately, published works on ADAS for city buses most often focus on solutions to collision warning or lane departure [11], leaving out the difficult task of docking electric buses to charges. While an ADAS solution can support the driver in a number of different functions, such as cruise control [12], recognition of traffic lights [13], or even detection of pedestrians [14], the system we consider is aimed exclusively at facilitating the docking manoeuvres to charging stations as required by the business partners. On the other hand, automated docking solutions developed for self-driving cars often require active mechanical devices that plug into the charging port of the vehicle [15]. In the case of electric buses, the main challenge is to provide charging options that would allow the bus to operate continuously through the day and sometimes also during the night. One possibility is to charge the batteries at the depot using the plug-in technology. The drawback of this approach is that the bus is out-of-service at that time and there might not be a sufficient amount of breaks to provide the necessary charging time for full-day operation [16]. Alternatively, it is possible to use opportunistic charging at longer stops using the pantograph and chargers located along the bus route. Different operators prefer charging stations of different mechanical designs, such as the Schunk Carbon Technology solution used in our earlier experiments [3; 5], with a pantograph raised only after stopping, or the EC Ride & Charge charger chosen by the MPK Poznan bus operator, which requires raising the pantograph before docking. The pantograph-charger configurations differ between companies providing different docking accuracy tolerance, but regardless of the charger type, they require the driver to park sufficiently close to the charger's head to enable the charging. This diversity, and the possibility of mounting the pantograph in the front or the back of the bus, also according to the choice of the operator, requires an ADAS solution that guides an arbitrarily selected point of the bus (i.e., pantograph) to the appropriate location in the charger's head, maintaining the required tolerance. Although some approaches to battery charging in self-driving cars rely on active devices/arms that plug into the car's charging port without a need to localise the entire vehicle accurately [17; 18], we cannot use any mechanical components other than those already present in a human-driven city bus (i.e., pantograph). This is an essential assumption that allows our ADAS solution to be retrofitted to the electric buses already operated by city transport companies. Although experiments in a controlled environment proved that it is possible to accurately localise the bus while docking to a charging station using a passive vision system in monocular configuration [5], this solution has a number of practical drawbacks. The problems are related to the limited range of the vision-based localisation, which in practice does not exceed 30 m, and the limited field of view of the camera. In real-world scenarios, it may be required to initiate a docking manoeuvre at a distance greater than 30 m, and losing the charger from the field of view during tight turns can lead to unacceptable localisation errors.