Ask Your Question

How to build correct Lanelet2 map for Autoware.Auto ?

asked 2021-04-15 05:45:31 -0500

Aleksandr Savel'ev gravatar image

updated 2021-04-24 03:00:02 -0500

miura gravatar image

Hi, everyone ! I've got a question related to Lanelet2 map creation for Autoware.Auto. First of all i created lanelet2 map with Tier4 tool, but when i tried to put it in map loader, it ran into problems and didn't load one.

[ERROR] [lanelet2_map_provider_exe-12]: process has died [pid 29844, exit code -6, cmd '/home/prius/AutowareAuto/install/lanelet2_map_provider/lib/lanelet2_map_provider/lanelet2_map_provider_exe --ros-args -r __node:=lanelet2_map_provider_node -r __node:=lanelet2_map_provider_node -r __ns:=/had_maps --params-file /home/prius/AutowareAuto/install/autoware_auto_avp_demo/share/autoware_auto_avp_demo/param/lanelet2_map_provider.param.yaml'].

I've decide to test my map by replacing the original one in ms3 AVP demo. The way i did it -> I put my own pcd and osm links to map_publisher.param.yaml, map_publisher_vehicle.param.yaml and lanelet2_map_provider.param.yaml. After that i decide to inspect original autonomous_stuff osm map and my one created in tier4 web tool. As i see there are different generator type, version and format.

autonomoustuff_parkin_lot.osm ->

<?xml version='1.0' encoding='UTF-8'?>
<osm version='0.6' generator='JOSM'>
  <node id='1001' visible='true' version='1' lat='37.38143282929' lon='-121.90825956337'>
    <tag k='ele' v='-1.4483755826950073' />

my_own_map.osm (created with Tier4 web tool) ->

<?xml version="1.0" encoding="UTF-8"?>
  <MetaInfo format_version="1" map_version="2"/>
  <node id="22" lat="" lon="">
    <tag k="mgrs_code" v="99XXX0-2001"/>
    <tag k="local_x" v="-111.9826"/>
    <tag k="local_y" v="192.4938"/>
    <tag k="ele" v="-18.5134"/>

As i found out there is special JOSM editor for Open street maps and lanelet extension for it. I tried to create osm map with JOSM editor. And i'm faced with such issue, every node in original autonomous_stuff.osm map has tags (ele, x, y). When i draw nodes in JOSM these tags don't creating themselves. of course i can create these tags manually, but i don't know what values must be there. Also when i created lanelet map with tier4 web tool these tags was created by default. I thought that i can open my map from josm in and add these tags in some automatic way, but this tier4 web tool rejects this map for missing ele tags.

Also as i know there is third way to create lanelet2 map, it's MapToolbox, but i hope that first two approaches must be workable. But anyway i'll try to build one more map in this unity extension toolbox.

1) I've tried to import and export original autonomoustuff_parking_lot.osm in tier4 web tool, after that lanelet map becomes invalid to use in One more proof of incompatibility.

2) I've tried to create map in unity editor with autocore-ai map tool for lanelet2 maps. I used autoware_auto branch, and it has bag that not allowed to save map. I changed save function to master ... (more)

edit retag flag offensive close merge delete


@mitsudome-r Can you provide guidance here?

Josh Whitley gravatar image Josh Whitley  ( 2021-04-17 01:07:38 -0500 )edit

As i see there are another "users" of Autoware.Auto, that are faced with such issue.

Aleksandr Savel'ev gravatar image Aleksandr Savel'ev  ( 2021-04-21 09:33:11 -0500 )edit

3 Answers

Sort by » oldest newest most voted

answered 2021-04-26 03:16:22 -0500

Aleksandr Savel'ev gravatar image

updated 2021-04-26 04:27:54 -0500

