ClothoidList Class Reference

Clothoids: ClothoidList Class Reference
Clothoids
ClothoidList Class Reference
Inheritance diagram for ClothoidList:
CurveBase

Public Member Functions

function ClothoidList ()
 
function reserve (in self, in N)
 
function save (in self, in fname)
 
function load (in self, in varargin)
 
function push_back (in self, in varargin)
 
function push_back_G1 (in self, in varargin)
 
function get (in self, in k)
 
function append (in self, in lst)
 
function get_STK (in self)
 
function get_XY (in self)
 
function num_segments (in self)
 
function numSegments (in self)
 
function build_3arcG2 (in self, in x0, in y0, in theta0, in kappa0, in)
 
function build_3arcG2fixed (in self, in s0, in x0, in y0, in theta0, in kappa0, in)
 
function build_2arcG2 (in self, in x0, in y0, in theta0, in kappa0, in)
 
function build_CLC (in self, in x0, in y0, in theta0, in kappa0, in)
 
function build_G1 (in self, in x, in y, in varargin)
 
function build (in self, in x0, in y0, in theta0, in s, in kappa)
 
function build_theta (in self, in x, in y)
 
function build_raw (in self, in x, in y, in abscissa, in theta, in kappa)
 
function make_closed (in self)
 
function make_open (in self)
 
function is_closed (in self)
 
function deltaTheta (in self)
 
function deltaKappa (in self)
 
function closest_point_by_sample (in self, in qx, in qy, in ds)
 
function closestPointBySample (in self, in qx, in qy, in ds)
 
function distanceBySample (in self, in qx, in qy, in ds)
 
function closest_segment (in self, in qx, in qy)
 
function closestSegment (in self, in qx, in qy)
 
function closest_point_in_range (in self, in qx, in qy, in ibegin, in iend, in varargin)
 
function closestPointInRange (in self, in qx, in qy, in ibegin, in iend, in varargin)
 
function closest_point_in_s_range (in self, in qx, in qy, in s_begin, in s_end, in varargin)
 
function closestPointInSRange (in self, in qx, in qy, in s_begin, in s_end, in varargin)
 
function s_to_index (in self, in s)
 
function export_table (in self, in filename)
 
function export_ruby (in self, in filename)
 
function info (in self)
 
function find_coord1 (in self, in x, in y, in varargin)
 
function export (in self)
 
function plot (in self, in varargin)
 
function plot_offs (in self, in offs, in npts, in varargin)
 
function plot_curvature (in self, in npts, in varargin)
 
function plotCurvature (in self, in npts, in varargin)
 
function plot_angle (in self, in npts, in varargin)
 
function plotAngle (in self, in npts, in varargin)
 
function plot_normal (in self, in step, in len)
 
function plotNormal (in self, in step, in len)
 
function save_clothoids (in self, in filename)
 
function saveClothoids (in self, in filename)
 
- Public Member Functions inherited from CurveBase
function CurveBase (in mexName, in objectType)
 
function obj_handle (in self)
 
function is_type (in self)
 
function load (in self, in OBJ)
 
function bbox (in self, in varargin)
 
function translate (in self, in tx, in ty)
 
function trim (in self, in smin, in smax)
 
function rotate (in self, in angle, in cx, in cy)
 
function reverse (in self)
 
function scale (in self, in sc)
 
function change_origin (in self, in newX0, in newY0)
 
function changeOrigin (in self, in newX0, in newY0)
 
function evaluate (in self, in s, in varargin)
 
function eval (in self, in varargin)
 
function eval_D (in self, in varargin)
 
function eval_DD (in self, in varargin)
 
function eval_DDD (in self, in varargin)
 
function theta (in self, in s)
 
function theta_D (in self, in s)
 
function theta_DD (in self, in s)
 
function theta_DDD (in self, in s)
 
function kappa (in self, in s)
 
function kappa_D (in self, in s)
 
function kappa_DD (in self, in s)
 
function xy_begin (in self)
 
function xyBegin (in self)
 
function xy_end (in self)
 
