Initial state is wrong

Hi, when I run the batch processing. This problem occurs in some scenario. It said trajectory does not start at the initial state. It is changeable for start point? How can I change that to correct this mistake? The problem is shown as blow:

Best regard

Hi GoodRoad,

Thank you for your question and sorry for my late answer.

In short, please first verify that your Shapely version with pip list. If it is version 2.0, please try to overwrite the package Shapely with a lower version via pip install Shapely==1.8.5 or an even lower version, for example, pip install Shapely==1.7.0.

The following is the explanation: Our code depends on a package called Shapely, which is updated to version 2.0 after the announcement of our exercise. Since we don’t specify the required version of it in requirements.txt, it is automatically the up-to-date version and breaks our code. Overwriting it with an older version helps based on our test. We will for sure update the requirements.txt later. If you would like not to mess up with the conda environment, you could wait for our update.

Hope this could help you. Your further questions are always welcomed.

Best regards,
Mingxuan

1 Like

Hi, I updated my requirements in the conda environment, but still get the same error… Any ideas how to resolve this?

1 Like

Hi ge56nal,

Thank you for asking. It should work based on our test. Could you please try restart your conda kernal/reboot your PC, then test it again. If it still dosn’t work for you, could you please provide some information about your OS, platform (how you run your code) and in addition the printed result of pip list?

Best,
Mingxuan

Hi Mingxuan,

thank you for your answer!
I restarted my laptop, but still get following error message on commonroads when I upload my solutions (with different coordinates):

Planning Problem Solution trajectory does not start at the initial_state of the planning problem with ID: 1 Expected position=[-912.81802 -636.72001] Received position=[-911.64274697 -637.52179379]

I have a macbook pro with a 2,6 GHz 6-Core Intel Core i7. I run macOS 13.0.1 (ventura).
I run the scenarios in a jupyter notebook and directly use the batch-processing tutorial (finding ~350 valid solutions). I edited the student.py in pycharm, but never executed the code there.

I get the same error when I upload the solutions of Astar/GBFS search algorithms.

And here my pip list:

Package                        Version
------------------------------ -----------
alabaster                      0.7.12
antlr4-python3-runtime         4.9.3
anyio                          3.5.0
appnope                        0.1.2
argon2-cffi                    21.3.0
argon2-cffi-bindings           21.2.0
attrs                          22.1.0
Babel                          2.9.1
backcall                       0.2.0
beautifulsoup4                 4.11.1
bleach                         4.1.0
brotlipy                       0.7.0
certifi                        2022.12.7
cffi                           1.15.1
charset-normalizer             2.0.4
colorama                       0.4.5
commonroad-drivability-checker 2022.2
commonroad-io                  2022.3
commonroad-route-planner       2022.3
commonroad-vehicle-models      3.0.2
cryptography                   38.0.1
cycler                         0.11.0
debugpy                        1.5.1
decorator                      5.1.1
defusedxml                     0.7.1
docutils                       0.18.1
entrypoints                    0.4
fastjsonschema                 2.16.2
idna                           3.4
imageio                        2.9.0
imagesize                      1.4.1
importlib-metadata             4.11.3
importlib-resources            5.2.0
ipykernel                      5.5.6
ipython                        7.18.1
ipython-autotime               0.3.1
ipython-genutils               0.2.0
ipywidgets                     7.5.1
iso3166                        2.1.1
jedi                           0.18.1
Jinja2                         3.1.2
json5                          0.9.6
jsonschema                     4.16.0
jupyter                        1.0.0
jupyter_client                 7.3.5
jupyter-console                6.4.3
jupyter_core                   4.11.2
jupyter-server                 1.18.1
jupyterlab                     3.4.4
jupyterlab-pygments            0.1.2
jupyterlab_server              2.15.2
jupyterlab-widgets             1.0.0
kiwisolver                     1.4.4
lxml                           4.9.1
MarkupSafe                     2.1.1
matplotlib                     3.3.4
matplotlib-inline              0.1.6
mistune                        0.8.4
mkl-fft                        1.3.1
mkl-random                     1.2.2
mkl-service                    2.4.0
nbclassic                      0.4.8
nbclient                       0.5.13
nbconvert                      6.5.4
nbformat                       5.5.0
nest-asyncio                   1.5.5
networkx                       2.6.3
notebook                       6.5.2
notebook_shim                  0.2.2
numpy                          1.21.6
omegaconf                      2.2.3
packaging                      21.3
pandocfilters                  1.5.0
parso                          0.8.3
pexpect                        4.8.0
pickleshare                    0.7.5
Pillow                         9.3.0
pip                            22.2.2
pkgutil_resolve_name           1.3.10
ply                            3.11
Polygon3                       3.0.9.1
prometheus-client              0.14.1
prompt-toolkit                 3.0.20
protobuf                       3.20.1
psutil                         5.9.0
ptyprocess                     0.7.0
pycparser                      2.21
Pygments                       2.11.2
pyOpenSSL                      22.0.0
pyparsing                      3.0.9
PyQt5-sip                      12.11.0
pyrsistent                     0.18.0
PySocks                        1.7.1
python-dateutil                2.8.2
pytz                           2022.1
PyYAML                         5.3.1
pyzmq                          23.2.0
qtconsole                      5.3.2
QtPy                           2.2.0
requests                       2.28.1
Rtree                          1.0.1
scipy                          1.7.3
Send2Trash                     1.8.0
setuptools                     65.5.0
Shapely                        1.8.5
sip                            6.6.2
six                            1.16.0
sniffio                        1.2.0
snowballstemmer                2.2.0
soupsieve                      2.3.2.post1
Sphinx                         5.0.2
sphinxcontrib-applehelp        1.0.2
sphinxcontrib-devhelp          1.0.2
sphinxcontrib-htmlhelp         2.0.0
sphinxcontrib-jsmath           1.0.1
sphinxcontrib-qthelp           1.0.3
sphinxcontrib-serializinghtml  1.1.5
terminado                      0.13.1
tinycss2                       1.2.1
toml                           0.10.2
tornado                        6.2
tqdm                           4.64.1
traitlets                      5.1.1
triangle                       20220202
typing_extensions              4.3.0
urllib3                        1.26.12
wcwidth                        0.2.5
webencodings                   0.5.1
websocket-client               0.58.0
wheel                          0.37.1
widgetsnbextension             3.5.2
zipp                           3.8.0

Looking forward to your ideas!

Best,
Noah

HI Noah,

it seems like the version of the drivabililty checker is wrong: see requirements file here requirements.txt · master · tum-cps / commonroad-search · GitLab. Could you try to upgrade by runnind pip install commonroad-drivability-checker==2022.2.1. Le us know if that works.

Best,
Gerald

Hi Gerald,

Thank you for your answer!

I updated the drivability checker. Now I get the same error I got online, but already when running the scenarios on my local machine. When I test e.g. Astar in batch processing on my local machine, the same error is produced:

Something went wrong while processing scenario BEL_Aarschot-11_1_T-1         ]
Traceback (most recent call last):
  File "/Users/noahbucher/Documents/Uni/Fundamentals of AI/Homework/commonroad-search/tutorials/4_batch_processing/../../SMP/batch_processing/process_scenario.py", line 312, in process_scenario
    logger=logger)
  File "/Users/noahbucher/Documents/Uni/Fundamentals of AI/Homework/commonroad-search/tutorials/4_batch_processing/../../SMP/batch_processing/process_scenario.py", line 200, in save_solution
    if valid_solution(scenario, planning_problem_set, solution)[0]:
  File "/Users/noahbucher/opt/anaconda3/envs/commonroad-py37/lib/python3.7/site-packages/commonroad_dc/feasibility/solution_checker.py", line 348, in valid_solution
    starts_at_correct_state(solution, planning_problem_set),
  File "/Users/noahbucher/opt/anaconda3/envs/commonroad-py37/lib/python3.7/site-packages/commonroad_dc/feasibility/solution_checker.py", line 314, in starts_at_correct_state
    raise SolutionCheckerException(msg)
commonroad_dc.feasibility.solution_checker.SolutionCheckerException: Planning Problem Solution trajectory does not start at the initial_state of the planning problem with ID: 1
Expected position=[ 978.34587 -134.32111]
Received position=[ 978.5580818  -135.72791137]

Any ideas how to solve that?

I suppose something in the setup is messed up, because the initial state is affected and even the provided search algorithms do not seem to work.

Best,

Noah

1 Like

Hi Noah,

maybe there is an issue with your local setup: Have you made sure that you are using the latest version of the commonroad-search repository? If not you could pull the latest version of the repository and try again. If, in addition the versions are correct according to the requirements.txt then it should produce the correct results locally and on the server.

If you are still having issues, don’t hesitate to reach out.
Best,
Gerald

1 Like

I installed everything new and then somehow got correct results.