Skip to content

ebertolazzi/Clothoids

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clothoids

G1 and G2 fitting with clothoids, spline of clothoids, circle arc and biarc.

This library contains the implementation of the algorithms on clothoids, splines of clothoids, arc, bi-arc splines of biarcs described in the works:

A clothoid is a curve described by the parametric eqautions:

$$ x(s)=\int_0^s \cos\left(\frac{1}{2}\kappa'\tau^2+\kappa_0\tau+\vartheta_0\right),\mathrm{d}\tau $$

$$ y(s)=\int_0^s \sin\left(\frac{1}{2}\kappa'\tau^2+\kappa_0\tau+\vartheta_0\right),\mathrm{d}\tau $$

when $\kappa'=0$ the clothoids reduce to a circle arc and when $\kappa'=\kappa_0=0$ the clothoids reduce to a straight segment.

The library contains the following objects:

  • Segment
  • Circle Arc
  • Clothoids
  • Bi-arc
  • spline of
    • Segment
    • Circle Arc
    • Clothoids (with G1 and G2 continuity)
    • Bi-arc
  • triangles
  • bounding box

and fast algorithms involving the objects, in particular:

  • evaluation
  • intersection (between objects)
  • point-object distance

Library is written in C++11 with a MATLAB mex interface. Thus can be used in fast compiled application or in MATLAB scripts.

Compilation

To compile the C++11 library the easy way require cmake and rake

ruby setup.rb

then

rake

to build the MATLAB toolbox

cd toolbox
ruby populate_toolbox.rb
ruby build.rb

for more details see: online documentation at http://ebertolazzi.github.io/Clothoids/