Ok, i'll try to share all the tips that i received from @mitsudome-r (citation blocks), and another information that helped me to bring my own pcd and osm(lanelet2) map to Autoware.Auto and visualize it in Rviz. First of all i think it's important to give some clarification about my approach. I decided to use Autoware.Auto ms3_avp_demo as the basis for my demo package. And for the start the only primitives that i use are lanelet with centerline and parking zone area, no curbs, no traffic lights or anything else. First i made my own pcd map by standard ndt_mapping, after that filtered it and binarized with builtin pcl_tools. Second step was creating lanelet2 map with Autoware web tool . It's important to know, when you load your pcd and after that create Lanelet2 map it's necessarily to define correct "MGRS grid zone" and "MGRS 100,000-meter square" in the corresponding pop-up dialog window, otherwise nothing works. You can find it at any online services, for example i used this one , all you need is only find your map location on earth map and take value of MGRS zone from information string. For example MGRS: 46U DH , MGRS grid zone: 46U and MGRS 100,000-meter square: DH. Third step, export the created map ( ̶a̶n̶d̶ ̶b̶e̶ ̶h̶a̶p̶p̶y̶,̶ ̶b̶e̶c̶a̶u̶s̶e̶ ̶e̶v̶e̶r̶y̶t̶h̶i̶n̶g̶ ̶w̶o̶r̶k̶s̶)̶ and faced with some issues ). Actually i tried to load my pcd and osm map instead of default ms3_avp_demo maps, and run it. The way i did it:

put my osm and pcd maps files in

define path to my osm file in /home/user/AutowareAuto/src/tools/autoware_auto_avp_demo/param/lanelet2_map_provider.param.yaml

define path to my pcd map in /home/user/AutowareAuto/src/tools/autoware_auto_avp_demo/param/map_publisher.param.yaml

