Skip to main content

Python binding of the OctoMap library.

Project description

octomap-python

PyPI Python Build License

Python binding of OctoMap, the 3D occupancy mapping library.

OctoMap builds a probabilistic 3D occupancy map (an octree) from point clouds: you stream in sensor measurements and query whether any point in space is occupied, free, or still unknown. This package exposes that C++ library to Python with NumPy arrays as the interchange format, so point clouds and queries are plain np.ndarrays.

Install

pip install octomap-python

Or with uv:

uv add octomap-python

Binary wheels are published for Linux (x86_64, aarch64) and macOS (Apple Silicon), CPython 3.9-3.13. Windows and other platforms build from the sdist and need a C++ compiler.

Quick start

import numpy as np
import octomap

# Resolution is the smallest voxel edge length, in meters.
octree = octomap.OcTree(0.1)

# Insert a point cloud measured from a sensor at `origin`.
points = np.random.uniform(-1, 1, size=(1000, 3))
octree.insertPointCloud(
    pointcloud=points,
    origin=np.array([0.0, 0.0, 0.0]),
)

# Query a coordinate: occupied / free / unknown (never observed).
node = octree.search(points[0])
try:
    print("occupied" if octree.isNodeOccupied(node) else "free")
except octomap.NullPointerException:
    print("unknown")

# Bounding box of everything mapped so far.
print(octree.getMetricMin(), octree.getMetricMax())

# Persist to / restore from the OctoMap binary format.
octree.writeBinary("tree.bt")
restored = octomap.OcTree(0.1)
restored.readBinary("tree.bt")

Examples

Runnable demos live in examples/; the teaser above is insertPointCloud.py:

git clone --recursive https://github.com/wkentaro/octomap-python.git
cd octomap-python
uv sync --group examples

cd examples
uv run python insertPointCloud.py

Release

Releases are published to PyPI by the publish workflow, which fires when a GitHub Release is published. It builds the wheel matrix + sdist and uploads via PyPI Trusted Publishing (OIDC, no stored token).

To cut a release:

  1. Bump version in pyproject.toml to match the new tag and commit it.
  2. Create a GitHub Release with tag vX.Y.Z (e.g. v1.8.0.13).
  3. The publish workflow runs and uploads the built distributions to PyPI.

Acknowledgement

This is a fork of neka-nat/python-octomap.

License

BSD-3-Clause (LICENSE)

Project details


Download files

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

Source Distribution

octomap_python-1.8.0.13.tar.gz (365.6 kB view details)

Uploaded Source

Built Distributions

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

