Skip to main content

Spatial Geometry

A Python Robotics Package QUT Centre for Robotics Open Source

PyPI version Anaconda version PyPI - Python Version License: MIT

Build Status codecov

GitHub repository  |  Documentation

Spatial Geometry provides simple 3D shape primitives -- cuboids, cylinders, spheres, and triangle meshes -- for representing robot links, obstacles, and other geometry in a scene. Every shape carries a pose (position and orientation) and an optional colour, and can be tested for distance and collision against any other shape using Coal.

It's used by the Robotics Toolbox for Python to describe robot link geometry, and by Swift to render scenes in the browser.

Quick start

import spatialgeometry as gm
from spatialmath import SE3

cube = gm.Cuboid([1, 1, 1], pose=SE3(0, 0, 0))
sphere = gm.Sphere(0.5, pose=SE3(2, 0, 0), color="red")

d, p1, p2 = cube.closest_point(sphere, inf_dist=10)
cube.iscollided(sphere)

See the documentation for the full API reference and more examples, including how to display shapes with Swift.

Installation

pip (standard)

pip install spatialgeometry

JupyterLite / Pyodide

For browser runtimes (JupyterLite/Pyodide), use a pure-Python wheel build:

SPATIALGEOMETRY_BUILD_EXTENSION=0 python -m build --wheel

This disables native C-extension compilation and produces a wheel that uses the Python scene backend (spatialgeometry.scene).

Collision functionality depends on Coal and is not expected to work in JupyterLite.

For collision support:

pip install spatialgeometry[collision]

This installs Coal and trimesh. Coal publishes prebuilt wheels for macOS (including Apple Silicon/arm64) and Linux — no conda or manual build steps required there.

Windows note: Coal doesn't currently install via pip on Windows (one of its own dependencies, cmeel-assimp, has no Windows wheel in the version range Coal needs), so the collision extra skips it there and collision checking is unavailable via pip on Windows. Everything else in the package works normally.

Workaround: conda-forge publishes coal-python built for win-64 against its own assimp, sidestepping the missing wheel entirely:

conda install -c conda-forge coal-python
pip install spatialgeometry trimesh

conda / conda-forge

For development, the provided environment.yml installs the package in editable mode with all dev and collision extras:

conda env create -f environment.yml
conda activate spatialgeometry-dev

License

MIT — see LICENSE.

Download files

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

Source Distribution

spatialgeometry-1.3.0.tar.gz (788.1 kB view details)

Uploaded Source

Built Distributions

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

spatialgeometry-1.3.0-cp313-cp313-win_amd64.whl (758.9 kB view details)

Uploaded CPython 3.13Windows x86-64

