Registry / ai-ml / pyclothoids

pyclothoids

JSON →
library0.2.0pypypi✓ verified 88d ago

A library for clothoid curves (also known as Euler spirals or Cornu spirals) in Python. Current version is 0.2.0, released with support for closest point calculations, projections, and caching. The library is under active development.

pip install pyclothoids
INSTALL
IMPORT
SIG · PYCLOTHOIDS
P
pyclothoids
ai-mlpythonv0.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Clothoid
✓ from pyclothoids import Clothoid
✗ from clothoid import Clothoid
Package name is pyclothoids, not clothoid

Create a clothoid curve using G1 Hermite interpolation and sample points.

from pyclothoids import Clothoid # Create a clothoid from start and end states x0, y0, theta0 = 0.0, 0.0, 0.0 # start x1, y1, theta1 = 10.0, 5.0, 1.0 # end clothoid = Clothoid.G1Hermite(x0, y0, theta0, x1, y1, theta1) # Sample points along the clothoid points = clothoid.SampleXY(100) print(points)
Debug
Known issues
gotchaThe Clothoid class is not exported; use Clothoid.G1Hermite (or other class methods) to create instances. Direct instantiation with Clothoid() will fail.
fix
Always use a factory class method like Clothoid.G1Hermite(...), Clothoid.G2Hermite(...), or Clothoid.BiArclength(...).
affects: all
gotchaThe library is not yet stable; API may change between minor versions. Version 0.2.0 introduced new methods like ClosestPoint and Distance, but existing code may break if it relied on internal attributes.
fix
Check the changelog and adapt calls if upgrading from 0.1.x. Use the public API documented in the README.
affects: <=0.2.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'clothoid'
Incorrect import path; the module is named pyclothoids, not clothoid.
fix
Use 'from pyclothoids import Clothoid' or 'import pyclothoids'.
TypeError: 'ClothoidType' object is not callable
Attempting to create a Clothoid by calling Clothoid() directly, but the class requires a factory method.
fix
Use Clothoid.G1Hermite(...) or other class methods to instantiate.
Upgrade
Version history
0.2.0latest on PyPI · released Apr 8, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
8
OpenAI (training)
1
Resources
pyclothoids — pip install pyclothoids · libregistry