Skip to main content

A Python package for decomposing obstacle free spaces into convex polygons

Project description

Logo pydecomp — A Python implementation of DecompUtil for fast convex decomposition of obstacle-free spaces.

PyPI version PyPI - Python Version PyPI - License PyPI - Downloads

Quickstart

Install dependencies the following:

  • Linux:

        sudo apt-get install libcdd-dev libblas3 libblas-dev liblapack3 liblapack-dev gfortran
    
  • Mac:

        brew install cddlib gmp eigen openblas cython boost
    

    Note: Remember to set LDFLAGS and CPPFLAGS to the correct paths for the libraries.

In a virtual environment, install from PyPI with

    pip install pydecomp

Conda

pycddlib does not ship Linux/macOS wheels, so pip builds it from source and needs the cddlib C headers. In a conda environment the easiest path is to let conda-forge supply cddlib and point pip at the env's include/lib paths:

conda create -n pydecomp_env python=3.12 -y
conda activate pydecomp_env
conda install -c conda-forge cddlib tk -y           # tk gives matplotlib a working GUI backend

export CPPFLAGS="-I$CONDA_PREFIX/include"
export LDFLAGS="-L$CONDA_PREFIX/lib"

pip install pydecomp
python -c "import pydecomp; print(pydecomp.__version__)"

If plt.show() produces no window, matplotlib has no interactive backend — conda install -c conda-forge tk (above) fixes it; alternatively pip install pyqt5.

Examples

Forest - 2D Office - 2D Office - 3D

Given an occupancy grid map and a pieciwise linear path, the package returns a convex decomposition of the free space. The free space is represented by a collection of convex sets, whose halspace representation fulfills Ax-b<0. The package returns the matrixes A and b for each convex set. The matrix A is a n x 3 matrix and b is a n x 1 vector, where n is the number of planes in the halfspace.

To check a script to perform a convex decomposition out of a given occupancy grid map, see this file for a planar (2D) case or this file for a spatial (3D) case. We provide two exemplary maps (forest and office), which you can select by modifying this line.

For the most minimal example see this file, which replicates a test case in the original DecompUtil repository.

https://github.com/jonarriza96/pydecomp/blob/1d1c6f97d6eff1f2b3b90bdb2f038eed0caa8578/examples/ellipsoid_decomp_2D.py#L5-L19

Installing from source

After installing the dependencies given above, initialize git submodules with

    git submodule init
    git submodule update

Install the package with

    pip install .

Citing

If you use this framework please cite our papers:

@misc{arrizabalaga2024differentiablecollisionfreeparametriccorridors,
      title={Differentiable Collision-Free Parametric Corridors}, 
      author={Jon Arrizabalaga and Zachary Manchester and Markus Ryll},
      year={2024},
      eprint={2407.12283},
      archivePrefix={arXiv},
      primaryClass={cs.RO},
      url={https://arxiv.org/abs/2407.12283}, 
}
@inproceedings{arrizabalaga2023sctomp,
  title={SCTOMP: Spatially Constrained Time-Optimal Motion Planning},
  author={Arrizabalaga, Jon and Ryll, Markus},
  booktitle={2023 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)},
  pages={4827--4834},
  year={2023},
  organization={IEEE}
}

Related repositories

For computing continuous and differentiable collision-free corridors, check out CorrGen!

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

pydecomp-2.0.0.tar.gz (846.0 kB view details)

Uploaded Source

Built Distributions

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

pydecomp-2.0.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (4.8 MB view details)

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

