New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

path-toolkit

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

path-toolkit

Useful functions for working with paths

  • 0.2.1
  • PyPI
  • Socket score

Maintainers
1

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.

PropertyDescription
pointsThe points of the path.
xThe x coordinates.
yThe y coordinates.
lengthThe length of the entire path.
path_length_per_pointThe length of the path at each point.
orientationThe orientation of the path for each point.
curvatureThe curvature for each point.
unit_tangent_vectorThe unit tangent vector at each point.

Class methods

FunctionDescription
resampled_pathReturns the path with equidistantly resampled points.
smoothed_pathReturns the smoothed path using this approach from Autoware.
find_circle_segmentsReturns a list of circle segments with the starting end ending index of the point list and respective radius.
compute_circle_fit_curvatureReturns the curvature profile of the path using the circle segments from find_circle_segments.
index_from_pointFinds the index of the nearest point from a given point.
path_length_from_pointFinds the path length of a given point.
sub_pathReturns 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

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc