Skip to content

vector map converter

Related Issues & PRs

Related Issues

Related Merge Requests

Following merge requests should be merged before this one

New feature implementation

Implemented feature

Add vector_map_converter which converts other map formats to Aisan vector map format.
https://github.com/autowarefoundation/autoware/issues/1954

Documentation

See the documentation inside package

Implementation description

The code was implemented by refering to Lanelet2 document, AutowareMapsFormat Document, and Aisan Vector Map document(closed).
The converters are implemented by referring to the values in related fields/classes in different formats.

Three nodes are implemented in vector_map_converter:

  • autowaremap2vectormap: converts AutowareMapFormat(which was proposed in https://github.com/autowarefoundation/autoware/issues/1701) into vectormap format.
  • lanelet2autowaremap: converts lanelet2 format to AutowareMapFormat (not meant to be used)
  • lanelet2vectormap: converts lanelet2 format to vectormap format.
  • opendrive2autowaremap: converts opendrive format to AutowareMapFormat.

Installation

Since this package requires other PRs to work (see the top section), please use this repos file for installation if you need to review before other PRs are merged. Also, some of the Lanelet2 dependencies must be installed manually:

sudo apt-get install libboost-dev libeigen3-dev libgeographic-dev libpugixml-dev libpython-dev libboost-python-dev python-catkin-tools

Test Procedure

Converting from Lanelet2

  1. roscore
  2. mkdir converted_map
  3. rosrun vector_map_converter lanelet2vectormap _map_file:=~/colcon_ws/src/Lanelet2/lanelet2_maps/res/mapping_example.osm _origin_lat:=49.00345654351 _origin_lon:=8.42427590707 _save_dir:=~/converted_map/
  4. start run time manager
  5. select converted vector map files under Map tab as shown in the image

  6. Download this tf file and load from run time manager

  7. Start rviz and add vector_map topic. View it in world frame

  8. You should see following vector_map

Converting from AutowareMap

  1. Download autoware map sample from here.
  2. roscore
  3. mkdir converted_map
  4. rosrun vector_map_converter autowaremap2vectormap map_dir:=autowaremap_toyostashi/ _save_dir:=converted_map/ _create_whiteline:=true
  5. Load the vector_map in converted_map/ with the same step as steps 4-6 in Converting from Lanelet2 section.
    However, use this tf file instead.
  6. Set up rviz as step 7 in Converting from Lanelet2 section.
  7. You should see following vector_map. (zoom out)

Converting from OpenDrive

  1. Download a map sample form OpenDrive Downloads page.
  2. roscore
  3. mkdir autoware_map vector_map
  4. rosrun vector_map_converter opendrive2autowaremap _map_file:=Crossing8Course.xodr _country_codes_dir:=autoware/utilities/vector_map_converter/countries/ _save_dir:=autoware_map/
  5. rosrun vector_map_converter autowaremap2vectormap _map_dir:=autoware_map _save_dir:=vector_map/ _create_whiteline:=true
  6. Load the vector_map in vector_map/ with the same step as steps 4-6 in Converting from Lanelet2 section.
    However, use this tf file instead.
  7. Set up rviz as step 7 in Converting from Lanelet2 section.
  8. You should see following vector_map.


Edited by mitsudome-r

Merge request reports