carla-simulator / scenario_runner

Traffic scenario definition and execution engine
https://carla-scenariorunner.readthedocs.io/en/latest/
MIT License
536 stars 365 forks source link

Run without building carla from sources #1086

Open alexkutsan opened 5 months ago

alexkutsan commented 5 months ago

Is it possible to run scenario runner without building Carla from sources, but using the https://pypi.org/project/carla/ package?

When I try to do so I get error:

╭─akutsan at powerpc in ~/rnd/company/carla_research/scenario_runner on d12d8bb✘✘✘ using «venv»
╰─± python3 scenario_runner.py --scenario FollowLeadingVehicle_1 --reloadWorld                                                                                                                                                                       0.421s 
/home/akutsan/rnd/company/carla_research/scenario_runner/scenario_runner.py:23: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.version import LooseVersion
Traceback (most recent call last):
  File "/home/akutsan/rnd/company/carla_research/scenario_runner/scenario_runner.py", line 35, in <module>
    from srunner.scenarioconfigs.openscenario_configuration import OpenScenarioConfiguration
  File "/home/akutsan/rnd/company/carla_research/scenario_runner/srunner/scenarioconfigs/openscenario_configuration.py", line 24, in <module>
    from srunner.scenariomanager.carla_data_provider import CarlaDataProvider  # workaround
  File "/home/akutsan/rnd/company/carla_research/scenario_runner/srunner/scenariomanager/carla_data_provider.py", line 22, in <module>
    from agents.navigation.global_route_planner import GlobalRoutePlanner
ModuleNotFoundError: No module named 'agents'
PabloVD commented 5 months ago

You need to download the package containing the CARLA simulator from here. Take a look also here to see the complete installation process in the context of the Leaderboard, although if you do not need the Leaderboard you can skip the corresponding steps.