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.

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.2.0.tar.gz (582.0 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.2.0-cp313-cp313-win_amd64.whl (757.2 kB view details)

Uploaded CPython 3.13Windows x86-64

spatialgeometry-1.2.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (781.0 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

spatialgeometry-1.2.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (776.3 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64

spatialgeometry-1.2.0-cp313-cp313-macosx_11_0_arm64.whl (750.7 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

spatialgeometry-1.2.0-cp312-cp312-win_amd64.whl (757.3 kB view details)

Uploaded CPython 3.12Windows x86-64

spatialgeometry-1.2.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (781.1 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

spatialgeometry-1.2.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (776.3 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

spatialgeometry-1.2.0-cp312-cp312-macosx_11_0_arm64.whl (750.8 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

spatialgeometry-1.2.0-cp311-cp311-win_amd64.whl (758.1 kB view details)

Uploaded CPython 3.11Windows x86-64

spatialgeometry-1.2.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (782.0 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

spatialgeometry-1.2.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (777.9 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

spatialgeometry-1.2.0-cp311-cp311-macosx_11_0_arm64.whl (752.0 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

spatialgeometry-1.2.0-cp310-cp310-win_amd64.whl (758.3 kB view details)

Uploaded CPython 3.10Windows x86-64

spatialgeometry-1.2.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (782.3 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

spatialgeometry-1.2.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (778.1 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

spatialgeometry-1.2.0-cp310-cp310-macosx_11_0_arm64.whl (752.3 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for spatialgeometry-1.2.0.tar.gz
Algorithm Hash digest
SHA256 5d5986637ed2a1130d2d1131049f3638ae6e10668c1e93471ddd3665e261f563
MD5 429d57f76e8e334912986b383b7dcbba
BLAKE2b-256 fde9547aa129acf1927cfe29e8d0db98639a88ea3c1d6a46c02376e8079415d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.2.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.2.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.2.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 84a4441fd3a2e38028cb418e6301a50c2453b26806a0bd05a347de0ea274b185
MD5 20c9ca6bc3c5ff4f31303f7efc6ef0f6
BLAKE2b-256 b0a5d0cfcca3bd64573dff8e8c044bcd3e825933d54f690ec9ecaa851c7e761a

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.2.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.2.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.2.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 00184c9cf34c9b89708a574e9ab448f5999f1f6d2875a3dfdb4e50767311a57e
MD5 6b95f042fc6823f7bb3846b941a5b8aa
BLAKE2b-256 deb01d947b4f306471fe6f450ed01859d3da01e3823eb896fd090f913baea6b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.2.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.2.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.2.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 89789c8aecf56c3f3783f5f3ff2de6cf331751a5012e940c583e01fa4943fb01
MD5 641f8a0d4217bf22b1eff10e1ae20368
BLAKE2b-256 85a8a6c25f1022118ffa167a02551ff7afe6ab415fa8b49d8e47dab9fcb9e617

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.2.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.2.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.2.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9f3cecf54b7628c7953c211166a16849737beee113d661d8b10cfd3439acf017
MD5 76c0f908a14b3cc29a75c5a4bcf9e027
BLAKE2b-256 b6db076a15fdfbcf52d393ca373870885b485f733f2976d18aa0a44df989243e

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.2.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.2.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.2.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 7abf017d37baac84e12d3cde36f7b3b476a4cab7db784c1c78d4ff397d992281
MD5 47ff4948d52f72d8a2bbee5b53140f0f
BLAKE2b-256 654f1f6ad4387f5260f245e6b369178764ce3eea9130940e3fd78d49cc97c0ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.2.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.2.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.2.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 69f5c001f195f584f3550b212f9223993bd3592d8bf12feb896b90167b0ee1dc
MD5 7ab6950e469e814a897c19e4ff55b02e
BLAKE2b-256 284b8908d72bc4ace575d5804f910b83aad81f1ce48f53b80fb63d42258d6886

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.2.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.2.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.2.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 841fc61da9234aafae8a8acc9003981d0b9fafe4245232e92f53fb0c2339e79a
MD5 88201ef09463ea541e92b8be0a0266d2
BLAKE2b-256 d2f17a51db001ba70c6a59ad524527beecd0b3975740eeab532782a5bf8160d0

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.2.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.2.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.2.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f04e1f3909667b5fa0342b9302faa500a62ae8bf38b6d2c548e8df49a16bcac5
MD5 e4feb6427c20986713a481d9c353c720
BLAKE2b-256 663c55bd92291cf3409ab71b86f3b4e402053b253d4dcd58bf62e18bc417e0d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.2.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.2.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.2.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 ba969a52c18e13ca13a665834c801bdac5ad6ec758ba554ffc94acae653d9bdf
MD5 a0ae212fbe340a3f8b496eb1818a50e8
BLAKE2b-256 4b420e43bc64a2719093921fdb47823963ff0a9c43cbc026d5f7faaf74e1f8a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.2.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.2.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.2.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 77d7fd11608a76bd19c79500a091f7d6aa86cada82cf6a62b05fdacf397161ab
MD5 17581bb08ef8a73f2d5d7c152533e0c5
BLAKE2b-256 916e6be91fa5c9337d676c6079cdced28e9d04536fb8e8f15be65bc137b0244e

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.2.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.2.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.2.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 c830aed578beccb845aae1c6c4559344920ec520e75972ddc88e8247fee10276
MD5 37831cd69e419bcfffd5ea4d85c2437f
BLAKE2b-256 52778588e593d251f0938c372e73fbfe10f2f5fd5abed110dffd2524042d8b42

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.2.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.2.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.2.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cb3622b96df8f8255199cb167c0319c72082fbcc7314da9ceeea0f5addb5a30f
MD5 3ac1d316f47e803beee19e192cb600e8
BLAKE2b-256 89c476013bd6e3db21c1f2a1fa146c0268b63102b9d81dd6375efc2825a5f3a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.2.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.2.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.2.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c358324906b671e186e1eff0c954e3d09e259929ee2256846f18fae346418da3
MD5 aae66c8fa54845ec61ec5f75b58f7d65
BLAKE2b-256 7228008793c39267abca3031afd8ee3c2c1be374304033475683a9b880905138

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.2.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.2.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.2.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 142fc1779a9183f3980996f24e6333101a072d9153607d368912047f94660e27
MD5 f7613dd78688978b03b116f3c1078637
BLAKE2b-256 e119b88ae936b567f257d832e29a6252a72bf941b82ccdb17e2f5a762a39bc57

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.2.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.2.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.2.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 c4ff90c678649a8fbc45829778d3db383c93c719ba31ea60539dc82f9bebee75
MD5 735306b45f8df1fd1af8aa2fdadd5365
BLAKE2b-256 33b3fe0a4b46a3aeb55abbdbdf5c1e8c8b45b6a311fee178885f085fd790c976

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.2.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.2.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.2.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4b2e201c8a28a2669160b017c9a404d5320fdd42563850793b83258babfe8a55
MD5 e05eff0b7e53733e19762b86691f134e
BLAKE2b-256 69cec59542f448a7a7d50fa6852231bcb716b074982cb7d34e85300f2ec91ebe

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.2.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

1.4.0

17 files

1.3.0

17 files

This release

1.2.0 This release

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