Skip to content

Commit

Permalink
Merge branch 'paper-tests'
Browse files Browse the repository at this point in the history
  • Loading branch information
adscib committed Apr 26, 2024
2 parents 58ac738 + 4a303bd commit 36d5a1b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ RUN pip install jupyter notebook
RUN pip install omegaconf scipy shapely
RUN pip install invertedai
RUN pip install torchdrivesim
RUN pip install "torchdriveenv[baselines] @ git+https://github.com/inverted-ai/torchdriveenv.git"
RUN pip install torchdriveenv[baselines]
11 changes: 2 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,27 @@ The basic installation of torchdriveenv uses an OpenCV renderer, which is slower

To install the “torchdriveenv” with opencv rendering:
```
python3 -m venv $PHTHON_VIRTUAL_ENV_PATH
source .venv/bin/activate
pip install "torchdriveenv[baselines] @ git+https://github.com/inverted-ai/torchdriveenv.git"
pip install torchdriveenv
```

To run examples:
Set the `$IAI_API_KEY` and `$WANDB_API_KEY`
```
git clone git@github.com:inverted-ai/torchdriveenv.git
cd torchdriveenv
pip install torchdriveenv[baselines]
cd examples
source $PHTHON_VIRTUAL_ENV_PATH/bin/activate
python rl_training.py
```

## Pytorch3d rendering

To install the “torchdriveenv” with Pytorch3d rendering:
```
git clone git@github.com:inverted-ai/torchdriveenv.git
cd torchdriveenv
docker build --target torchdriveenv-first-release -t torchdriveenv-first-release:latest .
```

To run examples:
Set the `$IAI_API_KEY` and `$WANDB_API_KEY`
```
cd torchdriveenv
cd examples
docker compose up rl-training
```
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ dependencies = [
"scipy",
"imageio",
"torch>=1.10.1",
"invertedai",
"invertedai>=0.0.16",
"omegaconf",
"opencv-python",
"gymnasium",
"lanelet2",
"torchdrivesim",
"torchdrivesim>=0.2.1",
]
dynamic = ["version",]

Expand Down
2 changes: 1 addition & 1 deletion torchdriveenv/gym_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def build_simulator(cfg: EnvConfig, map_cfg, device, ego_state, scenario=None, c
with torch.no_grad():
traffic_light_controller = map_cfg.traffic_light_controller
initial_light_state_name = traffic_light_controller.current_state_with_name
traffic_light_ids = [stopline.actor_id for stopline in map_cfg.stoplines if stopline.agent_type == 'traffic-light']
traffic_light_ids = [stopline.actor_id for stopline in map_cfg.stoplines if stopline.agent_type == 'traffic_light']
driving_surface_mesh = map_cfg.road_mesh


Expand Down

0 comments on commit 36d5a1b

Please sign in to comment.