Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] When accessing the parameters of lanelet::AllWayStop/lanelet::RightOfWays, an infinite loop occurs #378

Open
Joe12138 opened this issue Dec 26, 2024 · 0 comments

Comments

@Joe12138
Copy link

When I want to accessing the parameters of lanelet::AllWayStop/lanelet::RightOfWays, an infinite loop occurs.
The code is as below:

for reg_ele_obj in lanelet_map.regulatoryElementLayer:
      if reg_ele_obj.attributes["subtype"] == "right_of_way":
            parameter_dict = reg_ele_obj.parameters
            right_of_way_lanelets = reg_ele_obj.rightOfWayLanelets()
            yield_lanelets = reg_ele_obj.yieldLanelets()
            stop_line = reg_ele_obj.stopLine
            refers = parameter_dict["refers"]
            refer_line = parameter_dict["ref_line"]
            print("Hello world!")
            print(parameter_dict.values())
      elif reg_ele_obj.attributes["subtype"] == "all_way_stop":
            lanelets = reg_ele_obj.lanelets()
            stop_lines = reg_ele_obj.stopLines()
            traffic_signs = reg_ele_obj.trafficSigns()
            parameter_dict = reg_ele_obj.parameters
            refers = parameter_dict["refers"]
            refer_line = parameter_dict["ref_line"]
            
            print(parameter_dict.keys())
            print(parameter_dict.values())

The error is shown as below:

File "hd_map_lanelet.py", line 255, in <module>
    print(parameter_dict.values())
RecursionError: maximum recursion depth exceeded while calling a Python object

Version: lanelet2 1.2.2 (Python3.9.21, Ubuntu 22.04 LTS)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant