Skip to content

ucla-mobility/CEE298_Simulation_Testing_Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

CEE 298 Simulation Testing Project

This is the repo for the Simulation Testing project. The project goal is to

  • 1. Recreate a testing scenario that is listed among the NHTSA challenging dataset.
  • 2. Test OpenCDA's default autopilot agent in this scenario.
  • 3. Generate traffic level performance metrics for the OpenCDA's default agent.

This meta file’s intention is to help you streamline the process and break down the task into multiple steps. You are encouraged to experiment with alternative methods, should you have a different approach. Please feel free to contact me (Xu) if you have any questions or need help with anything. The task breakdown is as follows.

  1. Read the NHTSA Dataset

    The NHTSA dataset we used contains a list of scenarios that we selected from the official "Pre-Crash Scenario Typology for Crash Avoidance Research." A detailed document is uploaded to the "NHTSA dataset" folder within the repo. The list we are using is summarized in "cee 298 scenario docs.pdf," and the original pre-crash document is also uploaded in the same directory as a reference.

  2. Review the default CARLA maps (Towns)

    A detailed CARLA map introduction can be found here. A list of all ten maps can be found here. After selecting the desired NHTSA scenario to recreate, you can go through these 10 CARLA towns to select a map to create your scenario. Please note that these 10 towns are built with different emphasis, so select the corresponding map based on your own needs.

  3. Review the OpenCDA scenario YAML files

    OpenCDA loads the scenario by reading the scenario configuration file. This file dictates all the details in the testing scenario, such as what vehicles are included in the scene, where they are spawned, where they are trying to go, and what their behaviors are. In addition, these files set the OpenCDA in different modes; for example, trajectory analysis can be turned on/off here. All the existing sample scenarios provided in OpenCDA are listed here, and their corresponding Python scripts (i.e., [same_name].py) are stored here. It is important to look at these config files and determine what information is needed for your own customized scenario.

  4. Find the desired spots

    Please refer to this directory to learn how to navigate through CARLA. Basically, you need to read all existing waypoints in CARLA and print them on screen to learn the exact location of the spot you chose. Then in the CARLA config file, use this location to initiate the scenario.

  5. Generate the agent NPC and finish the experiment

    Once you have selected the spot, please generate a new config file (YAML file) and a corresponding Python script (same_name.py) to run your scenario by running. python opencda.py -t your_scenario_name It is a good practice to disable the performance analysis or plots and focus on the environment first, and then add more functions step-wise. Note: run all python script within the "opencda" conda env. If you encounter "cannot import carla" error, this usually means you forgot the conda env.

About

This is the repo for the Simulation Testing project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages