# Social Driving

![Snapshot of 7 agents in a nuScenes Intersection](/files/-MKKYQ2qPRdks5-ZJIEQ)

## Installation

Create a new Conda environment

```
$ conda create --name sdriving python=3.8
$ conda activate sdriving
```

Follow the instructions given [here](https://pytorch.org/get-started/locally/) to install PyTorch. Install PyTorch version `1.5.2` or `1.7` if you want to use JIT compilation which speeds up the code by roughly 1.5-2x.

Install the [Nuscenes DevKit](https://github.com/nutonomy/nuscenes-devkit/) for access to realistic simulation environments. Use the master branch instead of the pip version. Additionally, download the map expansion pack.

Finally, install sdriving using the following instructions.

```
$ git clone https://github.com/fidler-lab/social-driving.git sdriving
$ cd sdriving
$ python setup.py develop
```

If you need to train an agent, some additional configuration is needed. You can skip these steps if you are only interested in generating rollouts / don't care about logging on the server (using `WANDB_MODE=dryrun`).

1. Create a Wandb account using `wandb login` and following the steps given there.
2. A project named `social-driving` will be automatically created. If anything goes wrong here please open an issue.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://avikpal.gitbook.io/social-driving/master.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
