SDF importer plugin

The SDF file format (*.sdf) is supported for import operations via a plugin: v_repExtSDF. The plugin's full source code, courtesy of Federico Ferri, is available in the programming folder. If the SDF plugin was correctly loaded, you can access the import operation and dialog via [Menu bar --> Plugins --> SDF import...]:

[SDF plugin dialog]

  • Ignore missing required values (SDF parser): ignores required elements that are missing (if some format specifications are not respected).
  • Assign collision links to layer 9: hides collision links in layer 9 (layer 9 is off by default).
  • Assign joints to layer 10: hides joints in layer 10 (layer 10 is off by default).
  • Convex decompose non-convex collision links: decomposes non-convex respondable shapes into convex shapes. This item should always be checked, since convex shapes perform faster and are more stable during dynamic collision response calculations.
  • Show convex decomposition dialog: allows to adjust the way how the convex decomposition operates.
  • Create visual links if none: creates an artificial visual element if the link doesn't define one.
  • Center model above ground: centers the imported model above the ground.
  • Prepare model definition if feasable: tags the root object as "model base" and adapts the other objects accordingly (e.g. clicking an object in the model will select the whole model instead of an individual object).
  • Alternate local respondable masks: when checked, alternates the local collision masks so that adjacent respondable shapes won't react to collision. If unckecked, then all respondable shapes will only react to collision with objects outside of the model.
  • Enable position control for revolute and prismatic joints: if checked, then revolute and prismatic joints will be in position control mode. Joint force/torque and upper regulation velocity are taken from the SDF file.
  • Import: triggers the import operation.
  • Following API functions are also supported:


    Description Inspect the structure of a SDF file. Can be useful for tracking bugs.
    Lua synopsis simExtSDF_dump(string fileName)
    Lua parameters
    fileName: SDF file path
    Lua return values


    Description Import a SDF file into the current scene.
    Lua synopsis simExtSDF_import(string fileName, bool ignoreMissingValues = false, bool hideCollisionLinks = true, bool hideJoints = true, bool convexDecompose = true, bool showConvexDecompositionDlg = false, bool createVisualIfNone = true, bool centerModel = true, bool prepareModel = true, bool noSelfCollision = true, bool positionCtrl = true)
    Lua parameters
    See dialog items above for parameter details
    Lua return values