> # add root folder to Python interpreter's path
> import os
> import sys
>
> sys.path.append("../")
> path="/home/hzy/PycharmProjects/pythonProject_py39/commonroad-reach/"
> import commonroad_reach.utility.logger as util_logger
> from commonroad_reach.data_structure.configuration_builder import ConfigurationBuilder
> from commonroad_reach.data_structure.reach.reach_interface import ReachableSetInterface
> from commonroad_reach.utility import visualization as util_visual
>
> # ==== specify scenario
> name_scenario = 'ARG_Carcarana-1_1_1'
>
> # ==== build configuration
> config = ConfigurationBuilder.build_configuration(name_scenario)
> config.update()
> logger = util_logger.initialize_logger(config)
> config.print_configuration_summary()
>
> # ==== compute reachable sets using reachability interface
> reach_interface = ReachableSetInterface(config)
> reach_interface.compute_reachable_sets()
>
> # ==== plot computation results and save as gifs
> util_visual.plot_scenario_with_reachable_sets(reach_interface, figsize=(7, 7))
Run imformation as follows,
> /home/hzy/anaconda3/envs/py39/bin/python3.9 /home/hzy/PycharmProjects/pythonProject_py39/Tutorial: Reachable Set Computation.py
> Traceback (most recent call last):
> File "/home/hzy/PycharmProjects/pythonProject_py39/Tutorial: Reachable Set Computation.py", line 16, in <module>
> config = ConfigurationBuilder.build_configuration(name_scenario)
> File "/home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/commonroad_reach/data_structure/configuration_builder.py", line 35, in build_configuration
> config_default = cls.construct_default_configuration()
> File "/home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/commonroad_reach/data_structure/configuration_builder.py", line 77, in construct_default_configuration
> config_default = cls.convert_to_absolute_paths(config_default)
> File "/home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/commonroad_reach/data_structure/configuration_builder.py", line 86, in convert_to_absolute_paths
> for key, path in config_default["general"].items():
> File "/home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/omegaconf/dictconfig.py", line 375, in __getitem__
> self._format_and_raise(key=key, value=None, cause=e)
> File "/home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/omegaconf/base.py", line 231, in _format_and_raise
> format_and_raise(
> File "/home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/omegaconf/_utils.py", line 899, in format_and_raise
> _raise(ex, cause)
> File "/home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/omegaconf/_utils.py", line 797, in _raise
> raise ex.with_traceback(sys.exc_info()[2]) # set env var OC_CAUSE=1 for full trace
> File "/home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/omegaconf/dictconfig.py", line 369, in __getitem__
> return self._get_impl(key=key, default_value=_DEFAULT_MARKER_)
> File "/home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/omegaconf/dictconfig.py", line 442, in _get_impl
> node = self._get_child(
> File "/home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/omegaconf/basecontainer.py", line 73, in _get_child
> child = self._get_node(
> File "/home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/omegaconf/dictconfig.py", line 480, in _get_node
> raise ConfigKeyError(f"Missing key {key!s}")
> **omegaconf.errors.ConfigKeyError: Missing key general**
> full_key: general
> object_type=dict
>
> Process finished with exit code 1
Looking forward to your reply, thanks!
Edmond
April 3, 2023, 7:26am
2
Hi Zhaoyan,
The error is related to not finding the config files.
Have you added the root path using PyCharm? You can find it under File â Settings â Python Interpreter â Click on the drop-down bar and select âshow allâ â Show interpreter paths â Add
If you have installed the package locally, you could manually copy the configuration/ folder to "/home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/commonroad_reach/"
Hi Edmond,
Thanks for your suggestions! However, I have tried both two methods, the error still exits.
Is there a problem with the installation process
(py39) hzy@hzy-ROG:~/PycharmProjects/pythonProject_py39/commonroad-reach$ CRDC_DIR="/home/hzy/PycharmProjects/pythonProject_py39/commonroad-drivability-checker/" pip install -v .
Using pip 22.1.2 from /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/pip (python 3.9)
Processing /home/hzy/PycharmProjects/pythonProject_py39/commonroad-reach
Running command python setup.py egg_info
/home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/setuptools/dist.py:691: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
warnings.warn(
running egg_info
creating /tmp/pip-pip-egg-info-pyv72r6u/commonroad_reach.egg-info
writing /tmp/pip-pip-egg-info-pyv72r6u/commonroad_reach.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-pip-egg-info-pyv72r6u/commonroad_reach.egg-info/dependency_links.txt
writing requirements to /tmp/pip-pip-egg-info-pyv72r6u/commonroad_reach.egg-info/requires.txt
writing top-level names to /tmp/pip-pip-egg-info-pyv72r6u/commonroad_reach.egg-info/top_level.txt
writing manifest file '/tmp/pip-pip-egg-info-pyv72r6u/commonroad_reach.egg-info/SOURCES.txt'
reading manifest file '/tmp/pip-pip-egg-info-pyv72r6u/commonroad_reach.egg-info/SOURCES.txt'
adding license file 'LICENSE.txt'
writing manifest file '/tmp/pip-pip-egg-info-pyv72r6u/commonroad_reach.egg-info/SOURCES.txt'
Preparing metadata (setup.py) ... done
Requirement already satisfied: commonroad-io>=2021.3 in /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages (from commonroad-reach==2022.1) (2022.3)
Requirement already satisfied: commonroad-route-planner>=2022.1 in /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages (from commonroad-reach==2022.1) (2022.3)
Requirement already satisfied: omegaconf>=2.1.1 in /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages (from commonroad-reach==2022.1) (2.3.0)
Requirement already satisfied: setuptools>=50.3.2 in /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages (from commonroad-reach==2022.1) (57.0.0)
Requirement already satisfied: numpy>=1.19.2 in /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages (from commonroad-reach==2022.1) (1.21.6)
Requirement already satisfied: shapely>=1.7.0 in /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages (from commonroad-reach==2022.1) (1.8.5.post1)
Requirement already satisfied: enum34>=1.1.10 in /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages (from commonroad-reach==2022.1) (1.1.10)
Requirement already satisfied: imageio>=2.9.0 in /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages (from commonroad-reach==2022.1) (2.9.0)
Requirement already satisfied: seaborn>=0.10.0 in /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages (from commonroad-reach==2022.1) (0.12.2)
Requirement already satisfied: matplotlib>=3.3.3 in /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages (from commonroad-reach==2022.1) (3.3.4)
Requirement already satisfied: scipy>=1.4.1 in /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages (from commonroad-reach==2022.1) (1.6.0)
Requirement already satisfied: networkx>=2.5 in /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages (from commonroad-reach==2022.1) (3.0)
Requirement already satisfied: opencv-python>=4.5 in /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages (from commonroad-reach==2022.1) (4.7.0.72)
Requirement already satisfied: lxml>=4.2.2 in /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages (from commonroad-io>=2021.3->commonroad-reach==2022.1) (4.9.2)
Requirement already satisfied: iso3166>=1.0.1 in /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages (from commonroad-io>=2021.3->commonroad-reach==2022.1) (2.1.1)
Requirement already satisfied: Pillow>=7.0.0 in /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages (from commonroad-io>=2021.3->commonroad-reach==2022.1) (8.3.2)
Requirement already satisfied: tqdm>=4.64 in /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages (from commonroad-io>=2021.3->commonroad-reach==2022.1) (4.65.0)
Requirement already satisfied: rtree>=0.8.3 in /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages (from commonroad-io>=2021.3->commonroad-reach==2022.1) (1.0.1)
Requirement already satisfied: protobuf==3.20.1 in /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages (from commonroad-io>=2021.3->commonroad-reach==2022.1) (3.20.1)
Requirement already satisfied: commonroad-vehicle-models>=2.0.0 in /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages (from commonroad-io>=2021.3->commonroad-reach==2022.1) (3.0.2)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages (from matplotlib>=3.3.3->commonroad-reach==2022.1) (3.0.9)
Requirement already satisfied: python-dateutil>=2.1 in /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages (from matplotlib>=3.3.3->commonroad-reach==2022.1) (2.8.2)
Requirement already satisfied: kiwisolver>=1.0.1 in /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages (from matplotlib>=3.3.3->commonroad-reach==2022.1) (1.4.4)
Requirement already satisfied: cycler>=0.10 in /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages (from matplotlib>=3.3.3->commonroad-reach==2022.1) (0.11.0)
Requirement already satisfied: PyYAML>=5.1.0 in /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages (from omegaconf>=2.1.1->commonroad-reach==2022.1) (5.3.1)
Requirement already satisfied: antlr4-python3-runtime==4.9.* in /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages (from omegaconf>=2.1.1->commonroad-reach==2022.1) (4.9.3)
Requirement already satisfied: pandas>=0.25 in /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages (from seaborn>=0.10.0->commonroad-reach==2022.1) (1.5.3)
Requirement already satisfied: pytz>=2020.1 in /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages (from pandas>=0.25->seaborn>=0.10.0->commonroad-reach==2022.1) (2022.7)
Requirement already satisfied: six>=1.5 in /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages (from python-dateutil>=2.1->matplotlib>=3.3.3->commonroad-reach==2022.1) (1.16.0)
Building wheels for collected packages: commonroad-reach
Running command python setup.py bdist_wheel
/home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/setuptools/dist.py:691: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
warnings.warn(
running bdist_wheel
running build
running build_py
copying commonroad_reach/data_structure/configuration_builder.py -> build/lib.linux-x86_64-3.9/commonroad_reach/data_structure
running egg_info
writing commonroad_reach.egg-info/PKG-INFO
writing dependency_links to commonroad_reach.egg-info/dependency_links.txt
writing requirements to commonroad_reach.egg-info/requires.txt
writing top-level names to commonroad_reach.egg-info/top_level.txt
reading manifest file 'commonroad_reach.egg-info/SOURCES.txt'
adding license file 'LICENSE.txt'
writing manifest file 'commonroad_reach.egg-info/SOURCES.txt'
running build_ext
cmake: /home/hzy/anaconda3/lib/libcurl.so.4: no version information available (required by cmake)
['-DPYTHON_INCLUDE_DIR=/home/hzy/anaconda3/envs/py39/include/python3.9', '-DPYTHON_EXECUTABLE=/home/hzy/anaconda3/envs/py39/bin/python', '-DCRDC_DIR=/home/hzy/PycharmProjects/pythonProject_py39/commonroad-drivability-checker/', '-DPYTHON_VER=3.9', '-DADD_TESTS=OFF', '-DCMAKE_BUILD_TYPE=Release']
['--config', 'Release']
cmake: /home/hzy/anaconda3/lib/libcurl.so.4: no version information available (required by cmake)
-- pybind11 v2.6.3 dev1
-- Found python bindings for pycrreach.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/hzy/PycharmProjects/pythonProject_py39/commonroad-reach/build/temp.linux-x86_64-3.9
cmake: /home/hzy/anaconda3/lib/libcurl.so.4: no version information available (required by cmake)
/usr/bin/cmake: /home/hzy/anaconda3/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /home/hzy/anaconda3/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/bin/sh: /home/hzy/anaconda3/lib/libtinfo.so.6: no version information available (required by /bin/sh)
/usr/bin/cmake: /home/hzy/anaconda3/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/bin/sh: /home/hzy/anaconda3/lib/libtinfo.so.6: no version information available (required by /bin/sh)
/usr/bin/cmake: /home/hzy/anaconda3/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 45%] Built target example
/bin/sh: /home/hzy/anaconda3/lib/libtinfo.so.6: no version information available (required by /bin/sh)
/usr/bin/cmake: /home/hzy/anaconda3/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/bin/sh: /home/hzy/anaconda3/lib/libtinfo.so.6: no version information available (required by /bin/sh)
/usr/bin/cmake: /home/hzy/anaconda3/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[100%] Built target pycrreach
/usr/bin/cmake: /home/hzy/anaconda3/lib/libcurl.so.4: no version information available (required by /usr/bin/cmake)
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/commonroad_reach
copying build/lib.linux-x86_64-3.9/commonroad_reach/__version__.py -> build/bdist.linux-x86_64/wheel/commonroad_reach
creating build/bdist.linux-x86_64/wheel/commonroad_reach/utility
copying build/lib.linux-x86_64-3.9/commonroad_reach/utility/logger.py -> build/bdist.linux-x86_64/wheel/commonroad_reach/utility
copying build/lib.linux-x86_64-3.9/commonroad_reach/utility/geometry.py -> build/bdist.linux-x86_64/wheel/commonroad_reach/utility
copying build/lib.linux-x86_64-3.9/commonroad_reach/utility/sweep_line.py -> build/bdist.linux-x86_64/wheel/commonroad_reach/utility
copying build/lib.linux-x86_64-3.9/commonroad_reach/utility/general.py -> build/bdist.linux-x86_64/wheel/commonroad_reach/utility
copying build/lib.linux-x86_64-3.9/commonroad_reach/utility/reach_operation.py -> build/bdist.linux-x86_64/wheel/commonroad_reach/utility
copying build/lib.linux-x86_64-3.9/commonroad_reach/utility/coordinate_system.py -> build/bdist.linux-x86_64/wheel/commonroad_reach/utility
copying build/lib.linux-x86_64-3.9/commonroad_reach/utility/visualization.py -> build/bdist.linux-x86_64/wheel/commonroad_reach/utility
copying build/lib.linux-x86_64-3.9/commonroad_reach/utility/__init__.py -> build/bdist.linux-x86_64/wheel/commonroad_reach/utility
copying build/lib.linux-x86_64-3.9/commonroad_reach/utility/configuration.py -> build/bdist.linux-x86_64/wheel/commonroad_reach/utility
copying build/lib.linux-x86_64-3.9/commonroad_reach/extract_driving_corridors.py -> build/bdist.linux-x86_64/wheel/commonroad_reach
copying build/lib.linux-x86_64-3.9/commonroad_reach/compute_reachable_set.py -> build/bdist.linux-x86_64/wheel/commonroad_reach
creating build/bdist.linux-x86_64/wheel/commonroad_reach/data_structure
creating build/bdist.linux-x86_64/wheel/commonroad_reach/data_structure/reach
copying build/lib.linux-x86_64-3.9/commonroad_reach/data_structure/reach/reach_set_py.py -> build/bdist.linux-x86_64/wheel/commonroad_reach/data_structure/reach
copying build/lib.linux-x86_64-3.9/commonroad_reach/data_structure/reach/reach_interface.py -> build/bdist.linux-x86_64/wheel/commonroad_reach/data_structure/reach
copying build/lib.linux-x86_64-3.9/commonroad_reach/data_structure/reach/reach_set_py_graph_offline.py -> build/bdist.linux-x86_64/wheel/commonroad_reach/data_structure/reach
copying build/lib.linux-x86_64-3.9/commonroad_reach/data_structure/reach/reach_set.py -> build/bdist.linux-x86_64/wheel/commonroad_reach/data_structure/reach
copying build/lib.linux-x86_64-3.9/commonroad_reach/data_structure/reach/reach_vertex.py -> build/bdist.linux-x86_64/wheel/commonroad_reach/data_structure/reach
copying build/lib.linux-x86_64-3.9/commonroad_reach/data_structure/reach/reach_set_py_graph_online.py -> build/bdist.linux-x86_64/wheel/commonroad_reach/data_structure/reach
copying build/lib.linux-x86_64-3.9/commonroad_reach/data_structure/reach/reach_set_cpp.py -> build/bdist.linux-x86_64/wheel/commonroad_reach/data_structure/reach
copying build/lib.linux-x86_64-3.9/commonroad_reach/data_structure/reach/reach_line.py -> build/bdist.linux-x86_64/wheel/commonroad_reach/data_structure/reach
copying build/lib.linux-x86_64-3.9/commonroad_reach/data_structure/reach/reach_polygon.py -> build/bdist.linux-x86_64/wheel/commonroad_reach/data_structure/reach
copying build/lib.linux-x86_64-3.9/commonroad_reach/data_structure/reach/driving_corridor.py -> build/bdist.linux-x86_64/wheel/commonroad_reach/data_structure/reach
copying build/lib.linux-x86_64-3.9/commonroad_reach/data_structure/reach/reach_node.py -> build/bdist.linux-x86_64/wheel/commonroad_reach/data_structure/reach
copying build/lib.linux-x86_64-3.9/commonroad_reach/data_structure/reach/driving_corridor_extractor.py -> build/bdist.linux-x86_64/wheel/commonroad_reach/data_structure/reach
copying build/lib.linux-x86_64-3.9/commonroad_reach/data_structure/reach/__init__.py -> build/bdist.linux-x86_64/wheel/commonroad_reach/data_structure/reach
copying build/lib.linux-x86_64-3.9/commonroad_reach/data_structure/segment_tree.py -> build/bdist.linux-x86_64/wheel/commonroad_reach/data_structure
copying build/lib.linux-x86_64-3.9/commonroad_reach/data_structure/configuration_builder.py -> build/bdist.linux-x86_64/wheel/commonroad_reach/data_structure
copying build/lib.linux-x86_64-3.9/commonroad_reach/data_structure/collision_checker.py -> build/bdist.linux-x86_64/wheel/commonroad_reach/data_structure
copying build/lib.linux-x86_64-3.9/commonroad_reach/data_structure/regular_grid.py -> build/bdist.linux-x86_64/wheel/commonroad_reach/data_structure
copying build/lib.linux-x86_64-3.9/commonroad_reach/data_structure/__init__.py -> build/bdist.linux-x86_64/wheel/commonroad_reach/data_structure
copying build/lib.linux-x86_64-3.9/commonroad_reach/data_structure/configuration.py -> build/bdist.linux-x86_64/wheel/commonroad_reach/data_structure
copying build/lib.linux-x86_64-3.9/commonroad_reach/pycrreach.cpython-39-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/wheel/commonroad_reach
copying build/lib.linux-x86_64-3.9/commonroad_reach/__init__.py -> build/bdist.linux-x86_64/wheel/commonroad_reach
running install_egg_info
Copying commonroad_reach.egg-info to build/bdist.linux-x86_64/wheel/commonroad_reach-2022.1-py3.9.egg-info
running install_scripts
adding license file "LICENSE.txt" (matched pattern "LICEN[CS]E*")
creating build/bdist.linux-x86_64/wheel/commonroad_reach-2022.1.dist-info/WHEEL
creating '/tmp/pip-wheel-a30yds0x/commonroad_reach-2022.1-cp39-cp39-linux_x86_64.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'commonroad_reach/__init__.py'
adding 'commonroad_reach/__version__.py'
adding 'commonroad_reach/compute_reachable_set.py'
adding 'commonroad_reach/extract_driving_corridors.py'
adding 'commonroad_reach/pycrreach.cpython-39-x86_64-linux-gnu.so'
adding 'commonroad_reach/data_structure/__init__.py'
adding 'commonroad_reach/data_structure/collision_checker.py'
adding 'commonroad_reach/data_structure/configuration.py'
adding 'commonroad_reach/data_structure/configuration_builder.py'
adding 'commonroad_reach/data_structure/regular_grid.py'
adding 'commonroad_reach/data_structure/segment_tree.py'
adding 'commonroad_reach/data_structure/reach/__init__.py'
adding 'commonroad_reach/data_structure/reach/driving_corridor.py'
adding 'commonroad_reach/data_structure/reach/driving_corridor_extractor.py'
adding 'commonroad_reach/data_structure/reach/reach_interface.py'
adding 'commonroad_reach/data_structure/reach/reach_line.py'
adding 'commonroad_reach/data_structure/reach/reach_node.py'
adding 'commonroad_reach/data_structure/reach/reach_polygon.py'
adding 'commonroad_reach/data_structure/reach/reach_set.py'
adding 'commonroad_reach/data_structure/reach/reach_set_cpp.py'
adding 'commonroad_reach/data_structure/reach/reach_set_py.py'
adding 'commonroad_reach/data_structure/reach/reach_set_py_graph_offline.py'
adding 'commonroad_reach/data_structure/reach/reach_set_py_graph_online.py'
adding 'commonroad_reach/data_structure/reach/reach_vertex.py'
adding 'commonroad_reach/utility/__init__.py'
adding 'commonroad_reach/utility/configuration.py'
adding 'commonroad_reach/utility/coordinate_system.py'
adding 'commonroad_reach/utility/general.py'
adding 'commonroad_reach/utility/geometry.py'
adding 'commonroad_reach/utility/logger.py'
adding 'commonroad_reach/utility/reach_operation.py'
adding 'commonroad_reach/utility/sweep_line.py'
adding 'commonroad_reach/utility/visualization.py'
adding 'commonroad_reach-2022.1.dist-info/LICENSE.txt'
adding 'commonroad_reach-2022.1.dist-info/METADATA'
adding 'commonroad_reach-2022.1.dist-info/WHEEL'
adding 'commonroad_reach-2022.1.dist-info/top_level.txt'
adding 'commonroad_reach-2022.1.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Building wheel for commonroad-reach (setup.py) ... done
Created wheel for commonroad-reach: filename=commonroad_reach-2022.1-cp39-cp39-linux_x86_64.whl size=1700573 sha256=9aadb4b482ce564c4a2210a21180a6b751482eab35367c26b9ef04423e4ea712
Stored in directory: /home/hzy/.cache/pip/wheels/21/d8/98/683f5aaa56aec7e4edcd00c73eafdce8ba59bc7ce1e739a29b
Successfully built commonroad-reach
Installing collected packages: commonroad-reach
Attempting uninstall: commonroad-reach
Found existing installation: commonroad-reach 2022.1
Uninstalling commonroad-reach-2022.1:
Removing file or directory /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/commonroad_reach-2022.1.dist-info/
Removing file or directory /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/commonroad_reach/__init__.py
Removing file or directory /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/commonroad_reach/__pycache__/
Removing file or directory /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/commonroad_reach/__version__.py
Removing file or directory /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/commonroad_reach/compute_reachable_set.py
Removing file or directory /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/commonroad_reach/data_structure/
Removing file or directory /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/commonroad_reach/extract_driving_corridors.py
Removing file or directory /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/commonroad_reach/pycrreach.cpython-39-x86_64-linux-gnu.so
Removing file or directory /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/commonroad_reach/utility/__init__.py
Removing file or directory /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/commonroad_reach/utility/__pycache__/
Removing file or directory /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/commonroad_reach/utility/configuration.py
Removing file or directory /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/commonroad_reach/utility/coordinate_system.py
Removing file or directory /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/commonroad_reach/utility/general.py
Removing file or directory /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/commonroad_reach/utility/geometry.py
Removing file or directory /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/commonroad_reach/utility/logger.py
Removing file or directory /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/commonroad_reach/utility/reach_operation.py
Removing file or directory /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/commonroad_reach/utility/sweep_line.py
Removing file or directory /home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/commonroad_reach/utility/visualization.py
Successfully uninstalled commonroad-reach-2022.1
Successfully installed commonroad-reach-2022.1
Blockquote
Hi @Zhaoyan.Huang ,
it seems like a path issues, i.e., that the configuration builder is not detecting the folder with the default configs properly (as Edmond already mentioned). What you could try: the function ConfigurationBuilder.build_configuration(name_scenario)
which you call to construct the config can optionally take an argument path_root
, which is Ǹone
by default. You could set it explicitly to the full path of the root directory of the cloned commonroad_reachable_set
repo on your local machine.
Let us know if that worked for you.
Best,
Gerald
Hi @gerald_w ,
Thanks for your significant suggestions! The previous issue has been tackledďź
Howeverďź a new error occur.
# add root folder to Python interpreter's path
import os
import sys
sys.path.append("../")
path="/home/hzy/PycharmProjects/pythonProject_py39/commonroad-reach/"
import commonroad_reach.utility.logger as util_logger
from commonroad_reach.data_structure.configuration_builder import ConfigurationBuilder
from commonroad_reach.data_structure.reach.reach_interface import ReachableSetInterface
from commonroad_reach.utility import visualization as util_visual
# ==== specify scenario
name_scenario = 'ARG_Carcarana-1_1_1'
path_root = '/home/hzy/PycharmProjects/pythonProject_py39/commonroad-reach/'
# ==== build configuration
config = ConfigurationBuilder.build_configuration(name_scenario,path_root)
config.update()
logger = util_logger.initialize_logger(config)
config.print_configuration_summary()
# ==== compute reachable sets using reachability interface
reach_interface = ReachableSetInterface(config)
reach_interface.compute_reachable_sets()
# ==== plot computation results and save as gifs
util_visual.plot_scenario_with_reachable_sets(reach_interface, figsize=(7, 7))
Run imformation as follows,
/home/hzy/anaconda3/envs/py39/bin/python3.9 /home/hzy/PycharmProjects/pythonProject_py39/Tutorial: Reachable Set Computation.py
# ===== Configuration Summary ===== #
# ARG_Carcarana-1_1_T-1
# Planning:
# dt: 0.1
# steps: 30
# coordinate system: curvilinear
# Vehicle (Ego):
# vehicle type id: 2
# v: lon_min = -13.9, lon_max = 50.8, lat_min = -4.0, lat_max = 4.0, max = 30.0
# a: lon_min = -11.5, lon_max = 11.5, lat_min = -2.0, lat_max = 2.0, max = 8.0
# Reachable set:
# computation mode: polytopic, c++ backend
# repartition mode: collision check, repartition
# inflation mode: inscribed circle
# obstacle rasterization: False
# grid size: 0.2
# split radius: 0.7
# prune: True
# num threads: 4
# ================================= #
* Computing reachable sets...
Took: 0.066s
* Plotting reachable sets...
Traceback (most recent call last):
File "/home/hzy/PycharmProjects/pythonProject_py39/Tutorial: Reachable Set Computation.py", line 26, in <module>
util_visual.plot_scenario_with_reachable_sets(reach_interface, figsize=(7, 7))
File "/home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/commonroad_reach/utility/visualization.py", line 71, in plot_scenario_with_reachable_sets
scenario.draw(renderer, draw_params={"dynamic_obstacle": {"draw_icon": config.debug.draw_icons},
File "/home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/commonroad/scenario/scenario.py", line 1188, in draw
renderer.draw_scenario(self, draw_params)
File "/home/hzy/anaconda3/envs/py39/lib/python3.9/site-packages/commonroad/visualization/mp_renderer.py", line 425, in draw_scenario
obj.lanelet_network.draw(self, draw_params.lanelet_network)
AttributeError: 'dict' object has no attribute 'lanelet_network'
Process finished with exit code 1
Looking forward to your reply, thanks!
Possible caused by version conflictďź
Edmond
April 16, 2023, 2:29pm
7
could you try with commonroad-io 2022.3? this might just be a plotting issue.
I also encounter this error and it seems that the pip requirement of commonroad-reach is confusing. A lot of library is out of date.
Can anyone fix the requirements of commonroad-reach or update a new version of it?
HI Albanis, we will release a new version of CR-Reach next week, where the requirements are updated to work with the latest CommonRoad version.
Best,
Gerald
1 Like
Great! Look forward to the new version
Hi Albanis, we have released the new version of CR-Reach (v2023.1) and also made it available as a PyPi package now.
Cool! Thank you very much for the update!
1 Like
I have met the same issue like u today, and my solution is to overwrite the âpath_scenarios: XXXXXâ in the âgeneral.yamlâ, which lies in â/home/user/anaconda3/envs/cdc/lib/python3.7/site-packages/commonroad_reach/configurations_defaultâ. I rewrote âpath_scenariosâ to be the absolute path to the âscenariosâ folder, whereas the âgeneral.yamlâ shows a relative path, and eventually it worked!
Hi Sherlock,
the paths are always relative to your working directory. So, if you are running the tutorial from the tutorials
directory, you need to set the root to the parent directory (..
).
Thanks for spotting the issue with the tutorial. We will upload a fixed version soon.
For now you can replace config = ConfigurationBuilder().build_configuration(name_scenario)
with config = ConfigurationBuilder(path_root="..").build_configuration(name_scenario)
.
Best,
Florian