CommonRoad / commonroad-drivability-checker

BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Errors of minimal examples #4

Open rgu01 opened 7 months ago

rgu01 commented 7 months ago

System description

Conda environment description

Other common road package installed

Error description I successfully ran pip install commonroad-all, but encountered "ModuleNotFound" errors in several minimal examples given by the tutorial.

  1. Minimal example of sumocr: ModuleNotFoundError (python=3.10.13): No module named 'simulation'. After running pip install simulation, I ended up with another error:

Collecting simulation Using cached simulation-0.1.1.dev80-py3-none-any.whl.metadata (2.2 kB) Collecting measurements (from simulation) Using cached measurements-0.1.1.dev67-py3-none-any.whl.metadata (2.2 kB) Requirement already satisfied: numpy in /home/ron/miniconda3/envs/cr/lib/python3.10/site-packages (from simulation) (1.26.4) Collecting utillib[cache,cholmod,interpolate,options] (from simulation) Using cached utillib-0.2-py3-none-any.whl.metadata (3.2 kB) Requirement already satisfied: scipy in /home/ron/miniconda3/envs/cr/lib/python3.10/site-packages (from measurements->simulation) (1.11.4) Collecting h5py (from utillib[cache,cholmod,interpolate,options]->simulation) Using cached h5py-3.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.5 kB) Collecting cachetools (from utillib[cache,cholmod,interpolate,options]->simulation) Using cached cachetools-5.3.3-py3-none-any.whl.metadata (5.3 kB) Collecting scikit-sparse>=0.4.1 (from utillib[cache,cholmod,interpolate,options]->simulation) Using cached scikit-sparse-0.4.12.tar.gz (214 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Using cached simulation-0.1.1.dev80-py3-none-any.whl (68 kB) Using cached measurements-0.1.1.dev67-py3-none-any.whl (66 kB) Using cached cachetools-5.3.3-py3-none-any.whl (9.3 kB) Using cached h5py-3.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.8 MB) Using cached utillib-0.2-py3-none-any.whl (97 kB) Building wheels for collected packages: scikit-sparse Building wheel for scikit-sparse (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for scikit-sparse (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [35 lines of output] running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-cpython-310 creating build/lib.linux-x86_64-cpython-310/sksparse copying sksparse/test_cholmod.py -> build/lib.linux-x86_64-cpython-310/sksparse copying sksparse/init.py -> build/lib.linux-x86_64-cpython-310/sksparse creating build/lib.linux-x86_64-cpython-310/sksparse/test_data copying sksparse/test_data/well1850_rhs1.mtx.gz -> build/lib.linux-x86_64-cpython-310/sksparse/test_data copying sksparse/test_data/illc1033_rhs1.mtx.gz -> build/lib.linux-x86_64-cpython-310/sksparse/test_data copying sksparse/test_data/illc1850_rhs1.mtx.gz -> build/lib.linux-x86_64-cpython-310/sksparse/test_data copying sksparse/test_data/well1033_rhs1.mtx.gz -> build/lib.linux-x86_64-cpython-310/sksparse/test_data copying sksparse/test_data/illc1033.mtx.gz -> build/lib.linux-x86_64-cpython-310/sksparse/test_data copying sksparse/test_data/illc1850.mtx.gz -> build/lib.linux-x86_64-cpython-310/sksparse/test_data copying sksparse/test_data/well1850.mtx.gz -> build/lib.linux-x86_64-cpython-310/sksparse/test_data copying sksparse/test_data/well1033.mtx.gz -> build/lib.linux-x86_64-cpython-310/sksparse/test_data running build_ext building 'sksparse.cholmod' extension creating build/temp.linux-x86_64-cpython-310 creating build/temp.linux-x86_64-cpython-310/sksparse gcc -pthread -B /home/ron/miniconda3/envs/cr/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/ron/miniconda3/envs/cr/include -fPIC -O2 -isystem /home/ron/miniconda3/envs/cr/include -fPIC -Isksparse -I/tmp/pip-build-env-9wi_glic/overlay/lib/python3.10/site-packages/numpy/core/include -I/home/ron/miniconda3/envs/cr/include -I/usr/include/suitesparse -I/home/ron/miniconda3/envs/cr/include/python3.10 -c sksparse/cholmod.c -o build/temp.linux-x86_64-cpython-310/sksparse/cholmod.o In file included from /tmp/pip-build-env-9wi_glic/overlay/lib/python3.10/site-packages/numpy/core/include/numpy/ndarraytypes.h:1948, from /tmp/pip-build-env-9wi_glic/overlay/lib/python3.10/site-packages/numpy/core/include/numpy/ndarrayobject.h:12, from /tmp/pip-build-env-9wi_glic/overlay/lib/python3.10/site-packages/numpy/core/include/numpy/arrayobject.h:5, from sksparse/cholmod.c:1226: /tmp/pip-build-env-9wi_glic/overlay/lib/python3.10/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp] 17 | #warning "Using deprecated NumPy API, disable it with " \ | ^~~ In file included from sksparse/cholmod.c:1231: sksparse/cholmod_backward_compatible.h:1:10: fatal error: cholmod.h: No such file or directory 1 | #include "cholmod.h" | ^~~ compilation terminated. error: command '/usr/bin/gcc' failed with exit code 1 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for scikit-sparse Failed to build scikit-sparse ERROR: Could not build wheels for scikit-sparse, which is required to install pyproject.toml-based projects

  1. Miniexample of commonroad-search (python=3.9): ModuleNotFoundError: No module named 'maneuver_automaton' and No module named 'motion_planner'. In addition, No module named 'SMP' occurred when running the first example of the tutorial: Uninformed Search Algorithms. I guess commonroad-search is not in commonroad-all (?), so I git clone the repo and run pip install -r requirements.txt, but it went wrong again. Is there a recommended way of installing the search tool? Hard to navigate among various places on the Internet.

  2. Minimal example of commonroad-reach: FileNotFoundError: [Errno 2] No such file or directory: 'scenarios/ARG_Carcarana-1_1_T-1.xml'. Do we need to download the scenarios manually and where?

  3. Minimal-example for Commonroad-RL (python=3.7.16, tool installed via pip install commonroad-rl)

Traceback (most recent call last): File "/home/ron/Projects/Commonroad/gymtest.py", line 20, in "reward_friction_violation": 0.}}) File "/home/ron/miniconda3/envs/crrl/lib/python3.7/site-packages/gym/envs/registration.py", line 235, in make return registry.make(id, kwargs) File "/home/ron/miniconda3/envs/crrl/lib/python3.7/site-packages/gym/envs/registration.py", line 129, in make env = spec.make(kwargs) File "/home/ron/miniconda3/envs/crrl/lib/python3.7/site-packages/gym/envs/registration.py", line 90, in make env = cls(**_kwargs) File "/home/ron/miniconda3/envs/crrl/lib/python3.7/site-packages/commonroad_rl/gym_commonroad/commonroad_env.py", line 135, in init with meta_scenario_reset_dict_path.open("rb") as f: File "/home/ron/miniconda3/envs/crrl/lib/python3.7/pathlib.py", line 1208, in open opener=self._opener) File "/home/ron/miniconda3/envs/crrl/lib/python3.7/pathlib.py", line 1063, in _opener return self._accessor.open(self, flags, mode) FileNotFoundError: [Errno 2] No such file or directory: '/home/ron/miniconda3/envs/crrl/lib/python3.7/site-packages/pickles/meta_scenario/meta_scenario_reset_dict.pickle'

smaierhofer commented 7 months ago

1. Installation issues The commonroad-all installation supports currently only the following tools/version:

We will update the tools/versions in the next couple of weeks and ensure that the corresponding tools work together properly. Tools not part of this list will probably cause installation issues when installing them together with commonroad-all.

2. CommonRoad-Search The installation of CommonRoad search is also detailed in the corresponding repository: https://gitlab.lrz.de/tum-cps/commonroad-search

3. CommonRoad-Reach You can find the scenario in the repository here or on our website.

4. CommonRoad-RL You can find the missing file here.

In general, the minimal examples will not work when only installing the PyPI package, as the package does not contain the required example files. If you want to try out the minimal examples, I recommend cloning the corresponding repository. The cloned repository should contain scripts or notebooks which can be executed directly.

I will also ask my colleagues who are responsible for the corresponding tools to take a look at your problems.