Importing and exporting paths

The path import/export functionality operates on CSV-files (Comma Separated Values) than can be created or read with a simple text-editor, but also easily imported/exported into applications like Microsoft Excel.


Importing paths

V-REP's import functionality ( [Menu bar --> File --> Import --> Path from CSV...] ) reads line-by-line values, where each line corresponds to a control point. Each line should be formatted in following way:

x,y,z,alpha,beta,gamma,relativeVelocity,BezierPointCount,interpolationFactor1,interpolationFactor2,
  virtualDistance,auxiliaryFlags,auxiliaryChannel1,auxiliaryChannel2,auxiliaryChannel3,auxiliaryChannel4

Where:

  • (x, y, z) represents a control point's position in METERS
  • (alpha, beta, gamma) represents a control point's orientation given as Euler angles in DEGREES. Default is (0,0,0).
  • RelativeVelocity DEPRECATED. Set to 1.0
  • BezierPointCount is the number of Bezier points that are desired for the control point. Default is 1.
  • InterpolationFactor1 & InterpolationFactor2 are the interpolation factors described in the section on path control points and Bezier points. Default are values of 0.5
  • VirtualDistance: a virtual distance value that is added to the path length at that control point location, see also the path position or path length calculation method. Default is 0.0
  • Auxiliary flags: a flag that can be used for various purposes, and that can be queried via the sim.getDataOnPath function. Default is 0.
  • Auxiliary channels 1-4: values that can be used for various purposes, and that can be queried via the sim.getDataOnPath function. Default are values of 0.0
  • Except for the first 3 values (control point position coordinates), all other values can be omitted, in which case default values are applied.


    Exporting paths

    A path's control points can be exported by selecting the path, then clicking [Menu bar --> File --> Export --> Selected path as CSV...]. The export format in this case is identical to the previously described path import format.

    A path's Bezier points can also be exported by selecting the path, then clicking [Menu bar --> File --> Export --> Selected path's bezier curve as CSV...]. In this case, each line in the created file (exported file) corresponds to a Bezier point and contains following values:

    x,y,z,alpha,beta,gamma,relativeVelocity,virtualDistance,auxiliaryFlags,auxiliaryChannel1,auxiliaryChannel2,
      auxiliaryChannel3,auxiliaryChannel4
    

    Recommended topics

  • Paths
  • Path control points and Bezier points
  • Path properties
  • Path edit mode