Skip to content

Commit 40111ca

Browse files
Merge pull request #26 from YannBerthelot/interpolator
Fixed interpolator + relaxed version constraints
2 parents 9c01f52 + 69e359c commit 40111ca

File tree

22 files changed

+1518
-997
lines changed

22 files changed

+1518
-997
lines changed

figures/bike/3d_altitude.png

3 Bytes
Loading
16 Bytes
Loading
0 Bytes
Loading

figures/cstr/trajectories.png

0 Bytes
Loading

figures/plane/3d_altitude.png

667 Bytes
Loading
41 Bytes
Loading

poetry.lock

Lines changed: 1398 additions & 888 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -23,29 +23,29 @@ packages = [
2323
enable = true
2424

2525
[tool.poetry.dependencies]
26-
python = ">=3.10,<3.13"
27-
gymnax = "^0.0.9"
28-
numpy = "^1.26.1"
29-
six = "^1.16.0"
30-
matplotlib = "^3.8.1"
31-
gymnasium = "^1.2.0"
32-
distrax = "^0.1.5"
33-
jax = "<7.0"
34-
moviepy = "^2.2.1"
35-
pygame = "^2.6.1"
36-
pre-commit = { version = "^3.5.0", optional = true }
37-
pytest = { version = "^7.4.3", optional = true }
38-
codecov = { version = "^2.1.13", optional = true }
39-
coverage = { version = "^7.3.2", optional = true }
40-
pytest-cov = { version = "^4.1.0", optional = true }
41-
pytest-readme = { version = "^1.0.2", optional = true }
42-
isort = { version = "^5.12.0", optional = true }
43-
mypy = { version = "^1.6.1", optional = true }
44-
flake8 = { version = "^7.3.0", optional = true }
45-
ruff = { version = "^0.12.11", optional = true }
46-
black = { version = "^25.1.0", optional = true }
47-
stable-baselines3 = { version = "^2.7.0", optional = true }
48-
tensorboard = { version = "^2.20.0", optional = true }
26+
python = ">=3.10"
27+
gymnax = ">=0.0.9"
28+
numpy = ">=1.26.1"
29+
six = ">=1.16.0"
30+
matplotlib = ">=3.8.1"
31+
gymnasium = ">=1.2.0"
32+
distrax = ">=0.1.5"
33+
jax = ">=0.6.2"
34+
moviepy = ">=2.2.1"
35+
pygame = ">=2.6.1"
36+
pre-commit = { version = ">=3.5.0", optional = true }
37+
pytest = { version = ">=7.4.3", optional = true }
38+
codecov = { version = ">=2.1.13", optional = true }
39+
coverage = { version = ">=7.3.2", optional = true }
40+
pytest-cov = { version = ">=4.1.0", optional = true }
41+
pytest-readme = { version = ">=1.0.2", optional = true }
42+
isort = { version = ">=5.12.0", optional = true }
43+
mypy = { version = ">=1.6.1", optional = true }
44+
flake8 = { version = ">=7.3.0", optional = true }
45+
ruff = { version = ">=0.12.11", optional = true }
46+
black = { version = ">=25.1.0", optional = true }
47+
stable-baselines3 = { version = ">=2.7.0", optional = true }
48+
tensorboard = { version = ">=2.20.0", optional = true }
4949

5050
[tool.black]
5151
line-length = 88
@@ -83,25 +83,25 @@ optional = true
8383
optional = true
8484

8585
[tool.poetry.group.dev.dependencies]
86-
pre-commit = "^3.5.0"
86+
pre-commit = ">=3.5.0"
8787

8888
[tool.poetry.group.test.dependencies]
89-
pytest = "^7.4.3"
90-
codecov = "^2.1.13"
91-
coverage = "^7.3.2"
92-
pytest-cov = "^4.1.0"
93-
pytest-readme = "^1.0.2"
89+
pytest = ">=7.4.3"
90+
codecov = ">=2.1.13"
91+
coverage = ">=7.3.2"
92+
pytest-cov = ">=4.1.0"
93+
pytest-readme = ">=1.0.2"
9494

9595
[tool.poetry.group.lint.dependencies]
96-
isort = "^5.12.0"
97-
mypy = "^1.6.1"
98-
flake8 = "^7.3.0"
99-
ruff = "^0.12.11"
100-
black = "^25.1.0"
96+
isort = ">=5.12.0"
97+
mypy = ">=1.6.1"
98+
flake8 = ">=7.3.0"
99+
ruff = ">=0.12.11"
100+
black = ">=25.1.0"
101101

102102
[tool.poetry.group.agent.dependencies]
103-
stable-baselines3 = "^2.7.0"
104-
tensorboard = "^2.20.0"
103+
stable-baselines3 = ">=2.7.0"
104+
tensorboard = ">=2.20.0"
105105

106106
[tool.poetry.extras]
107107
dev = [

src/target_gym/bicycle/env_jax.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ def __init__(self, integration_method: str = "rk4_1"):
5252
def default_params(self) -> BikeParams:
5353
return BikeParams()
5454

55+
def compute_reward(self, state, params):
56+
return compute_reward(state, params)
57+
5558
def step_env(
5659
self,
5760
key: chex.PRNGKey,

src/target_gym/bicycle/rendering.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ def world_to_screen(x, y):
7575
hy1 = yf + np.sin(handle_angle + np.pi / 2) * handle_length / 2
7676
hx2 = xf + np.cos(handle_angle - np.pi / 2) * handle_length / 2
7777
hy2 = yf + np.sin(handle_angle - np.pi / 2) * handle_length / 2
78-
pygame.draw.line(surf, (200, 0, 0), (hx1, hy1), (hx2, hy2), 3)
78+
pygame.draw.line(
79+
surf, (200, 0, 0), (hx1.item(), hy1.item()), (hx2.item(), hy2.item()), 3
80+
)
7981

8082
# --- HUD ---
8183
font = pygame.font.SysFont("Arial", 16)

0 commit comments

Comments
 (0)