{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "dvrk-arm.schema.json",
    "$version": "1",
    "title": "dVRK arm",
    "type": "object",
    "description": "Configuration file format for the dVRK arm component.  See the [dVRK documentation](https://dvrk.readthedocs.io).  This schema is not used directly, it is extended for each arm type: [ECM](dvrk-ecm.html), [MTM](dvrk-mtm.html) and [PSM](dvrk-psm.html).\n\n - For details of implementation, see code under `sawIntuitiveResearchKit/core/components/code/mtsIntuitiveResearchKitArm.cpp`\n - [Schema file](dvrk-arm.schema.json)",
    "required": ["$id", "$version", "kinematic", "generation"],
    "properties": {

	"$id": {
	    "type": "string",
	    "description": "Schema used for this configuration file",
	    "enum": ["dvrk-mtm.schema.json", "dvrk-psm.schema.json", "dvrk-ecm.schema.json"]
	},
	"$version": {
	    "type": "string",
	    "description": "Schema version"
	},

	"kinematic": {
            "description": "Kinematic configuration file, i.e. DH parameters for class `robManipulator`. Kinematic files are provided under `share/io`. The kinematic configuration files should not be changed for most users.",
            "type": "string"
        },

        "skip_gravity_compensation": {
            "description": "Option to completely disable gravity compensation.",
            "type": "boolean",
            "default": false
        },

        "kinematic_gc": {
            "description": "Gravity compensation configuration file, i.e. DH parameters (with mass and center of mass) for `robManipulator`.",
            "type": "string"
        },

        "generation": {
            "description": "Arm generation, either a Standard (aka Classic) or Si.",
            "type": "string",
            "enum": ["Classic", "Si"]
        },

        "re_home": {
            "description": "Force re_homing, i.e. computer encoder preloads based on potentiometer readings and for MTMs, search for mechanical limit for the last joint (roll)",
            "type": "boolean",
            "default": false
        },

        "mounting_pitch": {
            "description": "Angle representing how pitched the arm is when mounted.  This number is in radians.  This is used to figure out the direction of gravity depending on how the arm is mounted.  For example, the Classic ECM, when mounted on the SUJ is pitched by -45.0 degrees.  For the Si system, PSM1 and PSM2 are pitched 45 degrees down (-45.0) and the ECM is pitched 70 degrees down.  This parameter is NOT used for MTMs as we assume they are always straight.  It is not used on the Classic PSMs since we don't compute any gravity compensation for these arms.",
            "type": "number",
            "default": 0.0
        },

        "homing_zero_position": {
            "description": "Indicates if the arm should go to zero position in joint space during homing procedure.  This is true by default for MTMs and false for other arms (PSM and ECM).  For MTMs, it makes sense to go the zero position when homing so the arms are conveniently placed for the operator to get started.  Furthermore, going to zero during homing will position each joint away from the joint limit.  This is particularly useful for the MTM roll.  For all arms on the patient side, it is safe to assume that the arms shouldn't move on their own.  This is obvious for the real da Vinci system with actual patients.  For research applications, moving automatically to zero can also damage equipement around the arms or mounted on the tools (e.g. strain gages).  Finally, the PSM will only move to zero position during the homing procedure if there is no tool detected, i.e. the arm will never move if a tool is present.  Most users should steer away from this setting.",
            "type": "boolean"
        }
    }
}
