Skip to main content

autoware_lanelet2_to_clipgt

Converts an Autoware Lanelet2 .osm map into the parquet bundles that simulation and world-model tooling reads:

  • clipgt — the ClipGT HDMap layout consumed by alpasim, through trajdata.dataset_specific.mads.mads_utils.populate_vector_map.
  • cosmos_transfer2_5 — an NVIDIA cosmos-transfer2.5 world-scenario scene, in the AV2-style {clip_id}.<element>.parquet layout.

Lanelet2 comes from simple-lanelet2, a drop-in reimplementation published as a plain wheel — so this installs from an index with no ROS, no Boost and no C++ toolchain.

pip install autoware-lanelet2-to-clipgt

Converting a map

The CLI is hydra-driven. A map needs an origin, which is where local (x, y, z) = (0, 0, 0) lands: output coordinates are metres in that local Cartesian frame, right-handed and Z-up.

# the bundled odaiba origin (MGRS 54SUE + offset)
python -m autoware_lanelet2_to_clipgt \
    map=odaiba input_map_path=map.osm output_dir=out/

# a cosmos-transfer2.5 scene instead
python -m autoware_lanelet2_to_clipgt \
    target=cosmos_transfer2_5 map=odaiba input_map_path=map.osm output_dir=out/

# an origin given inline
python -m autoware_lanelet2_to_clipgt \
    input_map_path=map.osm output_dir=out/ \
    map.mgrs_grid=54SUE map.offset.x=92008.5 map.offset.y=45335.1

An origin is written one of three ways in a map config under conf/map/ (conf/map/example.yaml has all three):

mgrs_grid: 54SUE815501            # an MGRS code, on its own

mgrs_grid: 54SUE                  # a grid square plus metres within it
offset: { x: 81655.73, y: 50137.43, z: 42.49998 }

lat_lon: { latitude: 35.6895, longitude: 139.6917, altitude: 42.5 }

tileset_json=path/to/tileset.json aligns the output to the scene frame of a 3D Tiles tileset instead: points are projected to ECEF and transformed by the inverse of the tileset's root transform, then re-expressed as ENU at the origin. That is what lets the map share a frame with a trajectory embedded in the same USDZ.

Looking at the result

python -m autoware_lanelet2_to_clipgt.visualize out/                    # clipgt
python -m autoware_lanelet2_to_clipgt.cosmos_transfer2_5.visualize out/ # cosmos

Both draw a top-down preview from the parquet files. The clipgt one also accepts a .usdz, which it extracts to a temp directory first.

As a library

import lanelet2
from autoware_lanelet2_to_clipgt import convert, origin_from_map_config

stats = convert("map.osm", "out/", lanelet2.io.Origin(35.6895, 139.6917, 0.0))
print(stats)

origin_from_map_config takes the same three shapes as the YAML above, from an OmegaConf node or a plain dict.

Development

uv sync
uv run pytest                  # most of the suite needs a fixture map (see below)
uv run python tools/smoke_test.py

The tests want a Lanelet2 map at tests/data/odaiba.osm, which is not version-controlled; without it the cases that need one skip themselves. The smoke test needs no fixture — it builds a small map with Lanelet2's own API, converts it through the CLI and checks the bundles, which is also what the release workflow runs against a freshly installed wheel.

Releases are cut by labelling a pull request release:major, release:minor or release:patch; merging it bumps the version, tags it and publishes to PyPI. See .github/workflows/release.yml.

License

Apache License 2.0.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autoware_lanelet2_to_clipgt-0.1.0.tar.gz (24.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

autoware_lanelet2_to_clipgt-0.1.0-py3-none-any.whl (36.4 kB view details)

Uploaded Python 3

File details

Details for the file autoware_lanelet2_to_clipgt-0.1.0.tar.gz.

File metadata

File hashes

Hashes for autoware_lanelet2_to_clipgt-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8afdf436e175f7cf0b6b5fbb8ba1452393dd3dca012ed29146ebff8e18c77e49
MD5 41ba0e806388a0b843d8d407c76049b5
BLAKE2b-256 dbbe2328b9846be77654e8afaa34da48d89bc301dbfddbb52ba9f5370ed75086

See more details on using hashes here.

Provenance

The following attestation bundles were made for autoware_lanelet2_to_clipgt-0.1.0.tar.gz:

Publisher: release.yml on hakuturu583/autoware_lanelet2_to_clipgt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file autoware_lanelet2_to_clipgt-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for autoware_lanelet2_to_clipgt-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f0487eb6df75dd05e4d047ea0dda58d36cdf5125651f1e670ac514c67fdf3d57
MD5 e780a9cc638e20dae37da7cf7c897832
BLAKE2b-256 f63f27863339cd94dfa4926cf7879de2412bb83997f7935707fd1f1f7081e6af

See more details on using hashes here.

Provenance

The following attestation bundles were made for autoware_lanelet2_to_clipgt-0.1.0-py3-none-any.whl:

Publisher: release.yml on hakuturu583/autoware_lanelet2_to_clipgt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page