Skip to main content

Useful functions for working with paths

Project description

path-toolkit

This package contains the class Path which is useful for computing geometrical properties.

Instantiating a path

from path_toolkit import Path

# Either from a list of points or (n, 2) numpy array
path1 = Path(points=[[0, 0], [1, 0], [2, 1]])

# Or from seperated x and y coordinates (numpy arrays are allowed as well) 
path2 = Path(x=[0, 1, 2], y=[0, 0, 1])

Class properties

These properties are lazily evaluated, such that the desired property is computed on first access. The result is cached such that no additional computation is required on repeated access.

Property Description
points The points of the path.
x The x coordinates.
y The y coordinates.
length The length of the entire path.
path_length_per_point The length of the path at each point.
orientation The orientation of the path for each point.
curvature The curvature for each point.
unit_tangent_vector The unit tangent vector at each point.

Class methods

Function Description
resampled_path Returns the path with equidistantly resampled points.
smoothed_path Returns the smoothed path using this approach from Autoware.
find_circle_segments Returns a list of circle segments with the starting end ending index of the point list and respective radius.
compute_circle_fit_curvature Returns the curvature profile of the path using the circle segments from find_circle_segments.
index_from_point Finds the index of the nearest point from a given point.
path_length_from_point Finds the path length of a given point.
sub_path Returns a path ranging from a given start point to a given end point.

Todos

  • Write more tests for edge cases
  • Analyse potentially dangerous unwraps
  • Publish package to crates.io
  • Improve method documentation

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

path_toolkit-0.2.1.tar.gz (24.7 kB view details)

Uploaded Source

Built Distributions

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

path_toolkit-0.2.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.8 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

path_toolkit-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

path_toolkit-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

path_toolkit-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.8 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

path_toolkit-0.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.8 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

path_toolkit-0.2.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.8 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

Details for the file path_toolkit-0.2.1.tar.gz.

File metadata

  • Download URL: path_toolkit-0.2.1.tar.gz
  • Upload date:
  • Size: 24.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.7.4

File hashes

Hashes for path_toolkit-0.2.1.tar.gz
Algorithm Hash digest
SHA256 f439e1ca1606d45ca661b9b72339942e3fc75e06ddd9cef0a17a7c72e6cc7a80
MD5 71bb22cd47e4e18b61b6690d5216e6a6
BLAKE2b-256 454f27e7a44f57b0fb7488539b2b4b6b70a8127f9588dafaad48fd6aa4873579

See more details on using hashes here.

File details

Details for the file path_toolkit-0.2.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for path_toolkit-0.2.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ab76631cbcc5d0b5bd46599c9fe0871bb51f196951190eddd4fbd97e0eeb353f
MD5 99e6bcc1432b014fd3f81013bd5ce37b
BLAKE2b-256 606b2940e1634ce3d5613f06962270a00a5deadb9b1505a22a67faa7d67d2727

See more details on using hashes here.

File details

Details for the file path_toolkit-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for path_toolkit-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1192ccd9f09a2edbf4c414041fd890132ca985736277bb88d5baf70c7c66ea99
MD5 d61ab8d6a60f494f9e96172ee0b21d7e
BLAKE2b-256 a5d83f42d13c56413a41071e266ea3e66368592c0b7ae47e8a650b82715447f2

See more details on using hashes here.

File details

Details for the file path_toolkit-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for path_toolkit-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b909506616ee4af537465a034d1be2f99ab4a7e7b2941f67313e355071842335
MD5 3cc1027ed9be5ee9e8b693aef4c1e9b8
BLAKE2b-256 1ecd949a094cb4fe29e4c03fd9da48cea9d16ede85edf0316cfb2a64e68c7d6a

See more details on using hashes here.

File details

Details for the file path_toolkit-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for path_toolkit-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 79dca8e68c97ee359fe6e34213b3df3f24ce5f8235c9f0a920665dddadb9c371
MD5 0c65acc4b8d3d0cda0e38718aefc6d0d
BLAKE2b-256 9857bb8e9c12df338a5c5cbbef5a297b0e5a8d4a5ec03e81ac1c0a4e77cbd012

See more details on using hashes here.

File details

Details for the file path_toolkit-0.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for path_toolkit-0.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d12c71a73cb19246dd34488614db57e96430d9130668adf27b7a851830a3765a
MD5 700269e7e24f0670fd1bcf73f109a774
BLAKE2b-256 ff4f849302caf4460d0dfb4171377f3c845f54feee0b5396df7e2a7ae1c2dd96

See more details on using hashes here.

File details

Details for the file path_toolkit-0.2.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for path_toolkit-0.2.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 750b56ca347353f3fdb58e25f8991f32725a81a05be40c1f0216782b21bb3c41
MD5 4b490e52763396d793d3607d0350d8f6
BLAKE2b-256 cdb1a73d8644f780a910d4f67b2f2a76007a5c870bae792a02d8d6c3088eaa2d

See more details on using hashes here.

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