spatialgeometry-1.3.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (782.6 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

spatialgeometry-1.3.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (778.0 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64

spatialgeometry-1.3.0-cp313-cp313-macosx_11_0_arm64.whl (752.4 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

spatialgeometry-1.3.0-cp312-cp312-win_amd64.whl (758.9 kB view details)

Uploaded CPython 3.12Windows x86-64

spatialgeometry-1.3.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (782.7 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

spatialgeometry-1.3.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (778.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

spatialgeometry-1.3.0-cp312-cp312-macosx_11_0_arm64.whl (752.4 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

spatialgeometry-1.3.0-cp311-cp311-win_amd64.whl (759.8 kB view details)

Uploaded CPython 3.11Windows x86-64

spatialgeometry-1.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (783.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

spatialgeometry-1.3.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (779.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

spatialgeometry-1.3.0-cp311-cp311-macosx_11_0_arm64.whl (753.7 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

spatialgeometry-1.3.0-cp310-cp310-win_amd64.whl (760.0 kB view details)

Uploaded CPython 3.10Windows x86-64

spatialgeometry-1.3.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (784.0 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

spatialgeometry-1.3.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (779.8 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

spatialgeometry-1.3.0-cp310-cp310-macosx_11_0_arm64.whl (753.9 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file spatialgeometry-1.3.0.tar.gz.

File metadata

  • Download URL: spatialgeometry-1.3.0.tar.gz
  • Upload date:
  • Size: 788.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for spatialgeometry-1.3.0.tar.gz
Algorithm Hash digest
SHA256 493627df64dd616f343008f13704200f47c1bac2f63d95b867dc9b76b7e29570
MD5 11e579fe9b85376de46cba1344d2c744
BLAKE2b-256 d1d143fc746df8bf5039d84371a92769ab3c0cc43ab7a1ea5012604b38caf1ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.3.0.tar.gz:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

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

File details

Details for the file spatialgeometry-1.3.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.3.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 997c65c23b9a8f818e5095932c9c49bd559672c2bbcf65c5d7637694a87ef237
MD5 9a690c0a993ec5f3768eca9b4b49041c
BLAKE2b-256 a03d2c35021c6b3a4817ba2e9e9b3b2febb1d66be5ece12aa03aa4de99dabee9

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.3.0-cp313-cp313-win_amd64.whl:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

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

File details

Details for the file spatialgeometry-1.3.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.3.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 0264648cb5665c942ecb5e441d9616c7a27ec318a7182be97fe92ece84820711
MD5 2ea376ffbb0b0b834c0ef9ef5439f7e4
BLAKE2b-256 1493e62738d65efef820de2ccc721548a88db70d483dcfa32911eada3b139786

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.3.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

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

File details

Details for the file spatialgeometry-1.3.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.3.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 48906d9a3b031b7118fc3e0e7f87026379123a07e2f6a0170d24fcf7e8a08d83
MD5 ee8abe144960f47874449bd31ea6836b
BLAKE2b-256 d2d5a9bc8dc992d6a65896617ee845e59c4a8516ffc91e4bbce6baa2ab9302f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.3.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

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

File details

Details for the file spatialgeometry-1.3.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.3.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1db11f9ebce152c8d0b427f923f051a6df96a90ed44d9432c17ccb15575bfc7d
MD5 52338e125d895a5e9335f529fd94691b
BLAKE2b-256 3d4df73dec8ee67855f511f7953ce5b240003cfa8de292b955859044297f191d

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.3.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

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

File details

Details for the file spatialgeometry-1.3.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.3.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c7bbb448dc3ac290f8d3d5f64ae14b59e38692e01c957feaba1fafe1a69f7d47
MD5 82ecf3e42fe618d44062795a7b30b4f4
BLAKE2b-256 509df26534243520411104d230d48c85feb0b933928a459eb5e349d3f53cdfbb

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.3.0-cp312-cp312-win_amd64.whl:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

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

File details

Details for the file spatialgeometry-1.3.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.3.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 241e5f68ccc1264fc8c3733c1dc667ce2f6332831682bd0e7135acdbfd6a6094
MD5 4fea079cd778833b3a7cead85399ccc7
BLAKE2b-256 0793e74c0f3c782c7190f80cda7b704559423ced5e80310aab81f22dc128937c

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.3.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

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

File details

Details for the file spatialgeometry-1.3.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.3.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 a0d5a56e7c551751bb86f50d772f88b663aa15dc5ea23c5437039b29bfdac33d
MD5 794de21af06d7892540721c99dbced1f
BLAKE2b-256 dd13f3be2a10ad289318c163821f3114d1888adf86a5570aca5c98e18dde5c05

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.3.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

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

File details

Details for the file spatialgeometry-1.3.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.3.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3d43ac72b0cd1493e64deb21b01361e6c0da389d95e248d4beeed40e27ad1ba2
MD5 4900967b24c9a3d7c17133942c95c537
BLAKE2b-256 1ad4eda01eeb788e463be5847a2ebcb39edf7f9b2295ac00fe9efd4b710e9fdd

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.3.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

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

File details

Details for the file spatialgeometry-1.3.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.3.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9e4a64d5b0ca3329816f82c7a126dac5304cff997b7f189173b7f6f76514b33d
MD5 d53a8bd872ec8dbd919b9d51f75d1b43
BLAKE2b-256 dac0c5467bf37bfcc158c9f7a72f218e93a1646d815a6e58add4a07333bc7a9b

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.3.0-cp311-cp311-win_amd64.whl:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

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

File details

Details for the file spatialgeometry-1.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 3ca16dac3904cd58c96cc4b6c0dabffa78044073ab79aba88552c84069a635e9
MD5 3c4f1d8b02dd6b81810551ae7f72a443
BLAKE2b-256 c0bfde603ce8a62cb94a4300c7240ca7279786981a093cf1f6612e4243bd4c0c

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

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

File details

Details for the file spatialgeometry-1.3.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.3.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 e0da2370ac1d584be904033dbe09f9dc64a9d20ddeb5fdd859c78fdbb6fa8b07
MD5 0492a99043bc8fab902ed86cb3f4afb2
BLAKE2b-256 db198bfe92b63a3521d315edb445ceb30853b0b1c71b2ed1fc56a4a5074d4928

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.3.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

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

File details

Details for the file spatialgeometry-1.3.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.3.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cbb75357c8413eda7eda0c05345e3d905347d10f6ef8a4d41412ccc81f8d322b
MD5 a6f8e0170ba2cdcc8c7ac57538fa24d0
BLAKE2b-256 a09272364e4cb1ca292eb8e451916ebce7cbfe73de2eb02faceb492dcc78cfc0

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.3.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

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

File details

Details for the file spatialgeometry-1.3.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.3.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 85eeefc533179abffabf9f0144c00066f33cc8e6f0f97422fec2ee576fc0e238
MD5 b7f903f286db58de1a27e311aa95704e
BLAKE2b-256 18fe20ed2fcf79c1cb0273089d463222d8191d89082259454f7d9d92ae498aab

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.3.0-cp310-cp310-win_amd64.whl:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

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

File details

Details for the file spatialgeometry-1.3.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.3.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 a92709e0ca7aab2c90de7d808e32eb2941abf39946403f2533793a7a5a21c9d3
MD5 fe0fbb8293cc41923597e2eafdf8ae54
BLAKE2b-256 1a678b18769d89779947ecdf905e97c7ff40bac8b16386b3d0ce26caca8dcf0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.3.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

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

File details

Details for the file spatialgeometry-1.3.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.3.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 0acd4afc1a199dda13f47d85af9bb3cba48d85bab4ba97a4b06dba25fa1523a0
MD5 4ee29d44c905e3c7c2325cb61f1bcb57
BLAKE2b-256 a3d1c9508e741cb4cbc0536aa17f0d052ec18207c1b3cae5a75fc462624fb7c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.3.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

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

File details

Details for the file spatialgeometry-1.3.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.3.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ef4171036e50a8440f68dcc933e285ad01613384be8d2a721283395472dd2615
MD5 48a109fba33ad77a4c9a31bae486ffd1
BLAKE2b-256 155ba93b8b16462b695f4d8950bd6aef8abfda7f25f141e82fecfe295dcbd3b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.3.0-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

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

1.3.0 This release

17 files

1.2.0

17 files

1.1.0

30 files

1.0.3

30 files

1.0.1

14 files

1.0.0

14 files

0.2.0

2 files

0.1.2

2 files

0.1.0

1 file

Supported by

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