modify map_yaml_file path in src/tools/autoware_auto_avp_demo/param/map_publisher.param.yaml to the local file that you modified instead of path to the param file installed in /opt. (e.g. "/home/user/AutowareAuto/src/tools/autoware_auto_avp_demo/data/autonomoustuff_parking_lot_lgsvl.yaml"

define correct latitude longitude origins of my map for alignment that are also necessary for visualization in /home/user/AutowareAuto/src/tools/autoware_auto_avp_demo/data/autonomoustuff_parking_lot_lgsvl.yaml

After that i run ros2 launch autoware_auto_avp_demo and see no map. But there was errors in rviz like this "error: center_lane_line/5544 Contains invalid floating point values (nans or infs)" And here Mitsudome-r helped me again with inspecting my osm map.

I've looked into the map, and it looks like to error message comes from the fact that centerline generated internally is giving error due to invalid lanes. some of the lanes consist of left/right boundaries with a single point. For example, lanelet 4921 has right bound 4919 which only contains point 4543 as ...

edit flag offensive delete link more


Congratulations @Aleksandr Savel'ev. Thank you a lot, a lot, for a very detailed answer. I really appreciate it. I'll try those instructions.

Another quick question, with this successful visualization of pcd & osm, have you successfully planned a trajectory? Is it smooth as you expect? Can you share a screenshot of the generated trajectory? Thank you a lot.

congphase gravatar image congphase  ( 2021-04-26 03:33:30 -0500 )edit

Thank you @congphase, i glade to "hear" it. No, now i'm trying to run sensing and localization on real hardware. After that i will go back to working with the map and global planner.

Aleksandr Savel'ev gravatar image Aleksandr Savel'ev  ( 2021-04-26 03:53:50 -0500 )edit

Okay @Aleksandr Savel'ev, how did you get support from Mr. mitsudome-r? From private message? How do you get his contact? I'm wondering if I can ask him for support here or via some other channels.

congphase gravatar image congphase  ( 2021-04-26 04:12:13 -0500 )edit

@congphase, firstly i asked short question on Autoware slack channel, after that i was asked to do it on ros answers, and only in third step after several days i had a pm chat in slack. It is preferable to start looking for an answer on public resources.

Aleksandr Savel'ev gravatar image Aleksandr Savel'ev  ( 2021-04-26 05:10:09 -0500 )edit

do you have a link to the instructions on how you created the pcd map using ndt_mapping?

asobhy gravatar image asobhy  ( 2021-06-29 13:19:33 -0500 )edit

there is an ndt_mapping_nodes in AutowareAuto that I will test

asobhy gravatar image asobhy  ( 2021-06-29 15:29:46 -0500 )edit

@asobhy I use ndt mapper from Autoware.AI, i just run it from runtime manager.

Aleksandr Savel'ev gravatar image Aleksandr Savel'ev  ( 2021-06-30 09:30:44 -0500 )edit

Thanks for your reply. FYI, I used ndt_mapping_nodes yesterday and generated a pcd file successfully

asobhy gravatar image asobhy  ( 2021-06-30 13:27:53 -0500 )edit

answered 2021-04-22 03:05:19 -0500

vrichard gravatar image

As far as I know there is no perfect tool to create lanelet2 map for autoware. Recently I had to create a map for a long city road. I did the following:

  1. with JOSM, the lanelet2 plugins and the satellite view, I created all the linestrings. JOSM is great to manipulate lines (cut, split, create circular shapes, etc), however it is absolutely not designed to create complex relations like lanelets, traffic lights and so on.
  2. for this task I used TierIV's vector map tool

Unfortunately both tools are incompatible as is as they produce different output as you saw. So I wrote a small python script to go back and forth and "fix" the map so that both editor can work on the same map. It looks to something like this: (note that this script is a bit old so it may not be complete, it would not be difficult to add the few missing things). Whenever I make a modification to the map with one tool, I use the script right after so that the map stays compatible with TierIV's tool, JOSM and autoware.

Maybe the most important to keep in mind is that TierIV's ignores lat/lon if x/y already exists, yet JOSM ignores x/y and only uses lat/lon. So whenever you want to modify a map modified by TierIV's tool in JOSM, always remove x/y fields (select all then delete or add this to a post process script). The next time you will open the map with TierIV's tool, the tool will convert lat/lon into x/y/mgrs_code

As you can see the process is a bit tedious, but this is by far the best way I have found to create lanelet2 maps.

edit flag offensive delete link more


Yes it needs some modification. And resulting format that keep lat lon and x y info, and do not loose JOSM and Tier4 lanelet map builder capability at the same time looks like.

<?xml version='1.0' encoding='UTF-8'?>
<osm version='0.6' generator='JOSM'>
  <node id='22' action='modify' visible='true' version='1' lat='55.00839000086' lon='35.87068198463'>
    <tag k='ele' v='-18.5134' />
    <tag k='local_x' v='-111.9826' />
    <tag k='local_y' v='192.4938' />
    <tag k='mgrs_code' v='37UCB0-2001' />

I've got huge help from Mitsudome-san with correct map building rules, i hope he comes back here with more detailed answer soon.

Aleksandr Savel'ev gravatar image Aleksandr Savel'ev  ( 2021-04-22 05:59:18 -0500 )edit

Hello @Aleksandr Savel'ev , I'm facing the same issue (I'm one of the guys who you mentioned having the same issue, in above comment). Can you describe how he instructed on what are the rules for creating a runnable map? I'm in a rush at the moment ...

congphase gravatar image congphase  ( 2021-04-24 22:59:15 -0500 )edit

Hello @congphase, you are welcome to read my answer, i hope it helps you in map creation.

Aleksandr Savel'ev gravatar image Aleksandr Savel'ev  ( 2021-04-26 03:18:56 -0500 )edit


  1. I am also trying to do the similar.
  2. have created a lanelet2 map using the josm and lg simulator.
  3. I made changes in the autoware_auto_avp_demo for loading the lanelet2 map file and build it.
  4. That lanelet2 map is visible on rviz2 but when I set the initial pose and goal pose on the map, it set the initial position but not the goal position.
  5. I am not sure what I had missed in the creation of lanelet2 map.

Can anyone provide me help regarding the same? Also, I was trying to attach the screenshot and my map file for reference but getting an error.



rahul14k gravatar image rahul14k  ( 2021-05-10 18:15:07 -0500 )edit

That lanelet2 map is visible on rviz2 but when I set the initial pose and goal pose on the map, it set the initial position but not the goal position.

What does the terminal log say when the goal pose failed to be set? If it says something similar: [ERROR] [lanelet2_global_planner_node_exe-14]: process has died [pid 23500, exit code -11, cmd '/home/anhnv/AutowareAuto/install/lanelet2_global_planner_nodes/lib/lanelet2_global_planner_nodes/lanelet2_global_planner_node_exe --ros-args -r __node:=lanelet2_global_planner_node -r __node:=lanelet2_global_planner_node -r __ns:=/planning -r HAD_Map_Client:=/had_maps/HAD_Map_Service -r vehicle_kinematic_state:=/vehicle/vehicle_kinematic_state'], chances are your map lacks the parking rules (as Autoware.Auto currently supports only parking on sparking spots and connected lanes). If it is the case, check this guidance

Failed attaching screenshot.

Upload to an online drive and share the link here

congphase gravatar image congphase  ( 2021-05-10 23:19:17 -0500 )edit

Hi @congphase,

Thank you for the help, It worked for me. Also is there any demo in Autoware Auto that will work without parking as a goal pose. for example - If I want to drive my ego vehicle from the start point (initial position) to the endpoint (goal position) using autoware_auto.

rahul14k gravatar image rahul14k  ( 2021-05-13 03:20:11 -0500 )edit

Sorry for the late reply. As far as I know, unfortunately, no. A trajectory can only planned with start and goal post on lanes connected with parking spots. If you don't want to eliminate the dependence on parking slots, you have to modify lanelet2_global_planner node C++ code to your needs.

congphase gravatar image congphase  ( 2021-06-14 22:42:29 -0500 )edit


I'm having the issue of "Contains invalid floating point"

@mitsudome-r do you have any idea of what could be the issue?

I post here the link to the osm file: simple.osm

I changed the version and its the most simplest osm file in the world.

I'm starting it with this scripts:


Any ideas of why it could be giving issues ALWAYS in the center lines?


RDaneelOlivaw gravatar image RDaneelOlivaw  ( 2021-06-29 14:47:20 -0500 )edit

answered 2022-02-08 03:43:59 -0500

Sam123 gravatar image

updated 2022-02-09 01:52:59 -0500

Hi,@Aleksandr Savel'ev @congphase, I am also trying to do the similar. i am beginner to Lanelet2 map creation i have followed all basic steps to create lanlet2 map creation as follows 1] i have created a lanelet2 map using the josm and made changes in the autoware_auto_avp_demo for loading the lanelet2 map file and build it. 2] followed all posts from ROS still no output on Rviz and there is no error ,

im bit confusing what are the missing steps, can anyone have proper document for it.

thanks in Advance

edit flag offensive delete link more


Hi @Shoukat.M

What changes did you make to the autoware_auto_avp_demo? If possible, capture the screen and share it here.

congphase gravatar image congphase  ( 2022-02-08 21:09:07 -0500 )edit

Hi ,@congphase@mitsudome-r 1] i have added the both pcd file and osm file to avp_demo/data path directory 2]avp_demo/param/lanelet2_map_provider.param.yaml file and change map_osm_file parameter path to filename.osm file. 3]avp_demo/param/lanelet2_map_provider.param.yaml file and change map_osm_file parameter path to filename.osm file. 4]avp_demo/param/map_publisher_vehicle.param.yaml file and change map_pcd_file parameter path to filename.pcd

all required changes done here.failed to attach screens

Sam123 gravatar image Sam123  ( 2022-02-09 01:35:37 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2021-04-15 05:45:31 -0500

Seen: 1,707 times

Last updated: Feb 09