function xyEnd (in self)
 
function x_begin (in self)
 
function xBegin (in self)
 
function x_end (in self)
 
function xEnd (in self)
 
function y_begin (in self)
 
function yBegin (in self)
 
function y_end (in self)
 
function yEnd (in self)
 
function theta_begin (in self)
 
function thetaBegin (in self)
 
function theta_end (in self)
 
function thetaEnd (in self)
 
function kappa_begin (in self)
 
function kappaBegin (in self)
 
function kappa_end (in self)
 
function kappaEnd (in self)
 
function length (in self, in varargin)
 
function points (in self)
 
function bbTriangles (in self, in varargin)
 
function closest_point (in self, in qx, in qy, in varargin)
 
function closestPoint (in self, in qx, in qy, in varargin)
 
function distance (in self, in qx, in qy, in varargin)
 
function collision (in self, in OBJ, in varargin)
 
function intersect (in self, in OBJ, in varargin)
 
function info (in self)
 
function find_coord (in self, in x, in y)
 
function yesAABBtree (in self)
 
function noAABBtree (in self)
 
function plot_tbox (in self, in P1, in P2, in P3, in varargin)
 
function plotTBox (in self, in P1, in P2, in P3, in varargin)
 
function plot_bbox (in self, in varargin)
 
function plotBBox (in self, in varargin)
 
function plot_triangles (in self, in varargin)
 
function plotTriangles (in self, in varargin)
 

Additional Inherited Members

- Protected Member Functions inherited from CurveBase
function copyElement (in self)
 
- Protected Attributes inherited from CurveBase
Property mexName
 
Property objectHandle
 
Property call_delete
 
Property objectType
 

Constructor & Destructor Documentation

◆ ClothoidList()

function ClothoidList::ClothoidList ( )

Create a new C++ class instance for the clothoid list object

Usage:

ref = ClothoidCurve()

On output:

  • ref: reference handle to the object instance

Member Function Documentation

◆ append()

function ClothoidList::append ( in self,
in lst )

Append a curve to a clothoid list.

C = LineSegment( ... );
...
C = Biarc( ... );
...
C = CircleArc( ... );
% ....
ref.append(C); % append biarc

◆ build()

function ClothoidList::build ( in self,
in x0,
in y0,
in theta0,
in s,
in kappa )

Given a list of curvilinear coordinated and curvatures at nodes build a G2 clothoid list. Initial position and angle must be set to determine a unique clothoid list.

ref.build( x0, y0, theta0, s, kappa );
  • x0 initial x-coordinates
  • y0 initial y-coordinates at nodes
  • theta0 initial angle
  • s list of curvilinear coordinates
  • kappa list of curvatures at nodes

◆ build_G1()

function ClothoidList::build_G1 ( in self,
in x,
in y,
in varargin )

Given a list of xy-coordinates at node points build a clothoid list. If third argument (angle) is not present angles are estimated internally.

ref.build_G1( x, y );
ref.build_G1( x, y, theta );
  • x x-coordinates at nodes
  • y y-coordinates at nodes
  • theta angle at nodes

◆ build_theta()

function ClothoidList::build_theta ( in self,
in x,
in y )

Given a list of xy-coordinates at node points build a guess of angles for the clothoid list.

theta = ref.build_theta( x, y );
  • x x-coordinates at nodes
  • y y-coordinates at nodes

◆ closest_point_in_s_range()

function ClothoidList::closest_point_in_s_range ( in self,
in qx,
in qy,
in s_begin,
in s_end,
in varargin )

Find closest point of a Clothoid list given a s-range

