A point cloud can tell a robot where the pavement is. It cannot tell the robot that crossing this particular line is illegal, that this lane is one-way, or that this intersection has a four-way stop. That is the problem Lanelet2 solves.
Lanelet2 is the format at the center of the open autonomy stack. It describes roads not as drawings but as structured data: lanes with geometry, direction, and rules; regulatory elements that govern behavior; and topology that connects everything into a navigable graph. It is the language Autoware reads when it plans a route.
The five elements
A Lanelet2 map is built from five elements, split across two layers. The physical layer contains Points and Linestrings: observable geometry a sensor can detect. The relational layer contains Lanelets, Areas, and Regulatory Elements: associations and rules that give the geometry meaning. This section covers the first four. Regulatory elements are complex enough to deserve their own treatment below.
Points. The atomic unit. A point is an (X, Y, Z) coordinate, optionally with an ID. Points are the vertices of every geometric element in the map. A typical site map has thousands of points.
Linestrings. An ordered sequence of points. Linestrings define the geometry of lane boundaries, centerlines, stop lines, and curbs. They carry no meaning by themselves; they are pure geometry. The meaning comes from what references them.
Lanelets. The fundamental road element. A lanelet is defined by a left boundary and a right boundary, both linestrings. It has a direction of travel, a speed limit, and an optional list of regulatory elements that apply to it. A lanelet is the answer to “this is a lane, this is which way it goes, and these are the rules that govern it.”
Areas. A 2D region defined by a closed boundary. Areas represent things that are not lanes: parking lots, pedestrian zones, building footprints, grass. Areas carry semantics but do not participate in routing. The one polygon that does change driving behavior, Autoware’s detection area, is not an Area at all but a regulatory element paired with a stop line; Chapter 22 covers it.
At Harbor Yard, the loop road is a sequence of lanelets, each with a left and right boundary, a one-way direction, and a speed limit of 5 mph.
Regulatory elements
Geometry tells the robot where the road is. Regulatory elements tell the robot what it is allowed to do on it.
A regulatory element is a rule attached to one or more lanelets. Common types:
Traffic light. The robot must stop when the light is red. The regulatory element specifies which light applies to which lanelet and where the stop line is.
Stop sign. The robot must come to a complete stop at a defined position. The regulatory element references the stop line linestring.
Right of way. Defines which lanelet has priority at an intersection. Without right-of-way rules, two robots approaching the same intersection from different directions have no way to decide who goes first.
Speed limit. Overrides the default speed for a specific lanelet or group of lanelets. At Harbor Yard, the main loop is 5 mph, but the approach to the loading docks is 2 mph.
Access restriction. Marks a lanelet as restricted to certain vehicle types, times, or authorization levels. The gate at Harbor Yard is an access-restricted lanelet that only the shift supervisor can authorize.
Topology and connectivity
A lanelet in isolation is a lane. A set of lanelets with topological relationships is a road network.
Lanelet2 topology is expressed through relations between lanelets:
- Successor / predecessor. Which lanelet comes next along the direction of travel. At an intersection, a lanelet may have multiple successors representing different turning options.
- Left / right adjacency. Which lanelet is to the left or right, used for lane changes and lateral maneuvers.
- Conflicting. Which lanelets intersect in a way that requires right-of-way resolution.
A planner reads the successor relations to find a path from the robot’s current lanelet to its destination. It reads adjacency relations to decide when a lane change is possible. It reads conflicting relations to know when to yield.
At Harbor Yard, the one-way loop is a closed chain of lanelets, each one the successor of the one before it. The dock approach lanelets branch off the loop and terminate at the loading docks. A cargo tug starting at any point on the loop can navigate to any dock by following successor relations.
The Lanelet2 file
A Lanelet2 map is stored as an OSM XML file with the .osm extension. OSM is OpenStreetMap’s data format. Lanelet2 extends it with additional tags and conventions for autonomous driving.
Lanelet2 elements map onto OSM’s three data types. Points are OSM nodes with latitude and longitude. Linestrings are OSM ways: an ordered list of node references. Lanelets, Areas, and Regulatory Elements are OSM relations: they reference other elements to form higher-level structures.
The result is a file that can be opened in any OSM-compatible tool, validated against the Lanelet2 schema, and consumed directly by Autoware’s planning stack.
What comes next
Part VI moves from the primitives to the process: the full HD mapping workflow, from first scan to validated export, and the validation discipline that catches errors before the robot does.
Found an error or have a suggestion?
Report an erratum or send feedback →