System Details
- Python ver.: 3.8.10
- Scenic ver.: 3.0.0b2
- OS: Intel / Win 11
- Simulation in carla
Detailed Description
- When trying to extract all of the pedestrian crossings on the map, none are returned, doesn't matter if I try to get them from the intersections or the roads. I.e. if I try to get all the roads where crossings are not an empty tuple,
roads = filter(lambda i: i.crossings != (), network.roads), and assert that list is not empty, I get the assertionError. I checked the .xodr file of the Town05 map, and it has multiple Crosswalks (exact number is 66). Code is as follows:
param map = 'assets/maps/CARLA/Town05.xodr'
param carla_map = 'Town05'
param time_step = 1.0/10
model scenic.simulators.carla.model
roads = filter(lambda i: i.crossings != (), network.roads)
assert len(roads) > 0, \
'No roads with crossings found in the network'
scenic -S --2d --count 1 ..\ScenicToOSC\scenic\scenarioUnexpectedPedestrianOnIntersection.scenic -b
-
pygame 2.5.2 (SDL 2.28.3, Python 3.8.10)
Hello from the pygame community. https://www.pygame.org/contribute.html
Loading cached version of road network...
Loaded cached network in 0.36 seconds.
Traceback (most recent call last):
File "C:\Users\ivbu01\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 194, in run_module_as_main
return run_code(code, main_globals, None,
File "C:\Users\ivbu01\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\venv1\Scripts\scenic.exe_main.py", line 4, in
from scenic.main import dummy
File "C:\Scenic\src\scenic_main.py", line 195, in
scenario = errors.callBeginningScenicTrace(
File "C:\Scenic\src\scenic\core\errors.py", line 282, in callBeginningScenicTrace
return func()
File "C:\Scenic\src\scenic_main.py", line 196, in
lambda: translator.scenarioFromFile(
File "C:\Scenic\src\scenic\syntax\translator.py", line 142, in scenarioFromFile
return _scenarioFromStream(
File "C:\Scenic\src\scenic\syntax\translator.py", line 172, in _scenarioFromStream
compileStream(stream, namespace, compileOptions, filename)
File "C:\Scenic\src\scenic\syntax\translator.py", line 321, in compileStream
executeCodeIn(code, namespace)
File "C:\Scenic\src\scenic\syntax\translator.py", line 560, in executeCodeIn
exec(code, namespace)
File "C:\ScenicToOSC\scenic\scenarioUnexpectedPedestrianOnIntersection.scenic", line 12, in
assert len(roads) > 0,
AssertionError: No roads with crossings found in the network```
Steps To Reproduce
- Just running the code on any map is enough to reproduce the problem.
param map = 'assets/maps/CARLA/Town05.xodr'
param carla_map = 'Town05'
param time_step = 1.0/10
model scenic.simulators.carla.model
roads = filter(lambda i: i.crossings != (), network.roads)
assert len(roads) > 0, \
'No roads with crossings found in the network'
Issue Submission Checklist
System Details
Detailed Description
roads = filter(lambda i: i.crossings != (), network.roads), and assert that list is not empty, I get the assertionError. I checked the .xodr file of the Town05 map, and it has multiple Crosswalks (exact number is 66). Code is as follows:scenic -S --2d --count 1 ..\ScenicToOSC\scenic\scenarioUnexpectedPedestrianOnIntersection.scenic -bpygame 2.5.2 (SDL 2.28.3, Python 3.8.10)
Hello from the pygame community. https://www.pygame.org/contribute.html
Loading cached version of road network...
Loaded cached network in 0.36 seconds.
Traceback (most recent call last):
File "C:\Users\ivbu01\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 194, in run_module_as_main
return run_code(code, main_globals, None,
File "C:\Users\ivbu01\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\venv1\Scripts\scenic.exe_main.py", line 4, in
from scenic.main import dummy
File "C:\Scenic\src\scenic_main.py", line 195, in
scenario = errors.callBeginningScenicTrace(
File "C:\Scenic\src\scenic\core\errors.py", line 282, in callBeginningScenicTrace
return func()
File "C:\Scenic\src\scenic_main.py", line 196, in
lambda: translator.scenarioFromFile(
File "C:\Scenic\src\scenic\syntax\translator.py", line 142, in scenarioFromFile
return _scenarioFromStream(
File "C:\Scenic\src\scenic\syntax\translator.py", line 172, in _scenarioFromStream
compileStream(stream, namespace, compileOptions, filename)
File "C:\Scenic\src\scenic\syntax\translator.py", line 321, in compileStream
executeCodeIn(code, namespace)
File "C:\Scenic\src\scenic\syntax\translator.py", line 560, in executeCodeIn
exec(code, namespace)
File "C:\ScenicToOSC\scenic\scenarioUnexpectedPedestrianOnIntersection.scenic", line 12, in
assert len(roads) > 0,
AssertionError: No roads with crossings found in the network```
Steps To Reproduce
Issue Submission Checklist