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.
without_duplicate_points Returns a path without consecutive duplicate points.
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.0.tar.gz (21.9 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.0-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.0-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.0-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.0-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.0-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.0-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.0.tar.gz.

File metadata

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

File hashes

Hashes for path_toolkit-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e94444cda4b1689a6779ff6463f7adee13cda3418eac98eace5450a9e32c1e49
MD5 867b299db4cacc08cbf0c6895d39c1e4
BLAKE2b-256 e24c7907f31ee0c6230f390bb2bb68359a634ed5d5e814c5d19d3f89aea0d378

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for path_toolkit-0.2.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 077be54f649fba9572e1699347e1e685b43d36ce70e4dba313c799aa231a7af8
MD5 a2a98629a73489371424345d80a83560
BLAKE2b-256 db981a03ba9d81171eb8639e6f571135264b2acdbb05cd65e479266814f4f957

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for path_toolkit-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 38b71cba4842b55315eb92027e31f24649860f2f45593fbf065644eb28538ba2
MD5 e5d45f8d6682d451fe70b57aa0b50ecb
BLAKE2b-256 873c012b688fa40b70a35e6f1caa08e3e42bd8a8aa3d7cf66150c62244dba8a1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for path_toolkit-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cb4fabe0c9e58938cf828a5e2c1acdb6d8f5741e9f65b03ee29fb338f4de3f00
MD5 bfa6b877adf87fa67d4b745dbf741487
BLAKE2b-256 378bada7a7089f90231b0811d99cf07302d14aa1708e6ce64feed013a0ad7701

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for path_toolkit-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b2f704b72727c965c78d3f0cfdb3ffb190d6de720d202c8aaab80fcfe494c846
MD5 1abb82facf907210aa505c6c5e06169a
BLAKE2b-256 47e9963e78785e7de01a0a4a56025322a55ed11499c2c6cc2b92d91e0b23fa7d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for path_toolkit-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1e42f394f3a9ad882ba977062344dcff739f40b752db40bfac339eb5b79739d9
MD5 b7f05ac0345ff6894dc8428e1707e09f
BLAKE2b-256 6b53d6b7564c279e4eb1240ec2a0843159f0180e77024cbae26712a647a32cc8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for path_toolkit-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 44cee72151512675f722de3bb4f4fa800af216d9bd3c979db2faa2cf6d81940c
MD5 02a4676d509f71fac4362ada6b0c5e9d
BLAKE2b-256 263f433f6c1d3bca568f74d32c31a51bc4543e9cd29f5bdba5f7350762ba15ba

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