daohu527 / imap

High-resolution map (OpenDrive\Apollo) visualization and conversion tools
Apache License 2.0
217 stars 63 forks source link

Converted apollo maps from carla's xodr does not work as is with apollo #81

Open ptmtrietads opened 1 year ago

ptmtrietads commented 1 year ago

Hi, I'm trying to run some simulation on carla -- apollo via the https://github.com/guardstrikelab/carla_apollo_bridge. The default map (carla_town01) works well and I have no problem with it. However, when I attempt to run other maps (e.g. 02 --> 05), I found that the entire map does not show up in dreamview and I cannot provide routing to have the ego car travels around the map. Please help me figure out the cause for this.

Here are the steps that I followed based on suggestions from https://github.com/guardstrikelab/carla_apollo_bridge/issues/62 and https://github.com/guardstrikelab/carla_apollo_bridge/issues/31.

Download map from carla

Download via api, e.g.,

world = client.load_world('Town05')
# save map to .xodr format
world_map = world.get_map()
world_map.save_to_disk('town05/base_map')

Convert via imap instructions here https://github.com/daohu527/imap

The conversion process was successful and when I check via imap -m, the coordinates bounds are roughly the same.

Generate sim & routing map https://github.com/ApolloAuto/apollo/tree/master/modules/map/data

I followed steps here to generate the corresponding map, and put them in apollo/module/map/data and add the corresponding flag in global_flagfile.txt, which the map's name shows up correctly in Dreamview, but the lanes does not show up.

alt text In this photo here, you can see that the car is on the map. alt text Here, we notice that the map is town05, the car is visible and can detect obstacles, yet, the map is not visible, and I cannot set routes.

Maps from https://github.com/Flycars/apollo_map also run into the same problem

One thing I noticed is that for the pre-existing map of carla_town01, the coordinates are different vs. the version I download from carla and convert (especially the x axis).

I have been looking at the coordinates and tried to move it around with no success. Please help me figure out the cause for this.

daohu527 commented 1 year ago

we should check if only the town5 have problem or other map also have problems.

It looks very much like a coordinate problem, you can try displaying the map directly in dreamview, use sim_control.

ptmtrietads commented 1 year ago

Hi there, First, I have went through this process for maps: town01, town02, town04, town05 all have the same issue.

Following your suggestion, using sim_control, for the case of town01, the only map that can be loaded is the default case provided by guardstrikelab as seen here. alt text The map does not show up is probably due to the coordinates as the coordinates range of this map is as follows alt text

I cannot load the imap converted (either on my own or from your repo) as shown here despite the coordinates would make more sense. I didn't find any errors related to this in the dreamview log file such as "failed to load ..." (If I'm wrong, please let me know what to look for.) alt text The coordinates of this (via imap -m) is as follows alt text

The following post will have some more observations about the coordinates.

daohu527 commented 1 year ago

I will check then.

Kim-mins commented 1 year ago

Hi all, is there any update on this issue? I also stuck in the same situation when I tried with Town01. (please refer to the image below) @daohu527 Is there any recommended version of Apollo or Carla? I'm currently running on Apollo 7.0 and Carla 0.9.13. I also tried with opendrive map from Carla 0.9.14, but it also makes the same situation.

EDIT: There can be some discrepancy while converting .xodr file to .xml file I guess. At first, I tried and followed the instruction here, but there seem more differences between .xodr and .xml other than the extension. The answer here also mentions another way for the conversion. Actually, I failed the latter approach because I don't know how to use it(cannot find any binary..). Can you please clarify the conversion @daohu527?

image

daohu527 commented 1 year ago

I use sim_map tested and here is the map below. image

there are two questions

I tested all maps in https://github.com/Flycars/apollo_map and they are almost the same problem

Kim-mins commented 1 year ago

@daohu527 Thank you for the testing! I'll also try more on this issue and let you know if there's any finding.

adityadikshit07 commented 1 year ago

Hi, Continuing on the issue, when I am placing the maps from https://github.com/Flycars/apollo_map in /apollo/modules/map/data/, the routing or localization does not appear and the map is loaded as

image

Can you let me know, how to load the map with localization and topology ?

daohu527 commented 1 year ago

you should use sim_control to let car initialize position. and also I found that some maps can only be partially displayed, I need to analyze the reason.

WilliaJing commented 1 year ago

@Kim-mins @daohu527 Has the problem been resolved?Thank you for your reply

Kim-mins commented 1 year ago

@WilliaJing No.. I have cannot resolve this issue.

WilliaJing commented 1 year ago

@adityadikshit07 @ptmtrietads @daohu527 Hi,After using imap conversion, I found that opening the sim control can display the map, but during joint simulation, the map will not be displayed. Is it because the points on the Carla map exceed the range of the Apollo map? Is there any solution. thank you I want to know the reason why Apollo does not display lane markings? Is it because of the points passed to?

/apollo/localization/pose

image

daohu527 commented 1 year ago

I'll check to see if it's an error or something else

hjlltnh commented 1 month ago

Has the problem been resolved? I also encountered the same problem with the file generated by imap. Based on the comparison with the default map Town01.txt file, I found that the x value of Polygon is fixed, about 166021.443, which is different from the default map. The feedback based on GPT seems to be a problem with benchmark setting. How can this be resolved?

daohu527 commented 1 month ago

you means town01 have problem?