I have tried installing the CommonRoad-RL toolset using docker as well as manually using the installation instructions. In both cases, four of the tests fail because of the same error:
The same error occours when I try to run the first tutorial in the cell where the pickling happens. This is strange because pickling ShapeGroup objects works without any problem if I try doing it in the python console of the same conda environment. What could cause the error and how can I fix it?
Edit: The pickling in the python console only worked for commonroad.geometry ShapeGroup objects, not pycrcc ShapeGroup objects, I confused these two. pycrcc ShapeGroup objects can’t be pickled in the python console either.
this is related to a bug in the current version (v2021.3) of the drivability checker. I will try to fix it this week. It should work if you clone v2021.2 of the drivability checker. Sorry for the inconvenience.
I’m currently doing the commonroad-rl tutorial and I get the same error.
Does this have something to do with the drivability checker, since I haven’t cloned it?
Hi Nando,
yes, there is bug in the current version of the drivability checker. It should be fixed soon. You can clone v2021.2 of the drivability checker, there it should work
Thanks for your help, using v2021.2 of the drivability checker fixed the pickling problem. However, my docker installation still doesn’t pass all tests, giving me the errors:
FAILED commonroad_rl/tests/gym_commonroad/test_commonroad_env.py::test_check_env[15-False-False] - AssertionError: The observation returned by the `reset()` method does not match the given observation space
FAILED commonroad_rl/tests/gym_commonroad/test_commonroad_env.py::test_check_env[15-False-True] - AssertionError: The observation returned by the `reset()` method does not match the given observation space
FAILED commonroad_rl/tests/gym_commonroad/test_commonroad_env.py::test_check_env[15-True-False] - AssertionError: The observation returned by the `reset()` method does not match the given observation space
FAILED commonroad_rl/tests/gym_commonroad/test_commonroad_env.py::test_check_env[15-True-True] - AssertionError: The observation returned by the `reset()` method does not match the given observation space
Do you know what causes these and if they affect the training of RL agents?
Sorry for the late response. This is caused by a float number mismatch. In the observation space they are specified as float64 and one of the returned value is float32 or vice versa. This shouldn’t cause problems in your training and probably caused by a recent update of one of the dependencies. I’ll push a fix soon.
I tried using the older version of the drivability checker by checking out the older commit of version v2021.2 but I still get the same pickle errors. What could be the reason for that?
You need to remove the build folder and the two *.cpython-37m-x86_64-linux-gnu.so in commonroad_dc folder in commonroad-drivability-checker and rebuild the drivability checker. Command for rebuilding please check the install.sh script.
The CommonRoad-RL currently works with drivability checker 2021.2. The optional serializer (pickle) functionality is disabled by default for the version 2021.3, so it has to be reenabled manually by setting the flag ENABLE_SERIALIZER in application_settings.h. The functionality is currently supported only in linux.
The new version 2021.4 of drivability checker supports pickle out-of-the-box on both linux and macOS. Building under macOS requires installing the OpenMP package manually (please see installation instructions for more details on manual installation on MacOS).