Carla: How can i customize my own map ?

Created on 4 Jan 2018  路  9Comments  路  Source: carla-simulator/carla

I appreciate this project much锛宎nd in your design you鈥榲e consider such things as lidar 锛寁ehicle spawned and map edit锛宩ust everything i need, awesome.
But when I read docs about map customization in:
http://carla.readthedocs.io/en/latest/map_customization/
and
http://carla.readthedocs.io/en/latest/how_to_add_assets/#map-generation
I still confused about how exactly I should do to get my own map?
Other wise, I notice that the road contains only yellow lane_line, and roads are all two lanes, but in real world there're many white lines, and roads may contains three or more lanes, will you do something about it?
Looking forward for your answear and thank you for developing such an awesome project.

question

Most helpful comment

At the moment Carla only supports two lanes, 90掳 corners and a single set of line markings.

You can change those markings however by changing the meshes (or texture) in /Content/Static/RoadLines/.

(I assume you are using Carla from source)

To generate a new map, what I do in the editor is:

  • I duplicate an existing map
  • I remove everything I don't need from the map (If I remember correct, I keep the folder "Lighting", "AtmosphericFog", "PostProcessVol" and "CarlaMapGenerator").
  • In the CarlaMapGenerator, there is a field "seed". You can change the map by altering that seed and clicking "Trigger Road Map Generation". ("Save Road Map To Disk" might also be needed)
  • You can repeat this until you have a map you are satisfied with.
  • After that you can place new PlayerStarts at the places you want the cars to be spawned.
  • You'll notice that the AI already works, but the cars will prefer to go forward at crossings, and if that fails go left. Going right is the final thing to try.
  • To get a random behavior, you have to place IntersectionEntrances. (See the two example towns how it exactly works). Basically an entrance has a set of actors that will be the waypoints to guide the car through the intersection. For each intersection path, there is a different list of waypoints.
  • To change the speed of the car, use the SpeedLimiters. They are straightforward to use. (Make sure you limit the speed for the corners, otherwise the cars will try and fail to take them at full speed)
  • Then you can populate the world with landscape and buildings.

All 9 comments

By customization I mean use script like python or sth to generate new map.

At the moment Carla only supports two lanes, 90掳 corners and a single set of line markings.

You can change those markings however by changing the meshes (or texture) in /Content/Static/RoadLines/.

(I assume you are using Carla from source)

To generate a new map, what I do in the editor is:

  • I duplicate an existing map
  • I remove everything I don't need from the map (If I remember correct, I keep the folder "Lighting", "AtmosphericFog", "PostProcessVol" and "CarlaMapGenerator").
  • In the CarlaMapGenerator, there is a field "seed". You can change the map by altering that seed and clicking "Trigger Road Map Generation". ("Save Road Map To Disk" might also be needed)
  • You can repeat this until you have a map you are satisfied with.
  • After that you can place new PlayerStarts at the places you want the cars to be spawned.
  • You'll notice that the AI already works, but the cars will prefer to go forward at crossings, and if that fails go left. Going right is the final thing to try.
  • To get a random behavior, you have to place IntersectionEntrances. (See the two example towns how it exactly works). Basically an entrance has a set of actors that will be the waypoints to guide the car through the intersection. For each intersection path, there is a different list of waypoints.
  • To change the speed of the car, use the SpeedLimiters. They are straightforward to use. (Make sure you limit the speed for the corners, otherwise the cars will try and fail to take them at full speed)
  • Then you can populate the world with landscape and buildings.

@curantil Thank you !!! I'll spend some time looking into it.

@curantil I understand change the seed will make roads different. But how can we generate roads as we need(eg, we can get data which is a real map and need to generate a ue4 map the same as real world).
Is there something we can do with SplineMeshRepeater?

Hi @tanisxu and @curantil We're back from winter break.

Everything @curantil said is right. Thanks for covering us during vacation!

As for your unanswered questions, @tanisxu, there is not inmediate plan of doing a script to get map information and transforming it into a Carla level, though we might reconsider it in the future. We plan to upgrade the Map generator allowing more customization and more organic layouts (splines might be implied, more lane configurations, different intersections...) but is a complicated task and We'll be covering other issues before those. The closest thing to come related to your questions will be a set of tools to make easy to adapt any custom level or Unreal store map fully usable for Carla.

hello,@curantil
I don't know that how to place IntersectionEntrances to the level.
Hope to get your help.

You are most likely looking for RoutePlanners, as every other asset you can find it by searching for its name on the Mode Window "place" Mode.

Hi, I did every thing as mentioned by @curantil but When i play the level in unreal engine it automatically undo the changes and restores to the same level as earlier. Steps I did was:

  1. Duplicate the existing map
  2. Changes to the map (removing assets and keeping roads only)
  3. Save current
  4. Build and again save
  5. Play
    but cant see the new changes. Same as the old map.

That description was for an earlier version of Carla (0.8.x?). The 0.9.x version is quite different, so I think most of the explanation will not work unless you use the old version.

The documentation of the map making page for modifying an existing map in the 0.9.x version seems to be a dead link https://carla.readthedocs.io/en/latest/how_to_make_a_new_map/

A way to generate a complete new map is using a tool called RoadRunner, but sadly that tool is not free. (well you can get a time limited trial which you can use for two weeks if I'm not mistaken. But that gives you hardly time to do it properly.)

Was this page helpful?
0 / 5 - 0 ratings