Minimal example, commonroad_rl/gym_commonroad/configs.yaml not found

Dear everybody,
new user trying to play with some of the tools of your common-road suite.
I’m trying to execute the minimal example described here: https://commonroad.in.tum.de/tools/commonroad-rl without success.

As done in other posts of mine, I’ll post the whole history of my trials as there may be some valuable info I don’t notice (please, bear with me).

I started by successfully installing commonroad-all in clean Python 3.9 virtual environment.
Then I immediately tried to execute the minimal example script, obtaining error:

ModuleNotFoundError: No module named 'gym'

I solved it with python3 -m pip install gym

New error is

ModuleNotFoundError: No module named 'commonroad_rl'

I solved it with python3 -m pip install commonroad-rl

New error is

sumocr 2022.3 requires commonroad-io>=2022.3, but you have commonroad-io 2022.1 which is incompatible.

I solved it with python3 -m pip install --upgrade commonroad-io

New error is

commonroad-rl 2022.2 requires commonroad-io==2022.1, but you have commonroad-io 2022.3 which is incompatible.

I solved it with python3 -m pip install --upgrade commonroad-rl

New error is

ModuleNotFoundError: No module named 'commonroad.visualization.param_server'

I solved it with python3 -m pip install --upgrade commonroad-rl

New error is

sumocr 2022.3 requires commonroad-io>=2022.3, but you have commonroad-io 2022.1 which is incompatible.

This is a transitive dependency issue as this is the very first error I encountered.
I thus ignored this atm, and proceeded to re-try executing the minimal example script.

Now error is

ImportError: cannot import name 'LOG' from 'shapely.geos'

I solved it with python3 -m pip install shapely==1.8.5 (newer versions did not solve the issue)

The last error is

FileNotFoundError: [Errno 2] No such file or directory: '[...]/python3.9/site-packages/commonroad_rl/gym_commonroad/configs.yaml'

Can you tell how to solve it, or what I did wrong?

Dear smariani,

Thanks for the detailed feedback. There have been many updates of the other commonroad modules recently thus some of the dependencies in commonroad-rl need to be fixed. This will be fixed in the next release.

commonroad-all currently does not include the commonroad-rl package yet, as listed here.

The config.yaml file is not included in the current pypi package. You would need to manually download it from here and put it under [...]/python3.9/site-packages/commonroad_rl/gym_commonroad/. This will also be fixed in the next release.

Best,
Xiao

Dear @xwang , many thanks for your kind reply.
Now I get this error below

[DEBUG] commonroad_rl.gym_commonroad.commonroad_env - Initialization started
Traceback (most recent call last):
  File "/Users/sm/PycharmProjects/RomoliGiacomo/tutorial-rl.py", line 5, in <module>
    env = gym.make("commonroad-v1",
  File "/Users/sm/PycharmProjects/RomoliGiacomo/romoli_env/lib/python3.9/site-packages/gym/envs/registration.py", line 235, in make
    return registry.make(id, **kwargs)
  File "/Users/sm/PycharmProjects/RomoliGiacomo/romoli_env/lib/python3.9/site-packages/gym/envs/registration.py", line 129, in make
    env = spec.make(**kwargs)
  File "/Users/sm/PycharmProjects/RomoliGiacomo/romoli_env/lib/python3.9/site-packages/gym/envs/registration.py", line 90, in make
    env = cls(**_kwargs)
  File "/Users/sm/PycharmProjects/RomoliGiacomo/romoli_env/lib/python3.9/site-packages/commonroad_rl/gym_commonroad/commonroad_env.py", line 97, in __init__
    assert k in self.configs, f"Configuration item not supported: {k}"
AssertionError: Configuration item not supported: reward_configs_sparse

Dear @smariani,

I uploaded a new version yesterday to GitLab. You probably downloaded the config file for the new version where some items are renamed. And they are not compatible with your local installation of commonroad-rl anymore. I’ve also uploaded the new version to PyPi here. So you could try reinstall it simply by running pip install commonroad-rl. Note that there might be some issue with mpi4py which needs to be manually installed via conda as the README file suggests.

Best,
Xiao

Updating commonroad-rl to version 2023.1.3 gives this

ERROR: Could not find a version that satisfies the requirement tensorflow==1.15.0 (from commonroad-rl) (from versions: 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.6.0rc0, 2.6.0rc1, 2.6.0rc2, 2.6.0, 2.6.1, 2.6.2, 2.6.3, 2.6.4, 2.6.5, 2.7.0rc0, 2.7.0rc1, 2.7.0, 2.7.1, 2.7.2, 2.7.3, 2.7.4, 2.8.0rc0, 2.8.0rc1, 2.8.0, 2.8.1, 2.8.2, 2.8.3, 2.8.4, 2.9.0rc0, 2.9.0rc1, 2.9.0rc2, 2.9.0, 2.9.1, 2.9.2, 2.9.3, 2.10.0rc0, 2.10.0rc1, 2.10.0rc2, 2.10.0rc3, 2.10.0, 2.10.1, 2.11.0rc0, 2.11.0rc1, 2.11.0rc2, 2.11.0)
ERROR: No matching distribution found for tensorflow==1.15.0

You need a lower Python version. Python 3.7 should work. Unfortunately, stable baselines depend on tensorflow 1.x which is only available for Python <=3.7.

Oh I see…any plans on your side to upgrade to stable-baselines3?

Dear @smariani,

thanks for your question and sorry for the late reply. Yes, we plan to update to sb3 but it is not clear yet when this is ready to release.