pydecomp-2.0.0-cp313-cp313-macosx_11_0_arm64.whl (450.5 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

pydecomp-2.0.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (4.8 MB view details)

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

pydecomp-2.0.0-cp312-cp312-macosx_11_0_arm64.whl (450.4 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

pydecomp-2.0.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (4.7 MB view details)

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

pydecomp-2.0.0-cp311-cp311-macosx_11_0_arm64.whl (448.1 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

pydecomp-2.0.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (4.7 MB view details)

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

pydecomp-2.0.0-cp310-cp310-macosx_11_0_arm64.whl (447.0 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

pydecomp-2.0.0-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (4.7 MB view details)

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

pydecomp-2.0.0-cp39-cp39-macosx_11_0_arm64.whl (447.0 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file pydecomp-2.0.0.tar.gz.

File metadata

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

File hashes

Hashes for pydecomp-2.0.0.tar.gz
Algorithm Hash digest
SHA256 24abbb9311178740f3fc64c42889f6ae1abf87716b2562149f8f881f86a9c169
MD5 3530441e162a8ebdfb9dc65a9dc63229
BLAKE2b-256 21490c64fc9762f54310f6e62c908f91a14f69deac32e493154f67bae9b7dc15

See more details on using hashes here.

Provenance

The following attestation bundles were made for pydecomp-2.0.0.tar.gz:

Publisher: release.yml on jonarriza96/pydecomp

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

File details

Details for the file pydecomp-2.0.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pydecomp-2.0.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d5d73236834a734ffca9bc237a94399a1bfe66bcbf87c64cf34ba08218abc893
MD5 837424f5844b99797f76712e44835331
BLAKE2b-256 4f93f21beab1200b48a40f30dd4974ee56f848e52fbf6f8588febb102a17f145

See more details on using hashes here.

Provenance

The following attestation bundles were made for pydecomp-2.0.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on jonarriza96/pydecomp

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

File details

Details for the file pydecomp-2.0.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pydecomp-2.0.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e19d265ec464c002306bd4ed86a162a043aab6506e36001b96270a48220b8e34
MD5 95802d956ac1ad3b00156701ee013ba7
BLAKE2b-256 d610529b73edaf354736a7e9d6d5580f9615ff6000f8e675f37c6825b5132f14

See more details on using hashes here.

Provenance

The following attestation bundles were made for pydecomp-2.0.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: release.yml on jonarriza96/pydecomp

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

File details

Details for the file pydecomp-2.0.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pydecomp-2.0.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ac40f3efd68d1d4f9bcc6843a61f29d5c38bf2d666b330d90e26b0a5c2f81be1
MD5 43ac19faa9df03169d3ed1939b816951
BLAKE2b-256 aca29ae01cbf1ac6e61050e45dc9bbebcf5ccd679976280884729266ceb87ecd

See more details on using hashes here.

Provenance

The following attestation bundles were made for pydecomp-2.0.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on jonarriza96/pydecomp

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

File details

Details for the file pydecomp-2.0.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pydecomp-2.0.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 93c10796f0bd98b40c999c4f76f3d2d11cf6dbef8e35fc3639813462ec0c3a9f
MD5 33033395d433f8d029ce2782d15aae3f
BLAKE2b-256 3e9d3269a35d7b0a54c9727528e1a62e941cc24c76032dca9ff349314f972ffe

See more details on using hashes here.

Provenance

The following attestation bundles were made for pydecomp-2.0.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: release.yml on jonarriza96/pydecomp

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

File details

Details for the file pydecomp-2.0.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pydecomp-2.0.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f216e34e474f1160107f851b9c0e27a73082e1bec7336fcc5355ddce6e00042a
MD5 b07cb649c9812b5fd63a315444312d52
BLAKE2b-256 962b8b4d09c8da041145ca116bad2d7d1ee8cb99db4702e528251f5543acc303

See more details on using hashes here.

Provenance

The following attestation bundles were made for pydecomp-2.0.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on jonarriza96/pydecomp

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

File details

Details for the file pydecomp-2.0.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pydecomp-2.0.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2ff49dd9d1a84a3f360a42d3155c3733c97c441835b025fc4ad316b0dd7e2f2f
MD5 5dd76b6cab4112fd79214b9d6a83e1f1
BLAKE2b-256 cb75c8ff0532f78d2271365d876c8729c39de561bf45ab0ebf59e1d990091f9a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pydecomp-2.0.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: release.yml on jonarriza96/pydecomp

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

File details

Details for the file pydecomp-2.0.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pydecomp-2.0.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 639a31ba24a7715a365d637be3deef3b35ee9dbf5c353f74a7783bc02a991d69
MD5 bacd828ae35dc2ac79f0587961914a6a
BLAKE2b-256 1feffdcf96a7f395ccfb636f3d09a4d1162cb12dd7968f820de6afc23c8df5b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pydecomp-2.0.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on jonarriza96/pydecomp

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

File details

Details for the file pydecomp-2.0.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pydecomp-2.0.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a6d69334e295fd753dd105a7fd75bcfde6251368759cc3845280c807cf7102fa
MD5 8d9efee75db1d433c72a3caa4b9a518d
BLAKE2b-256 1cc27e1db5c460bb71c2c4892408273a4c112af52ba16706db6563e9bbb4f9bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for pydecomp-2.0.0-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: release.yml on jonarriza96/pydecomp

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

File details

Details for the file pydecomp-2.0.0-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pydecomp-2.0.0-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f02370accf4ce24b5eec8b6c4e79b0bccd7f1f25e7ec5067b44e7513c2cb2701
MD5 417975f7568a5b97ef2f85a368b6c557
BLAKE2b-256 2271537ed0f5a77061f0e7a7a39fc3a4b2f551acb3799204de9809a6323803ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for pydecomp-2.0.0-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on jonarriza96/pydecomp

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

File details

Details for the file pydecomp-2.0.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pydecomp-2.0.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 10b8eef8f0cb342f8b3a605c10b1db490096a262e5dc2dcc25bc6522a67f5a6e
MD5 7baf3c278036c351613fa3214da53243
BLAKE2b-256 0be791de2f33086d083a4ae60dd20388629e3c9a12377a69e849a6f1a9e31a9f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pydecomp-2.0.0-cp39-cp39-macosx_11_0_arm64.whl:

Publisher: release.yml on jonarriza96/pydecomp

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