fzi-forschungszentrum-informatik / Lanelet2

Map handling framework for automated driving
BSD 3-Clause "New" or "Revised" License
800 stars 327 forks source link

How to know which functions are available in Lanelet2 Python and how to use them, and question about Attributes #247

Closed 150205 closed 1 year ago

150205 commented 2 years ago

I have some difficulty using lanelet2's functions. How can I get which of all the functions Python can call? And how to use these functions? Is there any API documentation for Lanelet2 Python?

And how do I get the value of attributes? My code is as follows: for lanelet in map.laneletLayer: for attributes in lanelet.attributes: atr=attributes For example I can get (location,urban)What data type is this?And how can I get a numpy array or list or dictionary like ['location','urban']

poggenhans commented 2 years ago

There is no good documentation on the python implementation. The best source of truth is either the source code itself, or just what python tools themselves can tell you from inspecting the code. And there is the small python example that shows the basics.

Regarding your question: attributes behave similarly to dicts, so lanelet.attributes["location"] == "urban".

github-actions[bot] commented 2 years ago

This issue is stale because it has been open for 90 days with no activity. Is this issue still work in progress? If yes, mark it as "WIP" or comment, otherwise it will be closed in 30 days.

github-actions[bot] commented 1 year ago

This issue was closed because it has been stalled for 30 days with no activity.