Regular API function

sim.getPathLengths

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/C++
synopsis
C/C++
parameters
C/C++
return value
Lua
synopsis
float[] pathLengths,float totalLength=sim.getPathLengths(float[] path,int dof,function/string 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
Python
synopsis
list pathLengths,float totalLength=sim.getPathLengths(list path,int dof,string distCallback=None)