Coder Social home page Coder Social logo

densetrafficeval's Introduction

Evaluation for Driving in Dense Traffic

Instructions

gen_eval_scene.jl

This script contains functions for generating a simulation scene, and also for logging and writing data to a file (given a SceneRecord per episode.)

For generation of an evaluation scene, the following functions matter:

  • make_scene(...) takes a Julia dictionary of parameters to create the simulation scene. If empty, default values are used.
  • dict_to_params(...) converts the Julia dictionary to a Julia structure of type HRIParams.
  • get_vehicle(...) returns one Vehicle object to be pushed into the scene.
  • populate_scene(...) creates the simulation scene based on all parameters.

For logging,

  • get_sim_data(...) goes through a SceneRecord to calculate the metrics of interest.
    • These include time to merge, minimum distance to other vehicles, average offset from desired lane (assumed to be the one to the right of the starting lane), and the time profile of this offset and the egovehicle's velocity.
  • write_data(...) writes the logged data to a file.

parse.py

The variable DATADIR must be set properly. The folder should contain subfolders for each simulation experiment (e.g. one folder each for experiments with aggressive, cooperative, and mixed drivers). These subfolders should contain the files generated by write_data(...) for each episode.

  • parse.py will create a folder results inside DATADIR, which in turn will contain subfolders named the same as those in DATADIR.
  • These subfolders will contain a few files,
    • Histograms of times to merge, minimum distances to other vehicles, and average offsets from desired lane.
    • A summary.dat file that contains (in order): success percentage, merge time statistics (mean +- stddev), minimum distance statistics (mean +- stddev), average offset statistics (mean +- stddev).
    • A metrics.dat file that contains (in order): number of successes, total number of episodes, merge times, minimum distances, average offsets.
    • Two NumPy matrices that have 3 columns each. The columns, in order, are means, lower bound, and upper bound. The rows correspond to timesteps of episodes. vels.npy contains the egovehicle velocity profile information, and offsets.npy contains the offset from desired lane information.

Logging and parsing has not been tested.

Author

Developed by Dhruv Mauria Saxena as part of his internship at Honda Research Institute, USA.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.