HD map with JOSM & Lanelet2 - part 2
Summary
After successfully loaded a map file from pcl rosbag in JOSM, we’ll see how to draw a lane network, load it in Rviz with Lanelet2 and do global planning with mission planner.
End results:
Prerequisite
- ROS1 tested with melodic & noetic
- JOSM
- lanelet2_map_loader
- lanelet2_global_planner
1 - Install Lanelet2 plugin in JOSM
In lanelet2_map_loader->Lanelet2->lanelet2_maps->josm, there are 3 files: laneletpresets.xml
lanelets.mapcsss
lines.mapcss
Open JOSM
- Edit->Preferences->Map Settings -> Map Paint styles -> add (+) select
lanelets.mapcss
andlines.mapcss
- Edit->Preferences->Map Settings -> Tagging Presets -> add (+) select
laneletpresets.xml
2 - Draw lanes in JOSM
Open JOSM and load your previous png file generated from rosbag, here for demo purpose:
- File->New Layer
- Imagery-> New picture layer from file… ->lanelet2_map_loader->map_loader->data->map.png
Follow these two videos to draw lanes on your map image:
Example result:
Open JOSM
- File->New Layer
- Imagery-> New picture layer from file… ->lanelet2_map_loader->map_loader->data->map.png
- File->Open->lanelet2_map_loader->map_loader->data->hs_pcl.png
3 - Visualization in Rviz
After generating your own .osm file, in map_loader/launch/lanelet2_map_loader.launch, modify
Check pointcloud2 to see your pcd file.
4 - Global planning demo
- use
2D Nav Goal
to send goal - use
2D Pose Estimate
to modify start position
You can play with path_resolution
in mission_planning.launch to smooth out the global path.