add lanelet2_map_loader and lanelet2_visualization

Related Issues

This is a part of transition from Aisan vector map format to Lanelet2 format.
autoware#17 (closed)
This MR must be merged with lanelet2_extension library.
!26 (merged)

Implemented feature

This feature will add loader node and visualization node for Lanelet2 map loader.

Description

This feature adds following two nodes:

  • lanelet2_map_loader: publishes lanelet2 format map as lanelet2_msgs::MapBin.
  • lanelet2_visualization: subscribes lanelet_msgs::MapBin message and produces visualization_msgs for RVIZ.

Implementation considerations

vector_map_loader does both publishing map topic and visualization topic, but these functions are separated into different nodes in this MR. This makes easier to analyze if there is any bug in the code because functions are isolated. Drawback is that users would have to launch two nodes, but this can be solved by providing launch file.

Implementation description

Most of the core functions of the loader and visualization is done in lanelet2_extension library. This is because conversion between map data and ros message can be used in many different packages.

Test procedures

lanelet2_map_loader

  1. Download this file: autoware_mapping_example.osm
  2. run roscore
  3. run rosrun map_file lanelet2_map_loader /path/to/autoware_mapping_example.osm
  4. run rostopic echo /lanelet_map_bin
    You should see following output:
header: 
  seq: 0
  stamp: 
    secs: 1568033791
    nsecs: 935749229
  frame_id: "map"
format_version: "0.1"
map_version: "1.0"
data: [array of binary data]

lanelet2_map_visualization

  1. Launch lanelet2_map_loader with steps shown above.
  2. run rosrun map_file lanelet2_map_visualization
  3. publish tf for visualization rosrun tf static_transform_publisher -57280 -28200 0 0 0 0 /world /map 100
  4. run rviz

    Make sure that Fixed Frame is set to "world" and add lanelet2_map_viz (see attached image)
    5.You should see a visualization of lanelet2 map in rviz. Screenshot_from_2019-09-09_21-32-55
Edited by mitsudome-r

Merge request reports

Loading