[ icurve, x, y, s, t, iflag, dst ] = ...
ref.closest_point_in_s_range( qx, qy, s_begin, s_end, varargin );
[ icurve, x, y, s, t, iflag, dst ] = ...
ref.closest_point_in_s_range( qx, qy, s_begin, s_end, varargin, 'ISO' );
[ icurve, x, y, s, t, iflag, dst ] = ...
ref.closest_point_in_s_range( qx, qy, s_begin, s_end, varargin, 'SAE' );
res = ref.closest_point_in_s_range( qx, qy, s_begin, s_end, varargin );
res = ref.closest_point_in_s_range( qx, qy, s_begin, s_end, varargin, 'ISO' );
res = ref.closest_point_in_s_range( qx, qy, s_begin, s_end, varargin, 'SAE' );
%
% res is a struct with field
%
% res.icurve = number of the segment with the projected point
% res.x = projected x
% res.y = projected y
% res.s = curvilinear coordinate of the projection
% res.t = normal curvilinear coordinate ('ISO' or 'SAE' convenction)
% res.iflag = 1 OK -1 projection failed
% res.dst = point curve distance
%

◆ closestPointInRange()

function ClothoidList::closestPointInRange ( in self,
in qx,
in qy,
in ibegin,
in iend,
in varargin )
Deprecated
whill be removed in future version

◆ closestPointInSRange()

function ClothoidList::closestPointInSRange ( in self,
in qx,
in qy,
in s_begin,
in s_end,
in varargin )
Deprecated
whill be removed in future version

◆ export()

function ClothoidList::export ( in self)

Export list of clothoids

Usage:

S = ref.export();
  • S.x0: vector of initial point x-coordinate
  • S.y0: vector of initial point y-coordinate
  • S.theta0: vector of initial angles
  • S.kappa0: vector of initial curvatures
  • S.dkappa: vector of curvature derivative of the segments
  • S.L: vector of segment length

◆ get()

function ClothoidList::get ( in self,
in k )

Get the clothoid at position k. The clothoid is returned as a clothoid object or the data defining the clothoid.

[ x0, y0, theta0, kappa0, dkappa, L ] = ref.get(k);
C = ref.get(k);

◆ get_STK()

function ClothoidList::get_STK ( in self)

Return curvilinear coordinates, angle and curvature at node point for the clothoid list

[ s, theta, kappa ] = ref.get_STK();
  • s curvilinear coordinates nodes
  • theta angles at nodes
  • kappa curvature at nodes

◆ get_XY()

function ClothoidList::get_XY ( in self)

Return xy-coordinates at node points for the clothoid list

[ x, y ] = ref.get_XY();
  • x x-coordinates at nodes
  • y y-coordinates at nodes

◆ load()

function ClothoidList::load ( in self,
in varargin )

Load the clothoid list from a file (check consistency of the readed segments)

Usage:

ref.load( filename );
ref.load( filename, tol );

filename : file name to be read tol : tolerance used to check consistency

◆ numSegments()

function ClothoidList::numSegments ( in self)
Deprecated
whill be removed in future version

◆ plot()

function ClothoidList::plot ( in self,
in varargin )

Plot the clothoid list

Usage:

ref.plot();
ref.plot( npts );
fmt1 = {'Color','blue','Linewidth',2}; % first arc of the biarc
fmt2 = {'Color','red','Linewidth',2}; % second arc of the biarc
ref.plot( npts, fmt1, fmt2 );
  • npts: number of sampling points for plotting
  • fmt1: format of the odd clothoids
  • fmt2: format of the even clothoids

◆ plot_angle()

function ClothoidList::plot_angle ( in self,
in npts,
in varargin )

Plot the angle of the clothoid list

Usage:

ref.plotAngle( npts );
fmt1 = {'Color','blue','Linewidth',2};
fmt2 = {'Color','red','Linewidth',2};
ref.plotAngle( npts, fmt1, fmt2 );
  • npts: number of sampling points for plotting
  • fmt1: format of the first arc
  • fmt2: format of the second arc

◆ plot_curvature()

function ClothoidList::plot_curvature ( in self,
in npts,
in varargin )

Plot the curvature of the clothoid list

Usage:

ref.plotCurvature( npts );
fmt1 = {'Color','blue','Linewidth',2};
fmt2 = {'Color','red','Linewidth',2};
ref.plotCurvature( npts, fmt1, fmt2 );
  • npts: number of sampling points for plotting
  • fmt1: format of the first arc
  • fmt2: format of the second arc

