Giter Site home page Giter Site logo

intent-inferencing-gc's Introduction

16.412 Intent Inferencing Grand Challenge

This repository contains the code for the Intent-Inferencing Grand Challenge for 16.412 Spring 2020.

Installation

git clone [email protected]:cog-rob-spring-2020/intent-inferencing-gc.git

cd intent-inferencing-gc

# Optional: Create virtual environment
python -m venv venv
source venv/bin/activate

# Required packages
pip install numpy torch matplotlib PyQt5
pip install gif imageio
pip install pyparsing tqdm

CARLA data collection

Simulation data for this project was generated by src/16412_pub.py. This script requires CARLA 0.9.6 and has only been tested on Windows 10.
To run the script:

  1. Run CARLA by double-clicking the executable or entering CarlaUE4.exe in the command window. To start the simulation in sped-up mode, use the command CarlaUE4.exe -benchmark -fps=30.

  2. Once CARLA is running, run 16412_pb.py in a Terminal or Command window:

python 16412_pub --safe -n N

where N is the number of vehicles you would like to spawn. The --safe flag guarantees that vehicles will spawn in safe locations.

The following variables in the Python script are relevant:

  • display_spectator_position: Prints the position and angle orientation of the spectator in the command window
  • display_elapsed_time: Does the same for the simulation elapsed time.
  • selected_map: Town map loaded when the script is run. Check the CARLA website for all available options (e.g. Town01, Town02, Town03, etc.).
  • geofence: the x-y limits of the geofenced area where data recording is applied. The default values are only valid if you are loading the default Town02 map.

For more information, contact Sandro Salgueiro ([email protected]).

Data parsing

From intent-inferencing-gc/src run

python parse_data.py --data path_to_data --outpath path_to_outdir

To run the example dataset:

python parse_data.py --data data/carla_short_raw --outpath datasets/CARLA_short/

This data parsing step has already been performed for the example datasets.

CVM trajectory prediction

All CVM code can be found in the constant_velocity_pedestrian_motion folder.

To get the ADE and FDE for all of the CARLA datasets:

python evaluate.py

To run with the angular velocity option

python evaluate.py --use_angvel

Generating Images

This script can only generate images for one dataset at a time. Edit dataset_paths in the RunConfig class at the top of evaluate.py to be a length 1 list.

Below are the different image generation options.

For one frame:

python evaluate.py --make_plot timestamp

For a gif:

python evaluate.py --save_gif path_to_gif

For a series of stills for each frame in the dataset:

python evaluate.py --save_imgs path_to_imgdir

Trajectron++ Trajectory Prediction

Since this code needs to be placed within the Trajectron++ file structure to function properly, this code is included in a separate repo. The repo can be found here.

intent-inferencing-gc's People

Contributors

abbiejlee avatar fishberg avatar shilohc avatar

Stargazers

 avatar

Watchers

James Cloos avatar Eric Timmons avatar  avatar Cyrus Huang avatar Sandro Salgueiro avatar  avatar

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.