Manuscript Offprint

arXiv:2610.33755

Computer Vision Navigation for an Autonomous Vehicle Model Using Reinforcement Learning

Dinis Fernandes, Tiago Ribeiro, António Ribeiro, Carolina Lopes, Gil Lopes, A. Fernando Ribeiro

Abstract

This work aims to assess the capabilities of the reinforcement learning algorithm, Proximal Policy Optimization (PPO), in developing a policy capable of controlling the speed and steering angle of a vehicle model to navigate within simulated road lines.

The control system's input is a camera, and its outputs are the rotational speed of the rear wheels and the steering angle of the front wheels, controlling the vehicle's speed and direction, respectively. The algorithm is trained and tested in a simulated environment, where it receives image frames from the vehicle's camera, processes them through a feature extraction algorithm, and feeds them into the policy. For each frame, the policy outputs speed and direction commands for the vehicle. The policy is iteratively updated to enhance its performance.

The reinforcement learning algorithm successfully generates a policy capable of navigating the vehicle in a simplified environment. Potential improvements are suggested to enhance the system's robustness in more complex scenarios.

Creating a simulation environment suitable for testing an advanced reinforcement learning algorithm is a complex task. This project offers a framework for other developers to test different approaches and algorithms. The tested algorithm, PPO, uses proximity intervals—an innovative approach in reinforcement learning. In some scenarios, the algorithm achieved better performance than predecessor algorithms, which are typically harder to implement and require tuning more hyperparameters.

Keywords — Reinforcement learning; Proximal Policy Optimization; computer vision; autonomous driving.

1. Introduction

The concept of reinforcement learning (RL) is inspired by the way animals learn to perform tasks by taking actions and receiving rewards or punishments based on the outcomes of those actions. To choose an appropriate action, the agent must understand its state relative to the environment. The policy of the agent is the mechanism that maps states to actions. Based on the rewards or punishments received, the agent iteratively adjusts its policy to improve performance.

Modern RL algorithms typically employ neural networks as policies and evaluate policy performance using a loss function. The loss function quantifies the discrepancy between the desired and actual outcomes, with higher values indicating poorer performance. Consequently, the goal is to minimize this loss function. Gradients, a fundamental concept in calculus, are used to find the parameters that minimize the loss function, thereby refining the policy.

Policies trained with RL have demonstrated remarkable success across a variety of domains, often surpassing human performance. One of the most prominent examples is AlphaGo (Silver et al., 2016), an algorithm that defeated the world’s best human Go players. Go is an exceptionally complex game with more possible board configurations than there are atoms in the universe, making it infeasible to tackle using traditional algorithms. Similarly, autonomous driving requires learning-based approaches rather than hard-coded solutions, as the aim is to develop an algorithm that learns to perform the task rather than explicitly solving it.

The Laboratory of Automation and Robotics (LAR) at the University of Minho has been highly active in autonomous driving research. Engineers at LAR developed an autonomous vehicle model that has been used in several projects to enhance its sensing and control capabilities. For example, one project aimed to create a model capable of reading road signs using YOLOv3 (Marques et al., 2022). Another project combined YOLOv3 with the Deep Deterministic Policy Gradient (DDPG) algorithm to develop a system capable of detecting and classifying road signs and responding accordingly (Andrade et al., 2022). Additionally, a separate project focused on training a policy for controlling the vehicle to perform parallel, angular, and perpendicular parking (Sousa et al., 2022).

The objective of this project is to employ an RL algorithm to train a policy capable of navigating the Portuguese National Robotics Championship autonomous driving track. The control system receives input from a camera and outputs the steering angle of the front wheels and the speed of the rear wheels. The vehicle model used in this study (Figure 1) is based on the design developed by LAR at the University of Minho.

Figure

Figure 1: Simulation model of the autonomous vehicle developed by LAR

The first phase of the project focused on training the policy within a simulated environment, as real-world training is not an efficient process. Training in the real world would require continuous supervision of the algorithm's behaviour during the training period, posing risks to the hardware. The second phase would involve testing the trained policy on the physical vehicle model. However, this phase was not completed due to the time required to develop the simulation environment, implement the algorithm, and train the policy, which exceeded initial expectations. Nonetheless, the results obtained in the simulation suggest that this approach is feasible, with certain improvements outlined in the conclusion.

The simulation environment (Figure 2) was implemented using the Gazebo robotics physics simulator. The vehicle model was described and deployed in Gazebo, and the control of actuators and data acquisition from the camera were managed through the Robot Operating System (ROS). Feature extraction was implemented using OpenCV to process the frames captured by the camera. The implementation of the Proximal Policy Optimization (PPO) algorithm was carried out using TensorFlow 2.

Figure

Figure 2: Portuguese robotics championship autonomous driving track in simulation with vehicle model

Additional resources, including the project code and demonstration video, can be found in the Supplementary Materials section.