octomap_python-1.8.0.13-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (333.5 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

octomap_python-1.8.0.13-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (299.1 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ ARM64manylinux: glibc 2.28+ ARM64

octomap_python-1.8.0.13-cp313-cp313-macosx_11_0_arm64.whl (208.0 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

octomap_python-1.8.0.13-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (334.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

octomap_python-1.8.0.13-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (298.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ ARM64manylinux: glibc 2.28+ ARM64

octomap_python-1.8.0.13-cp312-cp312-macosx_11_0_arm64.whl (209.0 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

octomap_python-1.8.0.13-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (341.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

octomap_python-1.8.0.13-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (307.1 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ ARM64manylinux: glibc 2.28+ ARM64

octomap_python-1.8.0.13-cp311-cp311-macosx_11_0_arm64.whl (211.1 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

octomap_python-1.8.0.13-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (341.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

octomap_python-1.8.0.13-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (307.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.24+ ARM64manylinux: glibc 2.28+ ARM64

octomap_python-1.8.0.13-cp310-cp310-macosx_11_0_arm64.whl (211.5 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

octomap_python-1.8.0.13-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (342.0 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

octomap_python-1.8.0.13-cp39-cp39-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (308.1 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.24+ ARM64manylinux: glibc 2.28+ ARM64

octomap_python-1.8.0.13-cp39-cp39-macosx_11_0_arm64.whl (211.8 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file octomap_python-1.8.0.13.tar.gz.

File metadata

  • Download URL: octomap_python-1.8.0.13.tar.gz
  • Upload date:
  • Size: 365.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for octomap_python-1.8.0.13.tar.gz
Algorithm Hash digest
SHA256 c3b2fb9baabbff86b70567f9ef105d0de04b99821b4c4c6324cd3d8d3b5b7909
MD5 1da30e129b9f70a119ca1b611a80c0dc
BLAKE2b-256 d38d468efb286506d368996e0625fc7d1e858f8469f5addb5ea91154977074c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for octomap_python-1.8.0.13.tar.gz:

Publisher: publish.yml on wkentaro/octomap-python

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

File details

Details for the file octomap_python-1.8.0.13-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for octomap_python-1.8.0.13-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 76f78e2590235782dead143a2ba00e75bceaf91b6f68b071c211a0b395280f17
MD5 74429360e1f27caadced02382034de40
BLAKE2b-256 32e8805a29d285c64c4adfded1e34dbb6665b441a7a0f2165f6509a676e7bb2b

See more details on using hashes here.

Provenance

The following attestation bundles were made for octomap_python-1.8.0.13-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on wkentaro/octomap-python

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

File details

Details for the file octomap_python-1.8.0.13-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for octomap_python-1.8.0.13-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 cad82c63149666a385f778f25db01add8d41123003038af7664630ccf8fed98b
MD5 b7bc158d98a0e89c01bea7c51bc1f03d
BLAKE2b-256 1e4497f918575bc3b1cdcb2690c0620b920f280115cce4fc663003506547a378

See more details on using hashes here.

Provenance

The following attestation bundles were made for octomap_python-1.8.0.13-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl:

Publisher: publish.yml on wkentaro/octomap-python

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

File details

Details for the file octomap_python-1.8.0.13-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for octomap_python-1.8.0.13-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 525de69d52a17dc44e4f07be67150d78ec2bf2bc9a7f7e98b355c1bb584add29
MD5 b0b20fe93237e2605c53ab3735380843
BLAKE2b-256 400b8c07ad989b0c025f973492eda2c3fa2269f5bde3e8218a9d4b9b6097a395

See more details on using hashes here.

Provenance

The following attestation bundles were made for octomap_python-1.8.0.13-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: publish.yml on wkentaro/octomap-python

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

File details

Details for the file octomap_python-1.8.0.13-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for octomap_python-1.8.0.13-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4d8c689287e48cb33775bfc65aac22878212358a84a3811097ac76ef08ac4955
MD5 57124b3aaccaf34142760c416a2fd718
BLAKE2b-256 9233d8038389c0e6d267b886fa15fff034b50a3397d5e0726c79c07d7822b6e5

See more details on using hashes here.

Provenance

The following attestation bundles were made for octomap_python-1.8.0.13-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on wkentaro/octomap-python

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

File details

Details for the file octomap_python-1.8.0.13-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for octomap_python-1.8.0.13-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 497aebcfb14cc3caf359716652646a97bb9cb3ac7542a54ba8cd9b9486429aaa
MD5 c47b58ee67ebd32080a8ab05cdbd2523
BLAKE2b-256 8bb709a69490294a7c0c8f8a368e58e01a9d598d9aed300c5b76b2fcc94141cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for octomap_python-1.8.0.13-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl:

Publisher: publish.yml on wkentaro/octomap-python

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

File details

Details for the file octomap_python-1.8.0.13-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for octomap_python-1.8.0.13-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 de1fea96eb378cd73f9f0afd98658717c3486d9db67892b6128ce00b16b98538
MD5 5e1efb407be927fbf678a0c814cf6551
BLAKE2b-256 7b6543f67f7cf678f7e302c4c09b0caf5d27e1fb4a178a867fcf2320c293c531

See more details on using hashes here.

Provenance

The following attestation bundles were made for octomap_python-1.8.0.13-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: publish.yml on wkentaro/octomap-python

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

File details

Details for the file octomap_python-1.8.0.13-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for octomap_python-1.8.0.13-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 19cd9aed014eee76437a341174c1b8d5f275402c1a76914a4330f50eaf37d193
MD5 d69bb0a901b22636f77ef45c59c396eb
BLAKE2b-256 5babd93d760c5f41b9de68a8bd9d92366870b4ed33451251e1de009c1ceabade

See more details on using hashes here.

Provenance

The following attestation bundles were made for octomap_python-1.8.0.13-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on wkentaro/octomap-python

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

File details

Details for the file octomap_python-1.8.0.13-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for octomap_python-1.8.0.13-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 55e55b5d9d6298c19e4bf76f689a4ebf84fc5e1cd7973a896e31258165af850f
MD5 166392f6781e6252c66eed8bbfd4d693
BLAKE2b-256 9785a46bce3970da5d4f155628598a3675feda577c7324e80c33163c3c6e6096

See more details on using hashes here.

Provenance

The following attestation bundles were made for octomap_python-1.8.0.13-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl:

Publisher: publish.yml on wkentaro/octomap-python

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

File details

Details for the file octomap_python-1.8.0.13-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for octomap_python-1.8.0.13-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a200777548970e2f3c53815ba3aa8af749dee84a3a1d1d2d2e2e125a10df7919
MD5 116e8bc4be538f02b88a5dc8171a2608
BLAKE2b-256 cb3ec5bd947573e6105956ad8a9871923d5d42335915579ba175cfd5938e5a38

See more details on using hashes here.

Provenance

The following attestation bundles were made for octomap_python-1.8.0.13-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: publish.yml on wkentaro/octomap-python

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

File details

Details for the file octomap_python-1.8.0.13-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for octomap_python-1.8.0.13-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 74e7169d1a6a48912ec3c05d0d55e2aeef659114c24f4af50cede7b54a5ae74f
MD5 e43e08e7e88278820038956d52739277
BLAKE2b-256 2b279c934c2f0128ac615135ded102d5a591188774dcc87ddd20bc92d00c1ef1

See more details on using hashes here.

Provenance

The following attestation bundles were made for octomap_python-1.8.0.13-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on wkentaro/octomap-python

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

File details

Details for the file octomap_python-1.8.0.13-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for octomap_python-1.8.0.13-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 6a607909c2c57a96c72c484f141631f173960d30ed3224510db8aafad211fb7a
MD5 dd1c6c934d32c3d11fd1fa1b74faaa3a
BLAKE2b-256 8cc4e69ade79241249e5d288d5b7ff161ecfb4f2fb42ac0387dac0f1f6f78bc6

See more details on using hashes here.

Provenance

The following attestation bundles were made for octomap_python-1.8.0.13-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl:

Publisher: publish.yml on wkentaro/octomap-python

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

File details

Details for the file octomap_python-1.8.0.13-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for octomap_python-1.8.0.13-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f2595c0a695e2c001ac1172116322e33cb77a768bd2739fe172201e4031b72d3
MD5 365d6b292a303a7581a840be7e93b5b3
BLAKE2b-256 9614da667254d1f986d8d7a1f775e7a0b0f7b3c81dafcd004c40bea9006af0ed

See more details on using hashes here.

Provenance

The following attestation bundles were made for octomap_python-1.8.0.13-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: publish.yml on wkentaro/octomap-python

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

File details

Details for the file octomap_python-1.8.0.13-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for octomap_python-1.8.0.13-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5c1233156ae16b0455add026b310e3f421c0aaf68b4359d22a34d00c2539ac63
MD5 9642774b50c20baa3c452de2c434b3b3
BLAKE2b-256 e1f59e51a2768d5d2ce026a14b36b0bb96ecbc4642207241d7e11beebfa77c52

See more details on using hashes here.

Provenance

The following attestation bundles were made for octomap_python-1.8.0.13-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on wkentaro/octomap-python

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

File details

Details for the file octomap_python-1.8.0.13-cp39-cp39-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for octomap_python-1.8.0.13-cp39-cp39-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2f3cbf777340a406f6f2645f980b04ad7223ed4d6fd97e8b7963f3eac8e8cd4a
MD5 6e7b0c17af727dcaa8b7ab37ba389474
BLAKE2b-256 22601e10215387bc1dd99e1bca6894f771db663c74d4afd3c82be11c17dae29a

See more details on using hashes here.

Provenance

The following attestation bundles were made for octomap_python-1.8.0.13-cp39-cp39-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl:

Publisher: publish.yml on wkentaro/octomap-python

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

File details

Details for the file octomap_python-1.8.0.13-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for octomap_python-1.8.0.13-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e900a1a1bf28bd494a2f75ebaaab3c92f42261d782f9e43c5362812375ead7f7
MD5 033d87066dedf5e62884dc5e9af66244
BLAKE2b-256 d2dcbcce7c78bdd6cbc0b4d51b487db442b08e7af7ae02aa5b81707771696686

See more details on using hashes here.

Provenance

The following attestation bundles were made for octomap_python-1.8.0.13-cp39-cp39-macosx_11_0_arm64.whl:

Publisher: publish.yml on wkentaro/octomap-python

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page