Regular API function

sim.resamplePath

Description Returns a resampled path. See also the other path related functions.
C/C++
synopsis
C/C++
parameters
C/C++
return value
Lua
synopsis
float[] outputPath=sim.resamplePath(float[] path,float[] pathLengths,int finalConfigCnt,map method={type='linear',strength=1.0,forceOpen=false},int[] types=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}
pathLengths: the lengths of a path. Each path point should have a corresponding length value (as the distance from the path's first point, along the path). See also sim.getPathLengths.
finalConfigCnt: the number of points or configurations the resampled path should contain
method: an optional table specifying the type of interpolation (linear or quadraticBezier), and whether the path should be considered as open, even if the first and last path points overlap, and the bezier strength (0.05-1.0)
types: an optional table specifying the type of each configuration value/dimension: 0=cartesian value, 1=2pi-cyclic value, 2=quaternion value. e.g. a configuration representing 3D poses should use a types argument {0,0,0,2,2,2,2}, a configuration representing revolute and cyclic joints should use a types argument {1,1,1,...}
Lua
return values
outputPath: the resampled path
Python
synopsis
list outputPath=sim.resamplePath(list path,list pathLengths,int finalConfigCnt,dict method={'type': 'linear','strength': 1.0,'forceOpen': False},list types=None)