# SKEL File Format SKEL is DART's native XML format for describing worlds, skeletons, robots, and environments. Its structure is based on [SDFormat](http://sdformat.org/) with a few DART-specific extensions. DART can also load URDF, SDFormat, and MJCF files — prefer those when you need to interchange models with other tools. SKEL is convenient when you want a compact, DART-focused scene or want to exercise DART-specific options directly. ## Loading a SKEL file A SKEL file is read into a `World` (or, for a single model, a `Skeleton`). Bundled sample files are addressable with the `dart://sample/...` URI scheme; you can also pass an ordinary file path. ```cpp #include #include auto world = dart::io::readWorld( dart::common::Uri("dart://sample/skel/cubes.skel")); // A single model: dart::io::readSkeleton(uri) ``` ```python import dartpy as dart world = dart.io.SkelParser.read_world("dart://sample/skel/cubes.skel") ``` ## Document structure A SKEL document has a `` root containing one ``. A world holds `` settings and one or more `` elements; each skeleton is a tree of `` elements connected by `` elements. ```text ... ... ... ``` ## Physics `` configures the world: - `` — integration step in seconds (e.g. `0.001`). - `` — gravity vector as `x y z` (e.g. `0 -9.81 0`). - `` — collision backend, e.g. `dart` or `fcl`. ## Skeletons, bodies, and shapes Each `` contains bodies and joints. A `` may specify: - `` — pose as three translation values followed by XYZ Euler angles (six numbers); defaults to the identity. - `` — ``, an inertial ``, and an optional ``. - `` and `` — each wraps a `` (plus an optional `` and, for visuals, ``). `` supports `box`, `sphere`, `ellipsoid`, `cylinder`, `capsule`, `cone`, `pyramid`, `plane`, `multi_sphere`, and `mesh`. Meshes are imported with [Assimp](https://www.assimp.org/), so any Assimp-supported mesh format can be referenced. ## Joints A `` connects a `` and a `` body. Use `world` as the parent name to attach a body to the world frame. Supported `type` values are `weld`, `revolute`, `prismatic`, `screw`, `universal`, `ball`, `euler`, `translational`, `planar`, and `free`. For joints with movable axes, `` (and ``, `` for multi-DOF joints) carry: - `` — the axis direction. - `` — ``, ``, ``, and ``. - `` — `` and `` bounds. The joint's `actuator` attribute may be `force` (the default), `passive`, `servo`, `acceleration`, `velocity`, or `locked`. Initial state can be set with `` and ``. ## A minimal example A single free-floating box falling under gravity: ```xml 0.001 0 -9.81 0 dart 1 0.1 0.05 0.1 0.8 0.3 0.3 0.1 0.05 0.1 world box ``` ## More examples and the authoritative schema DART ships dozens of sample `.skel` files under [`data/skel/`](https://github.com/dartsim/dart/tree/main/data/skel); they are the best reference for real-world usage. For the exact set of recognized elements and attributes, the parser source is authoritative: [`dart/utils/skel_parser.cpp`](https://github.com/dartsim/dart/blob/main/dart/utils/skel_parser.cpp).