Regular API function


Description Returns the lengths of a path. Each path point will have a corresponding length value (taken as the distance from the path's first point, along the path). See also the other path related functions.
C synopsis
C parameters
C return value
Lua synopsis table[] pathLengths,float totalLength=sim.getPathLengths(table[] path,int dof,function distCallback=nil)
Lua parameters
path: the path, specified in row-major order, e.g. a path containing two 3D poses (position+quaternion) would be {x1,y1,z1,qx1,qy1,qz1,qw1,x2,y2,z2,qx2,qy2,qz2,qw2}
dof: the size or dimension of path points, e.g. in case of a 3D pose, this would be 7
distCallback: an optional function that takes as input two configurations, and returns the calculated distance between them. See also sim.getConfigDistance
Lua return values
pathLengths: the lengths corresponding to each path point
totalLength: the total length of the path