Skip to content

Commit b90cd27

Browse files
committed
VMAS-1.4.2
1 parent 80b63cb commit b90cd27

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
include vmas/simulator/secrcode.ttf
2-
include vmas/scenarios_data
2+
recursive-include vmas/scenarios_data *

vmas/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"mpe_scenarios",
1919
]
2020

21-
__version__ = "1.4.1"
21+
__version__ = "1.4.2"
2222

2323
scenarios = sorted(
2424
[

vmas/scenarios/road_traffic.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# ProrokLab (https://www.proroklab.org/)
33
# All rights reserved.
44

5+
import pathlib
56
import time
67
import xml.etree.ElementTree as ET # For reading the map data
78
from typing import Dict
@@ -255,9 +256,14 @@ def init_params(self, batch_dim, device, **kwargs):
255256
)
256257

257258
# Get map data
258-
map_file_path = kwargs.pop(
259-
"map_file_path", "vmas/scenarios_data/road_traffic/road_traffic_cpm_lab.xml"
260-
)
259+
map_file_path = kwargs.pop("map_file_path", None)
260+
if map_file_path is None:
261+
map_file_path = str(
262+
pathlib.Path(__file__).parent.parent
263+
/ "scenarios_data"
264+
/ "road_traffic"
265+
/ "road_traffic_cpm_lab.xml"
266+
)
261267
self.map_data = get_map_data(map_file_path, device=device)
262268
# Long-term reference path
263269
(

0 commit comments

Comments
 (0)