The make function:
def make(self, **kwargs) → Env:
“”“Instantiates an instance of the environment with appropriate kwargs”""
if self.entry_point is None:
raise error.Error(
f"Attempting to make deprecated env {self.id}. "
“(HINT: is there a newer registered version of this env?)”
)
_kwargs = self.kwargs.copy()
E AttributeError: ‘NoneType’ object has no attribute ‘copy’
The find lanelet function
def find_lanelet_by_id(self, lanelet_id: int) → Lanelet:
assert is_natural_number(lanelet_id), '<LaneletNetwork/find_lanelet_by_id>: provided id is not valid! id = {}'.format(lanelet_id)
E AssertionError: <LaneletNetwork/find_lanelet_by_id>: provided id is not valid! id = []
I think it could be package version inconsistency. I guess we need to know what package version the project is working with. You just write a “gym” in the environment.yml, but gym just got updated on Feb 19, 2022. I can no longer solve this issue by settling the package version. Could you take a look at it?
I tested it and for some scenarios in the tests, the current route planner does not find a route. This is caused by an update in the route planner to not generate invalid/bad-quality routes. I pushed a commit to remove such scenarios in our test cases.
Hi @xwang, I cloned the repository and followed the instructions given at https://gitlab.lrz.de/tum-cps/commonroad-rl. I am still getting the same error as @Galen233. Can you please help me.
Could you give more details about for which scenario did the error happen? The error of not finding lanelet ids is caused by a bug in shapely. We cached the polygon of lanelets to accelerate the function of finding lanelets. However, the cached polygons are None in some case after polygon.buffer function in shapely. We abandoned the use of this function in our internal version of commonroad-io, will be released recently. My suggestion is to focus on highway scenarios where the lanelets are more structured and switch to urban scenarios after the next release of commonroad-io.
Hi @xwang, I tried with new version. This time gym version has been changed to 0.21.0 in environment.yml. However, I am still getting 3 failures. I am getting AssertionError: <LaneletNetwork/find_lanelet_by_id>: provided id is not valid! id = [] for def find_lanelet_by_id(self, lanelet_id: int) -> Lanelet:
Hi @xwang, I was using commonroad-io==2021.4 as given in the environment.yml previously. I will change that and try again. Also it will be helpful if tutorials for CommonroadRL get updated. There are some issues with the visualization in the Tutorial2.