cartoblobpy
cartoblobpy is a small Python library for working with 2D occupancy grids, map images, and weighted graph representations for path planning. It can load maps from PNG images or YAML map descriptions, convert between world and grid coordinates, inspect occupancy values, plot maps, inflate obstacles, and build NetworkX graphs from free space.
Features
- Load maps from image files or YAML map descriptions.
- Work with start/goal markers embedded in map images.
- Convert between world coordinates and grid coordinates in ENU or NED frames.
- Query occupancy, free space, path validity, and distance to obstacles.
- Plot occupancy grids and named layers with Matplotlib.
- Build weighted graphs with NetworkX for path-planning workflows.
- Access bundled example maps and persisted results from
cartoblobpy.assets.
Installation
Install the package into your environment from the project root:
pip install -e .
If you prefer a regular install:
pip install .
The runtime dependencies are listed in requirements.txt.
Quick Start
Load a bundled example map, inspect it, and plot it:
from cartoblobpy.assets import get_map_path
from cartoblobpy.graph import Graph
graph = Graph()
graph.load_from_yaml(get_map_path("map012.yaml"))
print("grid shape:", graph.grid.shape)
print("resolution:", graph.resolution)
print("start:", graph.start)
print("goal:", graph.goal)
ax = graph.plot(show_start_goal=True, show_colorbar=True, cmap="gray_r")
If you already have a map image, load it directly:
from cartoblobpy.graph import Graph
graph = Graph()
graph.load_from_image("path/to/map.png")
Working With Maps
YAML map files are expected to define at least:
image: path to the map image, absolute or relative to the YAML file.resolution: meters per pixel.origin: map origin as[x, y, yaw].
Optional keys include:
start: start position in grid coordinates.goal: goal position in grid coordinates.layers: named layer images, optionally with value mappings.
Typical operations after loading a map include:
point = [2.5, 4.0]
graph.is_free(point)
graph.is_free_path([0.0, 0.0], [5.0, 5.0])
graph.value_at(point)
graph.distance_to_closest_obstacle(point)
graph.inflate_obstacles(radius=1.5)
graph.build_graph()
The graph object supports ENU and NED coordinate frames through the
coordinate_frame property.
Bundled Assets
The cartoblobpy.assets module provides helpers for example data and saved
results:
list_example_maps()lists the packaged YAML maps.get_map_path(name)returns the absolute path to a bundled map.save_result(result, filename)stores a pickle underassets/results.load_result(filename)loads a saved result.list_available_results()lists saved.pklfiles.
Running Tests
Run the unittest suite with Python on Windows (PowerShell):
py -m unittest discover -s tests -p "test_*.py" -v
If py is unavailable, use your environment's Python:
python -m unittest discover -s tests -p "test_*.py" -v
Documentation
Sphinx documentation lives under docs/. Build it from the project root if you
want the generated HTML docs.
License
cartoblobpy is distributed under the European Union Public Licence 1.2 (EUPL 1.2).
Metadata
Release files for cartoblobpy 0.0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cartoblobpy-0.0.10.tar.gz | 17.7 MB | With provenance | Details for cartoblobpy-0.0.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cartoblobpy-0.0.10-py3-none-any.whl | Python 3 | none | any | Details for cartoblobpy-0.0.10-py3-none-any.whl |
Total release size: 34.1 MB
Release files / cartoblobpy-0.0.10.tar.gz
| Download URL | cartoblobpy-0.0.10.tar.gz |
|---|---|
| Size | 17.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4537f3ca1b969d216df885d555637bfecacad0ab2df680c06da3719b7e686d66
|
|
BLAKE2b-256 checksum How to use checksums |
0fc0a044f52fa948fd7902a54ec77bd16030f5d6d5f74ba5c1c25c2f24af9596
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 11, 2026.
Transparency logRelease files / cartoblobpy-0.0.10-py3-none-any.whl
| Download URL | cartoblobpy-0.0.10-py3-none-any.whl |
|---|---|
| Size | 16.4 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
07814c439f36606d21d5246acc62897d19d471c33a39f81051ef37b0ef8879e9
|
|
BLAKE2b-256 checksum How to use checksums |
f83bc0f508322b687001e322a25c1c41e636154181cb82f71db1c92e93e592e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 11, 2026.
Transparency logSecurity for cartoblobpy 0.0.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for cartoblobpy-0.0.10.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 11, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.