Skip to content

Commit cb87172

Browse files
authored
Merge pull request #2 from sventarika/main
Added ClosedLoop Simulation Config
2 parents 53a4734 + 3e66d1e commit cb87172

21 files changed

Lines changed: 3358 additions & 3097 deletions

.devcontainer/devcontainer.json

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/docker-existing-dockerfile
3+
{
4+
"name": "simple-simulation",
5+
"build": {"dockerfile": "../Dockerfile"},
6+
7+
"runArgs": [
8+
"--net=host"
9+
],
10+
11+
"workspaceMount": "source=${localWorkspaceFolder},target=/work/develop/simple-simulation,type=bind",
12+
"workspaceFolder": "/work/develop/simple-simulation",
13+
14+
"customizations": {
15+
"vscode": {
16+
"extensions": [
17+
"ms-python.python",
18+
"ms-python.vscode-pylance",
19+
"ms-python.debugpy",
20+
"eamodio.gitlens",
21+
"mhutchie.git-graph",
22+
"mechatroner.rainbow-csv",
23+
"analytic-signal.preview-mp4",
24+
"tamasfe.even-better-toml",
25+
"charliermarsh.ruff"
26+
],
27+
"settings": {
28+
"python.defaultInterpreterPath": "/work/develop/simple-simulation/.venv/bin/python",
29+
"python.testing.pytestEnabled": true,
30+
"python.testing.unittestEnabled": false,
31+
"python.testing.pytestArgs": [
32+
"test"
33+
],
34+
"python.analysis.extraPaths": [
35+
"/work/simple-simulation"
36+
],
37+
"[python]": {
38+
"editor.formatOnSave": true,
39+
"editor.codeActionsOnSave": {
40+
"source.organizeImports": "explicit",
41+
"source.fixAll": "explicit"
42+
}
43+
},
44+
"ruff.enable": true,
45+
"ruff.lint.enable": true,
46+
"files.watcherExclude": {
47+
"**/.venv/**": true,
48+
"**/__pycache__/**": true
49+
}
50+
}
51+
}
52+
},
53+
54+
"postCreateCommand": "uv sync --dev",
55+
56+
"remoteUser": "root"
57+
}

.dockerignore

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Python
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.so
6+
.Python
7+
.venv/
8+
venv/
9+
ENV/
10+
env/
11+
*.egg-info/
12+
dist/
13+
build/
14+
15+
# Test and coverage
16+
.pytest_cache/
17+
.coverage
18+
htmlcov/
19+
.tox/
20+
21+
# Results and output
22+
results/
23+
*.mp4
24+
*.gif
25+
26+
# Git
27+
.git/
28+
.gitignore
29+
30+
# IDE
31+
.vscode/
32+
.idea/
33+
*.swp
34+
*.swo
35+
*~
36+
37+
# OS
38+
.DS_Store
39+
Thumbs.db
40+
41+
# DevContainer
42+
.devcontainer/

.gitlab-ci.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
image:
2-
name: ubuntu:24.04
3-
41
stages:
52
- lint
63
- test
74
- package
5+
- deploy
86

97
lint:
108
stage: lint
9+
image: ubuntu:24.04
1110
before_script:
1211
- apt-get update && apt-get install -y curl build-essential clang
1312
- curl -LsSf https://astral.sh/uv/install.sh | sh
@@ -26,6 +25,7 @@ lint:
2625

2726
test:
2827
stage: test
28+
image: ubuntu:24.04
2929
before_script:
3030
- apt-get update && apt-get install -y curl build-essential clang
3131
- curl -LsSf https://astral.sh/uv/install.sh | sh
@@ -50,6 +50,7 @@ test:
5050

