Skip to content

Commit 92ecf68

Browse files
[navigation]introduce x_semidim and y_semidim parameters for managing environment dimensions
1 parent efe48af commit 92ecf68

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

vmas/scenarios/navigation.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ def make_world(self, batch_dim: int, device: torch.device, **kwargs):
2424
self.n_agents = kwargs.pop("n_agents", 4)
2525
self.collisions = kwargs.pop("collisions", True)
2626

27-
self.x_semidim = kwargs.pop('x_semidim', None)
28-
self.y_semidim = kwargs.pop('y_semidim', None)
27+
self.x_semidim = kwargs.pop("x_semidim", None)
28+
self.y_semidim = kwargs.pop("y_semidim", None)
2929

3030
self.agents_with_same_goal = kwargs.pop("agents_with_same_goal", 1)
3131
self.split_goals = kwargs.pop("split_goals", False)
@@ -61,7 +61,13 @@ def make_world(self, batch_dim: int, device: torch.device, **kwargs):
6161
), "Splitting the goals is allowed when the agents are even and half the team has the same goal"
6262

6363
# Make world
64-
world = World(batch_dim, device, substeps=2, x_semidim=self.x_semidim, y_semidim=self.y_semidim)
64+
world = World(
65+
batch_dim,
66+
device,
67+
substeps=2,
68+
x_semidim=self.x_semidim,
69+
y_semidim=self.y_semidim,
70+
)
6571

6672
known_colors = [
6773
(0.22, 0.49, 0.72),

0 commit comments

Comments
 (0)