Skip to content

Commit

Permalink
feat(map_component_design): update contents
Browse files Browse the repository at this point in the history
Signed-off-by: kminoda <[email protected]>
  • Loading branch information
kminoda committed Nov 6, 2023
1 parent 10f3ba7 commit 57afb94
Showing 1 changed file with 51 additions and 20 deletions.
71 changes: 51 additions & 20 deletions docs/design/autoware-architecture/map/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,31 +61,54 @@ The Map component consists of the following sub-components:

The point cloud map must be supplied as a file with the following requirements:

- The point cloud map must be projected on the same coordinate defined in `map_projection_loader` in order to be consistent with the lanelet2 map and other packages that converts between local and geodetic coordinates. For more information, please refer to [the readme of `map_projection_loader`](https://github.com/autowarefoundation/autoware.universe/tree/main/map/map_projection_loader/README.md).
- It must be in the [PCD (Point Cloud Data) file format](https://pointclouds.org/documentation/tutorials/pcd_file_format.html), but can be a single PCD file or divided into multiple PCD files.
- Each point in the map must contain X, Y, and Z coordinates.
- An intensity or RGB value for each point may be optionally included.
- It must cover the entire operational area of the vehicle. It is also recommended to include an additional buffer zone according to the detection range of sensors attached to the vehicle.
- Its resolution should be at least 0.2 m to yield reliable localization results.
- It can be in either local or global coordinates, but must be in global coordinates (georeferenced) to use GNSS data for localization.
#### Basic requirements

1. The point cloud map must be projected on the same coordinate defined in `map_projection_loader` in order to be consistent with the lanelet2 map and other packages that converts between local and geodetic coordinates. For more information, please refer to [the readme of `map_projection_loader`](https://github.com/autowarefoundation/autoware.universe/tree/main/map/map_projection_loader/README.md).
2. It must be in the [PCD (Point Cloud Data) file format](https://pointclouds.org/documentation/tutorials/pcd_file_format.html), but can be a single PCD file or divided into multiple PCD files.
3. Each point in the map must contain X, Y, and Z coordinates.
4. An intensity or RGB value for each point may be optionally included.
5. It must cover the entire operational area of the vehicle. It is also recommended to include an additional buffer zone according to the detection range of sensors attached to the vehicle.
6. Its resolution should be at least 0.2 m to yield reliable localization results.
7. It can be in either local or global coordinates, but must be in global coordinates (georeferenced) to use GNSS data for localization.

#### Additional requirements for divided map
Furthermore, when using divided map, the following requirements must be met so that the dynamic map loading features work properly:

8. It must be divided by straight lines parallel to the x-axis and y-axis. The system does not support division by diagonal lines or curved lines.
9. The division size along each axis should be equal.
10. The division size should be about 20m x 20m. Particularly, care should be taken as using too large division size (for example, more than 100m) may have adverse effects on dynamic map loading features.
11. All the split maps should not overlap with each other.
12. Metadata file should also be provided e.g. as `pointcloud_map_metadata.yaml`.

The metadata should look like this:

```yaml
x_resolution: 20.0
y_resolution: 20.0
A.pcd: [1200, 2500] # -> 1200 < x < 1220, 2500 < y < 2520
B.pcd: [1220, 2500] # -> 1220 < x < 1240, 2500 < y < 2520
C.pcd: [1200, 2520] # -> 1200 < x < 1220, 2520 < y < 2540
D.pcd: [1240, 2520] # -> 1240 < x < 1260, 2520 < y < 2540
```
where,
- x_resolution and y_resolution
- A.pcd, B.pcd, etc, are the names of PCD files.
- List such as [1200, 2500] are the values indicate that for this PCD file, x coordinates are between 1200 and 1220 (x_resolution + x_coordinate) and y coordinates are between 2500 and 2520 (y_resolution + y_coordinate).
You may use [pointcloud_divider](https://github.com/MapIV/pointcloud_divider) from MAP IV for dividing pointcloud map as well as generating the compatible metadata.yaml.
For more details on divided map format, please refer to [the readme of `map_loader` in Autoware Universe](https://github.com/autowarefoundation/autoware.universe/blob/main/map/map_loader/README.md).

!!! note

Three global coordinate systems are currently supported by Autoware, including [Military Grid Reference System (MGRS)](https://en.wikipedia.org/wiki/Military_Grid_Reference_System), [Universal Transverse Mercator (UTM)](https://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system), and [Japan Rectangular Coordinate System](https://ja.wikipedia.org/wiki/%E5%B9%B3%E9%9D%A2%E7%9B%B4%E8%A7%92%E5%BA%A7%E6%A8%99%E7%B3%BB).
However, MGRS is a preferred coordinate system for georeferenced maps.
In a map with MGRS coordinate system, the X and Y coordinates of each point represent the point's location within the 100,000-meter square, while the Z coordinate represents the point's elevation.

### Vector Map

The vector cloud map must be supplied as a file with the following requirements:

- It must be in [Lanelet2](https://github.com/fzi-forschungszentrum-informatik/Lanelet2) format, with [additional modifications required by Autoware](https://github.com/autowarefoundation/autoware_common/blob/main/tmp/lanelet2_extension/docs/lanelet2_format_extension.md).
- It must contain the shape and position information of lanes, traffic lights, stop lines, crosswalks, parking spaces, and parking lots.
- Except at the beginning or end of a road, each lanelet in the map must be correctly connected to its predecessor, successors, left neighbor, and right neighbor.
- Each lanelet in the map must contain traffic rule information including its speed limit, right of way, traffic direction, associated traffic lights, stop lines, and traffic signs.
- It must cover the entire operational area of the vehicle.
1. It must be in [Lanelet2](https://github.com/fzi-forschungszentrum-informatik/Lanelet2) format, with [additional modifications required by Autoware](https://github.com/autowarefoundation/autoware_common/blob/main/tmp/lanelet2_extension/docs/lanelet2_format_extension.md).
2. It must contain the shape and position information of lanes, traffic lights, stop lines, crosswalks, parking spaces, and parking lots.
3. The position information should be expressed in correct global coordinate in latitude / longitude unless you are using local coordinate. Please see the next section for projection information.
4. Except at the beginning or end of a road, each lanelet in the map must be correctly connected to its predecessor, successors, left neighbor, and right neighbor.
5. Each lanelet in the map must contain traffic rule information including its speed limit, right of way, traffic direction, associated traffic lights, stop lines, and traffic signs.
6. It must cover the entire operational area of the vehicle.

!!! warning

Expand All @@ -95,9 +118,17 @@ The vector cloud map must be supplied as a file with the following requirements:

The projection information must be supplied as a file with the following requirements:

- It must be in YAML format, provided into `map_projection_loader` in current Autoware Universe implementation.
- The file must contain the following information:
1. It must be in YAML format, provided into `map_projection_loader` in current Autoware Universe implementation.
2. The file must contain the following information:
- The name of the projection method used to convert between local and global coordinates
- The parameters of the projection method (depending on the projection method)

For further information, please refer to [the readme of `map_projection_loader` in Autoware Universe](https://github.com/autowarefoundation/autoware.universe/tree/main/map/map_projection_loader/README.md).

!!! note

Three global coordinate systems are currently supported by Autoware, including [Military Grid Reference System (MGRS)](https://en.wikipedia.org/wiki/Military_Grid_Reference_System), [Universal Transverse Mercator (UTM)](https://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system), and [Transverse Mercator](https://en.wikipedia.org/wiki/Transverse_Mercator_projection).
However, MGRS is a preferred coordinate system for georeferenced maps.
In a map with MGRS coordinate system, the X and Y coordinates of each point represent the point's location within the 100,000-meter square, while the Z coordinate represents the point's elevation.

Local coordinate can also be used, but you cannot use GNSS data in this case.

0 comments on commit 57afb94

Please sign in to comment.