5151
package:
5252
stage: package
53+
image: ubuntu:24.04
5354
only:
5455
- tags
5556
before_script:
@@ -61,3 +62,16 @@ package:
6162
- uv run -m build
6263
- TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token uv run -m twine upload --verbose --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi dist/*
6364
rules:
65+
66+
# deploy:
67+
# #Build the docker container and push to registry
68+
# stage: deploy
69+
# image: docker:28.5.2-cli
70+
# services:
71+
# - name: docker:28.5.2-dind
72+
# script:
73+
# - docker build -t $CI_REGISTRY_IMAGE:latest .
74+
# - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
75+
# - docker push $CI_REGISTRY_IMAGE:latest
76+
# rules:
77+
# - if: '$CI_COMMIT_BRANCH == "main"'

Dockerfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
FROM ubuntu:24.04
2+
3+
# Prevent interactive prompts during package installation
4+
ENV DEBIAN_FRONTEND=noninteractive
5+
6+
RUN apt-get update && \
7+
apt-get install -y \
8+
# Python and build tools
9+
python3 \
10+
python3-pip \
11+
python3-dev \
12+
python3-venv \
13+
git \
14+
build-essential \
15+
# OpenCV dependencies
16+
libgl1 \
17+
libglib2.0-0
18+
19+
# Install uv for Python package management
20+
RUN pip3 install --no-cache-dir uv --break-system-packages
21+
22+
# Set up environment variables
23+
ENV PYTHONPATH=/work/simple-simulation
24+
25+
# Create working directory
26+
RUN mkdir -p /work/simple-simulation
27+
WORKDIR /work/simple-simulation
28+
COPY . /work/simple-simulation/
29+
RUN cd /work/simple-simulation && uv sync
30+
31+
# Default command
32+
CMD ["/bin/bash"]

README.md

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,48 +8,47 @@ Execute simulation runs defined by [simple-scenario](https://github.com/ika-rwth
88

99
# Examples
1010

11-
:bulb: *To recreate these videos use: [examples/generate_simulation_run_videos.py](https://github.com/ika-rwth-aachen/simple-simulation/blob/main/examples/generate_simulation_run_videos.py).*
11+
:bulb: *To recreate these videos use: `examples/generate_simulation_run_videos.py`.*
1212

1313
## Free driving test scenario
1414

15-
[`examples/example_scenario0.json`](https://github.com/ika-rwth-aachen/simple-simulation/blob/main/examples/example_scenario0.json)
15+
`examples/example_scenario0.json`
1616

1717
Test scenario:
1818

19-
<img src="https://raw.githubusercontent.com/ika-rwth-aachen/simple-simulation/refs/heads/main/assets/example_scenario0.gif" />
19+
<img src="assets/example_scenario0.gif">
2020

2121
Simulation run:
2222

23-
<img src="https://raw.githubusercontent.com/ika-rwth-aachen/simple-simulation/refs/heads/main/assets/example_scenario0_simulation_run.gif" />
23+
<img src="assets/example_scenario0_simulation_run.gif">
2424

2525
Result: `is_goal_reached`
2626

2727
## Deceleration test scenario
2828

29-
[`examples/example_scenario1.json`](https://github.com/ika-rwth-aachen/simple-simulation/blob/main/examples/example_scenario1.json)
29+
`examples/example_scenario1.json`
3030

3131
Test scenario:
3232

33-
<img src="https://raw.githubusercontent.com/ika-rwth-aachen/simple-simulation/refs/heads/main/assets/example_scenario1.gif" />
34-
33+
<img src="assets/example_scenario1.gif">
3534

3635
Simulation run:
3736

38-
<img src="https://raw.githubusercontent.com/ika-rwth-aachen/simple-simulation/refs/heads/main/assets/example_scenario1_simulation_run.gif" />
37+
<img src="assets/example_scenario1_simulation_run.gif">
3938

4039
Result: `is_standstill`
4140

4241
## Cut-in test scenario
4342

44-
[`examples/example_scenario2.json`](https://github.com/ika-rwth-aachen/simple-simulation/blob/main/examples/example_scenario2.json)
43+
`examples/example_scenario2.json`
4544

4645
Test scenario:
4746

48-
<img src="https://raw.githubusercontent.com/ika-rwth-aachen/simple-simulation/refs/heads/main/assets/example_scenario2.gif" />
47+
<img src="assets/example_scenario2.gif">
4948

5049
Simulation run:
5150

52-
<img src="https://raw.githubusercontent.com/ika-rwth-aachen/simple-simulation/refs/heads/main/assets/example_scenario2_simulation_run.gif" />
51+
<img src="assets/example_scenario2_simulation_run.gif">
5352

5453
Result: `is_collision`
5554

@@ -144,10 +143,16 @@ The `simple_simulation` module consists of the following submodules:
144143

145144
This package is developed as part of the [Hi-Drive project](https://www.hi-drive.eu).
146145

147-
<img src="https://raw.githubusercontent.com/ika-rwth-aachen/simple-simulation/refs/heads/main/assets/Hi_Drive_Logo_Claim_rgb.svg" style="width:2in" />
146+
<!-- <img src="https://raw.githubusercontent.com/ika-rwth-aachen/simple-simulation/refs/heads/main/assets/Hi_Drive_Logo_Claim_rgb.svg" style="width:2in" /> -->
147+
<img src="assets/Hi_Drive_Logo_Claim_rgb.svg" style="width:2in" />
148148

149149
The research leading to these results has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 101006664.
150150
The sole responsibility of this publication lies with the authors.
151151
The authors would like to thank all partners within the Hi-Drive project (hi-drive.eu) for their cooperation and valuable contribution.
152152

153-
<img src="https://raw.githubusercontent.com/ika-rwth-aachen/simple-simulation/refs/heads/main/assets/funded_by_eu.svg" style="width:4in" />
153+
<!-- <img src="https://raw.githubusercontent.com/ika-rwth-aachen/simple-simulation/refs/heads/main/assets/funded_by_eu.svg" style="width:4in" /> -->
154+
<img src="assets/funded_by_eu.svg" style="width:4in" />
155+
156+
Additional development is done within the [SYNERGIES project](https://synergies-ccam.eu/).
157+
158+
<img src="assets/synergies.svg" style="width:4in" />

0 commit comments

Comments
 (0)