Closed OliverLeeyiyang closed 1 year ago
Sorry for the late reply. I am not sure if there is a way to directly replicate the way used in the Autoware C++ version, as it uses some C++ and Boost binary handling features. Maybe using Pickle instead could work? However we have not tested this.
Hey @OliverLeeyiyang, I have the same problem and I just wanted to know if you were able to resolve this issue and if yes, how?
Hey @OliverLeeyiyang, I have the same problem and I just wanted to know if you were able to resolve this issue and if yes, how?
Hi @kennethweitzel, if the problem that you face is the deserialization of the message in Python, unfortunately, I didn't find a solution to it.
However, if your question is about the use of the map information from the serialized topic in Python, you could try to find how the topic is serialized and try to publish( or load map) it on your own. Here is my solution: https://github.com/OliverLeeyiyang/Integration-Autoware_map_based_prediction/blob/main/src/tum_prediction/tum_prediction/map_loader.py.
Thanks a lot! Unfortunately I need the map to be loaded in the MGRS coordinate system, which this lanelet package alone is not capable of. That's why my approach was to subscribe to the HADMapBin topic, as it was loaded under Autoware in MGRS format and then published (which is possible with the autoware lanelet2 extension). Since then I'm looking for a way to load the map in MGRS in Python.
Thanks a lot! Unfortunately I need the map to be loaded in the MGRS coordinate system, which this lanelet package alone is not capable of. That's why my approach was to subscribe to the HADMapBin topic, as it was loaded under Autoware in MGRS format and then published (which is possible with the autoware lanelet2 extension). Since then I'm looking for a way to load the map in MGRS in Python.
You are welcome! To do so, you could try to see this #242 and create a MGRS projector in Python on your own. I didn't try this since I didn't have enough time when I did this project.
Another way to solve it could be using Boost-Python to create a MGRS LaneletMap generator based on autoware source code and run in Python. And you need to define operator>> in it to generate the LaneletMap from the message. But since some part of the MGRS projector in autoware had been edited (such as adding new lanelet tags), you may need to be careful of the map you want to load.
If you finally find a good solution, please also let me know :)
Hi,
I am now doing a project that rewrites part of map_based_prediction in Autoware, which uses lanelet2 to deal with the map data. The problem that I am facing is that one of the methods in map_based_prediction is like this:
which has some similar part with BinParser in lanelet2_io:
Especially these two lines:
I want to know if you have some ideas about how to do the same thing of these two lines in Python.
And I have tried to use the code in python examples like this:
It can work, but seems that lost the attributes of lanelet when I deal LaneletMap later.:( What's more, the data_list here is like a list that contains int numbers:
Thank you in advance!