https://arxiv.org/abs/2008.07971
Super-Human Performance in Gran Turismo Sport Using Deep Reinforcement Learning
Autonomous car racing is a major challenge in robotics. It raises fundamental problems for classical approaches such as planning minimum-time trajectories under uncertain dynamics and controlling the car at the limits of its handling. Besides, the requirem
arxiv.org
Introduction
1. [Baseline; Single-race] “Super-Human Performance in Gran Turismo Sport Using Deep Reinforcement Learning”, Sony AI and RPG in University of Zurich (2021 RA-L)
2. [+ Vision Input] “Expert Human-Level Driving in Gran Turismo Sport Using Deep Reinforcement Learning with Image-based Representation”, Sony AI (2021 NeurIPS)
3. [+ Overtake; Multi-race] “Autonomous Overtaking in Gran Turismo Sport Using Curriculum Reinforcement Learning”, Sony AI and RPG in University of Zurich (2021 ICRA)
4. [Current SOTA] “Outracing Champion Gran Turismo Drivers with Deep Reinforcement Learning”, Sony AI (2022 Nature)
Gran Turismo Sport (GTS) 게임 상에서 racing agent를 개발한 내용을 담고 있으며, 위와 같이 총 4편의 시리즈로 구성된다. 이 논문은 그 중 baseline이 되는 첫 번째 논문이며, Sony AI와 University of Zurich가 함께 연구를 진행했다. (2021 RA-L)
Model-free DRL 방식을 적용했으며, course-progress proxy reward를 제안함으로써 minimum-time racing을 목표로 했다. 이렇게 개발된 agent에 대해 다음의 두 가지 강점을 소개하고 있다.
- High-level trajectory planning이나 following과 같은 별도의 모듈 없이 end-to-end manner로 개발됨.
- Best human driver들과 유사한 trajectory를 생성하며, 더 빠른 lap time을 나타냄.
아래는 연구팀에서 공개한 영상이다.
Methodology
RL agent 개발의 main goal은 다음과 같다.
Build end-to-end neural network controller without prior knowledge about the vehicle’s dynamics while minimizing the traveling time.
Reward function
Reward를 설계할 때, 기본적으로 total lap time을 최소화하는 방향으로 설정할 수 있다. 하지만, 이는 sparse 하기 때문에 학습 속도가 느리고 특정 action에 대한 attribute를 학습하기 어려워진다.
이에 본 논문에서는 임의의 시간에 평가될 수 있는 course progress proxy reward를 제안하고 있다. ((t)) 시점에 자차량의 위치를 기준으로 centerline에 projection 된 위치를 ((cp_t)) 로 정의하며, 이전 ((t-1)) 시점과의 차이로 progress가 계산된다.
$$ r_t = r_t^{prog}-\left\{\begin{matrix} c_w \left\|\mathbf{v}_t \right\|^2 & \text{if in contact with wall} \\
0 & \text{otherwise} \\ \end{matrix}\right. \tag{1} $$
Policy network
본 논문에서는 SAC architecture를 사용하고 있으며, DNN으로 구성된 4개의 모델 : Policy network (1개), Q-function network (2개), State-value network (1개) 로 구성된다. 각 모델은 2개의 hidden layer와 256개의 ReLU node들로 구성되어 총 599,566개의 parameter를 갖는다.
Input features
$$ \mathbf{s}_t = \left [ \mathbf{v}_t, \dot{\mathbf{v}}_t, \theta_t, \mathbf{d}_t, \delta_{t-1}, w_t, \mathbf{c}_t \right ] $$
$$ \begin{align*} \text{where,} \quad
& \mathbf{v}_t \in \mathbb{R}^3, \dot{\mathbf{v}}_t \in \mathbb{R}^3 : \; \text{velocity, acceleration} \\
& \theta_t \in (-\pi, \pi] : \; \text{rotation w.r.t tangent vector of centerline} \\
& \mathbf{d}_t \in \mathbb{R}^M : \; \text{distance of each rangefinder} \\
& \delta_{t-1} : \; \text{previous steering cmd.} \\
& w_t \in \left\{0, 1\right\} : \; \text{wall contact flag} \\
& \mathbf{c}_t \in \mathbb{R}^N : \; \text{N sampled curvature of course centerline}
\end{align*} $$
여기서 rangefinder는 2D LiDAR와 같은 기능을 하며, 최대 100m의 측정거리와 전방 180°의 FOV를 갖는 등각도의 ray를 방출한다. 즉, 측후방은 고려하지 않는다.
Curvature의 경우 현재 차속에 비례하여 sampling 간격이 정해진다. 차속이 빠를수록 더 긴 preview length를 갖는다.
Output features
$$ \mathbf{a}_t = \left[ \delta_t, \omega_t \right] $$
$$ \begin{align*} \text{where,} \quad
& \delta_t \in \left[ -\pi/6, \pi/6 \right] \text{rad} : \; \text{steering angle} \\
& \omega_t \in \left[ -1, 1 \right] : \; \text{throttle-brake signal}
\end{align*} $$
종방향 제어의 경우 음수는 brake, 양수는 throttle로 mapping 되며, 두 페달을 동시에 밟는 전략은 구현되지 않는다.
Experiment
Settings
실험에 사용되는 트랙과 차종은 총 3가지 조합으로 설정하였다. 트랙의 경우 A와 B에서는 일반적인 곡선과 직선 구간이 조합된 간단한 맵이 사용되었고, C에서는 조금 더 어려운 형태의 맵이 사용되었다. 차량의 경우 A와 C에서는 "Audi TT Cup '16"이 사용되었고, B에서는 "Mazda Demio XD Turing '15"가 사용되었다. Audi 차량이 Mazda 차량에 비해 더 높은 최고 속력, 더 좋은 tire grip, 그리고 더 빠른 가속력을 갖는다.
RL agent의 성능은 built-in AI 및 human driver data와 비교되며, 후자의 경우 50,000개 이상의 data를 GTS 제작사 Polyphony Digital Inc. 로부터 제공받았다고 한다. 또한, 공정한 비교를 위해서 실제 사람이 한 step 사이에 변화시킬 수 있는 input 변화량을 통계적으로 측정하여 RL agent의 input 변화량도 이에 맞게 제한했다고 한다.
Results
Lap time comparison
3가지 setting들 모두에 대해 RL agent는 human player 및 built-in AI보다 빠른 lap time을 달성했다. 평균적으로 2,151번의 epoch (946,453km driving) 의 training 과정을 수행했으며, 학습에 56~73시간이 소요되었다.
Learned driving behavior
Racing에서 주로 사용되는 전략인 out-in-out trajectory를 RL agent도 구현하고 있다. 사람과 거의 동일한 경로로 주행을 하며, 곡률반경을 최대화함으로써 traction을 잃지 않으면서도 최대 속도를 달성할 수 있게 된다.
또한, 전방에 큰 곡률을 갖는 경로가 있으면 agent는 미리 속도를 줄임으로써 벽에 충돌하게되는 overshooting 현상을 방지한다. 곡선 구간 시작 전 약 100m 이내의 거리에서 감속을 시작하는 거동 특성을 보였다.
Fig. 8은 RL agent와 built-in AI, 그리고 사람의 감가속 특성을 비교한 그래프이다. 마찬가지로 거의 사람과 유사하거나 더 빠른 속도를 달성하고 있다.
Fig. 9는 고곡률의 헤어핀 구간에서 가장 빠른 사람과 RL agent의 trajectory를 비교한 결과이다.
Robustness test
- Transfer to new car : 직선 및 완만한 곡선 도로에 대해서는 유사한 성능을 보였지만, 높은 곡률을 갖는 도로에 대해서는 overshooting 현상을 보임. Dynamics 또는 tire-surface friction이 변화하면 재학습 필요.
- Transfer to new track : 대부분 유사한 성능을 보였지만, 다른 종류의 hairpin 구조에 대해서 wall contact가 발생함.
- Increase / Decrease tire friction : Fig. 6의 2번 커브 정도에 대해서는 tire friction 변화에 적응하여 trajectory를 수정함. 하지만 3번 커브에 대해서는 inner/outer edge에 contact 발생.
- Noise in observation : 2 % 이내의 noise에 대해서는 baseline과 동일한 성능을 보였지만, 그 이상에서는 lap time 증가함. 하지만, 여전히 wall contact는 발생하지 않음.
- Delayed inference : 20ms 이내의 delay에 대해서는 baseline과 동일한 성능을 보였지만, 50ms에서 0.3s만큼, 100ms에서 1.4s만큼 lap time 증가함. 150ms에서는 track edge와 충돌함.
요약하자면, RL의 특성 상 차량 종류, 차량 특성, 트랙 종류 등의 환경이 바뀌면 재학습이 필요하다. 또한, 여기서는 observation의 GT 값을 사용했었는데, noise가 추가되면 약간의 성능 저하는 있지만 주행은 성공적으로 완수한다. 마지막으로, 실제 차량에 적용했을 때를 생각하면 actuator 및 통신 상의 delay가 발생되는데, 50ms 이내의 delay는 허용되지만 그 이상은 허용되지 않는다.