This repo is the implementation of the following paper:
Parameterized Decision-making with Multi-modality Perception for Autonomous Driving
- algs
Implementaion for algorithims. - gym_carla
Gym-like carla environment for vehicle agent controlled by reinforcement learning.- agent
- basic_agent.py
BasicAgent implements an agent that navigates the scene.This agent respects traffic lights and other vehicles, but ignores stop signs. - basic_lane_change_agent.py
Basic lane change model for vehicle agent controlled by rule. - behavior_agent.py
BehaviorAgent implements an agent that navigates scenes to reach a given target destination, by computing the shortest possible path to it. This agent can correctly follow traffic signs, speed limitations, traffic lights, while also taking into account nearby vehicles. Lane changing decisions can be taken by analyzing the surrounding environment such as tailgating avoidance.Adding to these are possible behaviors, the agent can also keep safety distance from a car in front of it by tracking the instantaneous time to collision and keeping it in a certain range. Finally, different sets of behaviors are encoded in the agent, from cautious to a more aggressive ones. - behavior_types.py
This module contains the different parameters sets for each behavior. - global_planner.py
This module provides a very high level route plan, which set the global map route for vehicles. - local_planner.py
LocalPlanner implements the basic behavior of following a trajectory of waypoints that is generated on-the-fly.
The low-level motion of the vehicle is computed by using two PID controllers, one is used for the lateral control and the other for the longitudinal control (cruise speed).
When multiple paths are available (intersections) this local planner makes a random choice,unless a given global plan has already been specified. - pid_controller.py
This module contains PID controllers to perform lateral and longitudinal control.
- basic_agent.py
- util
- misc.py
This module contains auxiliary functions used in Carla. - render.py
This module enables the rendering of front-eye camera view of ego vehicle in one pygame window. - sensor.py
This module implement sensor-related functions and classes. - wrapper.py
This module contains auxiliary functions and classes for carla_env.
- misc.py
- carla_env.py
Main module for Gym-like Carla environment, which shares the same APIs as classical Gym. - settings.py
This module contains environment parameter list for carla_env.
- agent
- main
- tester
Code for testing model performance. - trainer
Code for training reinforcement learning model.
- tester
-
Install and setup the CARLA simulator (0.9.14), set the executable CARLA_PATH in gym_carla/setting.py
-
Setup conda environment with cuda 11.7
$ conda create -n env_name python=3.7
$ conda activate env_name- Clone the repo and Install the dependent package
$ git clone https://github.com/greenday12138/AUTO.git
$ pip install -r requirements.txt- Train the RL agent in the multi-lane scenario
$ python ./main/trainer/pdqn_multi_process.py- Test the RL agent in the multi-lane scenario
$ python ./main/tester/multi_lane_test.pyAll code within this repository is under Apache License 2.0.
Our code is based on several repositories: