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

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

Open
ptmtrietads opened this issue Apr 18, 2023 · 12 comments
Open
Labels
bug Something isn't working

Comments

@ptmtrietads
Copy link

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 guardstrikelab/carla_apollo_bridge#62 and guardstrikelab/carla_apollo_bridge#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
Copy link
Owner

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
Copy link
Author

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
Copy link
Owner

I will check then.

@Kim-mins
Copy link

Kim-mins commented Apr 24, 2023

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
Copy link
Owner

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

there are two questions

  • the carla localization do not match the map, at least that's how it looks now, I think I might need to find out why
  • the map is party disappear and a little strange, I didn't encounter these problems when converting before, so I have to check the reason in detail

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

@Kim-mins
Copy link

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

@adityadikshit07
Copy link

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
Copy link
Owner

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
Copy link

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

@Kim-mins
Copy link

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

@daohu527 daohu527 added the bug Something isn't working label Jul 14, 2023
@WilliaJing
Copy link

WilliaJing commented Jul 17, 2023

@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
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants