Skip to content

Commit

Permalink
renaming bunch of stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
AlirezaMorsali committed Oct 13, 2022
1 parent b402b67 commit c9f8d69
Show file tree
Hide file tree
Showing 18 changed files with 14,238 additions and 141 deletions.
2 changes: 1 addition & 1 deletion docs/source/apireference.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# API Reference
# REST API

```{eval-rst}
`API Reference <_static/restapi.html>`_
Expand Down
18 changes: 18 additions & 0 deletions docs/source/examples/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Examples
Several examples are provided [here](https://github.com/inverted-ai/invertedai/tree/master/examples).
## Demo
- **Goolge Colab**: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/inverted-ai/invertedai-drive/blob/develop/examples/Colab-Demo.ipynb)

- **Locally**: Download the
<a href="https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/inverted-ai/invertedai/tree/master/examples" target="_blank">examples directory</a>, navigate to the unzipped directory in terminal and run

```
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
.venv/bin/jupyter notebook Drive-Demo.ipynb
```



Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# DRIVE
**DRIVE** is Inverted AI's cutting-edge realistic driving model trained on millions of miles of traffic data.
This model can drive all the agents with only the current state of the environment, i.e., one step observations (which could be obtained from **INITIALIZE**) or with multiple past observations.
# Driving Agents

**{ref}`DRIVE`** is Inverted AI's cutting-edge realistic driving model trained on millions of miles of traffic data.
This model can drive all the agents with only the current state of the environment, i.e., one step observations (which could be obtained from **{ref}`INITIALIZE`**) or with multiple past observations.
```python
response = iai.drive(
location="CARLA:Town03:Roundabout",
Expand All @@ -16,4 +17,7 @@ response = iai.drive(
>For convenience and to reduce data overhead, ***drive** also returns _recurrent-states_ which can be feedbacked to the model instead of providing all the past observations.\
>Furthermore, **drive** drive all the agents for $steps\times \frac{1}{FPS}$ where by default $FPS=10[frames/sec]$, should you require other time resolutions [contact us](mailto:info@inverted.ai).
---
{ref}`DRIVE`: more information about the python SDK.\
{ref}`REST API`: more information about the REST API and other programming languages.

27 changes: 27 additions & 0 deletions docs/source/getstarted/gs-initialize.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Spawning Agents
To run the simulation, the map must be first populated with agents.
Inverted AI provides the {ref}`INITIALIZE`, a state-of-the-art model trained with real-life driving scenarios which can generate realistic positions for the initial state of the simulation.
<!-- Having realistic, complicated and diverse initial conditions are particularly crucial to observer interesting and informative <!-- interaction -\->between the agents, i.e., the ego vehicle and NPCs (non-player characters). -->

<!-- You can use **INITIALIZE** in two modes: -->
## Initialize all agents:
generates initial conditions (position and speed) for all the agents including the ego vehicle
```python
response = iai.initialize(
location="CARLA:Town03:Roundabout",
agent_count=10,
)
```
<!-- - _Initialize NPCs_: generates initial conditions (position and speed) only for the NPCs according to the provided state of the ego vehicle. -->
<!-- ```python -->
<!-- response = iai.initialize( -->
<!-- location="CARLA:Town03:Roundabout", -->
<!-- agent_count=10, -->
<!-- ) -->
<!-- ``` -->
> _response_ is a dictionary of _states_, and _agent-attribute_ (_recurrent-states_ is also returned for compatibility with **drive**)\
> _response["states"]_ is a list of agent states, by default the first on the list is always the ego vehicle.
---
{ref}`INITIALIZE`: more information about the python SDK.\
{ref}`REST API`: more information about the REST API and other programming languages.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ For installing the Python package from PyPI [![PyPI][pypi-badge]][pypi-link]:
pip install invertedai
```

The `invertedai` package has minimal dependencies to other python packages. However, it is always recommended to install the package in a virtual environment.
The `invertedai` package has minimal dependencies on other python packages. However, it is always recommended to install the package in a virtual environment.

```bash
python3 -m venv .venv
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
# Locations and Maps

Inverted AI provides an assortment of diverse road configurations and geometries, including real-world locations and maps from simulators (CARLA, Huawei SMARTS, ...).\
Inverted AI provides an assortment of diverse road configurations and geometries, including real-world locations and maps from simulators (CARLA, Huawei SMARTS, ...).

## AVAILABLE-LOCATIONS
To search the catalog for available maps to your account (API key) use **iai.available_locations** method by providing keywords
To search the catalog for available maps to your account (API key) use **{ref}`AVAILABLE-LOCATIONS`** method by providing keywords
```python
iai.available_locations("roundabout", "carla")
```

## GET-MAP
To get information about a scene use **iai.location_info**.
## LOCATION_INFO
To get information about a scene use **{ref}`LOCATION_INFO`**.
```python
iai.location_info**("CARLA:Town03:Roundabout")
iai.location_info("CARLA:Town03:Roundabout")
```
The scene information include the map in [Lanelet2](https://github.com/fzi-forschungszentrum-informatik/Lanelet2) format, map in JPEG format, maximum number of allowed (driveable) vehicles, latitude longitude coordinates (for real-world locations), id and list of traffic light and signs (if any exist in the map), etc.


---
{ref}`LOCATION_INFO`, {ref}`AVAILABLE-LOCATIONS`: more information about the python SDK.\
{ref}`REST API`: more information about the REST API and other programming languages.



37 changes: 12 additions & 25 deletions docs/source/getstarted/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Get Started
```{toctree}
:maxdepth: 2
gs-installation
gs-drive
gs-initialize
gs-mapinfo
```


---
## Quick Start

Import `Inverted AI` python package and set the apikey:
Expand Down Expand Up @@ -28,30 +39,6 @@ response = iai.drive(
)
```


## Demo
- **Goolge Colab**: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/inverted-ai/invertedai-drive/blob/develop/examples/Colab-Demo.ipynb)

- **Locally**: Download the
<a href="https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/inverted-ai/invertedai/tree/master/examples" target="_blank">examples directory</a>, navigate to the unzipped directory in terminal and run

```
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
.venv/bin/jupyter notebook Drive-Demo.ipynb
```



```{toctree}
:maxdepth: 2
installation
initdrive
mapinfo
```
**Goolge Colab Demo**: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/inverted-ai/invertedai-drive/blob/develop/examples/Colab-Demo.ipynb)


24 changes: 0 additions & 24 deletions docs/source/getstarted/initialize.md

This file was deleted.

3 changes: 2 additions & 1 deletion docs/source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@ Get Started
getstarted/index
pythonapi/index
examples/index
apireference
```

```{toctree}
:caption: GUIDES
:caption: INTEGRATIONS
:maxdepth: 2
Expand Down
8 changes: 4 additions & 4 deletions docs/source/pythonapi/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
```{toctree}
:maxdepth: 1
initialize
drive
availablemaps
getmap
sdk-drive
sdk-initialize
sdk-available-locations
sdk-location-info
```


File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# INITIALIZE


```{eval-rst}
.. autofunction:: invertedai.api_resources.initialize
```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# GET-MAP
# LOCATION_INFO


```{eval-rst}
Expand Down
Binary file added examples/CARLA_Town03_Roundabout.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c9f8d69

Please sign in to comment.