◆ plot_normal()

function ClothoidList::plot_normal ( in self,
in step,
in len )

Plot the normal of the clothoid list

Usage:

ref.plotNormal( step, len );
  • step: number of sampling normals
  • len: length of the plotted normal

◆ plot_offs()

function ClothoidList::plot_offs ( in self,
in offs,
in npts,
in varargin )

Plot the clothoid list with offset

Usage:

ref.plot_offs( offs, npts );
fmt1 = {'Color','blue','Linewidth',2}; % first arc of the biarc
fmt2 = {'Color','red','Linewidth',2}; % second arc of the biarc
ref.plot_offs( offs, npts, fmt1, fmt2 );
  • npts: number of sampling points for plotting
  • fmt1: format of the first arc
  • fmt2: format of the second arc
  • offs: offset used in the plotting

◆ plotAngle()

function ClothoidList::plotAngle ( in self,
in npts,
in varargin )
Deprecated
whill be removed in future version

◆ plotCurvature()

function ClothoidList::plotCurvature ( in self,
in npts,
in varargin )
Deprecated
whill be removed in future version

◆ plotNormal()

function ClothoidList::plotNormal ( in self,
in step,
in len )
Deprecated
whill be removed in future version

◆ push_back()

function ClothoidList::push_back ( in self,
in varargin )

Append a curve to the clothoid list

Usage:

ref.push_back( obj ); % mode 1
ref.push_back( kappa0, dkappa, L ); % mode 2
ref.push_back( x0, y0, theta0, kappa0, dkappa, L ); % mode 3

Mode 1

Mode 2

  • kappa0 : initial curvature of the appended clothoid
  • dkappa : derivative of the curvature of the appended clothoid
  • L : length of the the appended clothoid

Mode 3

  • x0, y0 : initial position of the appended clothoid, the builded clothoid will be translated to the and of the actual clothoid list
  • theta0 : initial curvature of the appended clothoid
  • kappa0 : initial curvature of the appended clothoid
  • dkappa : derivative of the curvature of the appended clothoid
  • L : length of the the appended clothoid

◆ push_back_G1()

function ClothoidList::push_back_G1 ( in self,
in varargin )

Append a curve to the clothoid list

Usage:

ref.push_back( x1,y1,theta1 ); % mode 1
ref.push_back( x0,y0,theta0,x1,y1,theta1); % mode 2

Mode 1

Build a clothoid arc using final point and angle of the clothoid list and

  • x1, y1 : final point
  • theta1 : final angle

the builded clothoid is appended to the list

Mode 2

Build a clothoid arc using the data

  • x0, y0 : initial point
  • theta0 : initial angle
  • x1, y1 : final point
  • theta1 : final angle

the builded clothoid is appended to the list

◆ reserve()

function ClothoidList::reserve ( in self,
in N )

Reserve memory for N segments

Usage:

ref.reserve( N );

◆ save()

function ClothoidList::save ( in self,
in fname )

Save the clothoid list to a file

◆ save_clothoids()

function ClothoidList::save_clothoids ( in self,
in filename )

Save the clothoid list sampled on a file

Usage:

ref.saveSampled( filename, ds );
  • filename: file name
  • ds: sample point every ds

the file is of the form .. code-block:: text

X Y THETA 0 0 1.2 ... ...

*/
public:
function save_sampled(in self,in filename,in ds );
public:
function saveSampled(in self,in filename,in ds );

{matlab}

ref.saveClothoids( filename, ds );

- `filename`: file name
- `ds`: sample point every `ds`
the file is of the form
.. code-block:: text
x0 y0 theta0 kappa0 dk L
0 0 1.2 0.0 0.1 2
...
...

◆ saveClothoids()

function ClothoidList::saveClothoids ( in self,
in filename )
Deprecated
whill be removed in future version

The documentation for this class was generated from the following file:
  • /Users/enrico/Ricerca/develop/PINS/pins-mechatronix/LibSources/submodules/Clothoids/toolbox/lib/ClothoidList.m