{
  "id": "headless-arm-ik",
  "title": "Solve arm IK in headless PyBullet",
  "query": "inverse kinematics",
  "runtime": "pybullet",
  "skill_id": "pybullet-ik-skill",
  "start_url": "https://api.superfastrobotics.com/v1/start?q=inverse+kinematics&runtime=pybullet&hub_commit=f97266a5cdd2c600cd376397a54892f08290df20",
  "exact_start_url": "https://api.superfastrobotics.com/v1/start?q=pybullet-ik-skill&query_mode=all_terms&hub_commit=f97266a5cdd2c600cd376397a54892f08290df20",
  "hub_commit": "f97266a5cdd2c600cd376397a54892f08290df20",
  "record_version": "1.0.0",
  "source_commit": "2c204c49e56ed15ec5fcfa71d199ab6d6570b3f5",
  "environment": [
    {
      "runtime": "pybullet",
      "runtime_version": "3.2.7",
      "robot": "synthetic-seven-axis-or-procedural-scene",
      "controller": "json-contract-v1",
      "observation": "explicit-json-input",
      "os": "linux",
      "architecture": "x86_64",
      "python": "3.10",
      "status": "hub_verified"
    }
  ],
  "requirements": {
    "python": ">=3.10,<3.11",
    "packages": [
      "numpy==1.26.4",
      "pybullet==3.2.7"
    ],
    "hardware": [
      "x86_64 CPU; no GPU or robot required"
    ],
    "rendering": "No display. Matplotlib Agg for numerical imports; PyBullet DIRECT for simulation.",
    "api_keys": [],
    "network": [
      "Pinned source archive once during preparation",
      "PyPI for declared dependency installation"
    ],
    "dependency_lock": "Runtime dependency versions are pinned for the supported Python 3.10 x86_64 CPU environments and checked against execution receipts. Platform-specific wheel hashes are not represented as a universal artifact lock; prepare captures pip freeze."
  },
  "example_input": {
    "joint_angles": [
      0.1,
      -0.3,
      0.4,
      0.2,
      -0.2,
      0.1,
      0.1
    ],
    "target_xyz": [
      0.3,
      0.2,
      1.1
    ]
  },
  "interface": {
    "version": "1",
    "kind": "algorithm",
    "abstraction_level": 0,
    "execution_domain": "simulation",
    "language": "python",
    "input_transport": "json_file_or_inline",
    "output_transport": "json_stdout",
    "conventions": {
      "linear_unit": "m",
      "angular_unit": "rad",
      "time_unit": "s",
      "coordinate_frame": "right_handed_world_xyz; +z_up; procedural_arm_base=world_origin",
      "joint_order": "input_array_order",
      "quaternion_order": "not_used"
    },
    "input_schema": {
      "type": "object",
      "required": [
        "joint_angles",
        "target_xyz"
      ],
      "additionalProperties": false,
      "properties": {
        "joint_angles": {
          "type": "array",
          "minItems": 7,
          "maxItems": 7,
          "items": {
            "type": "number",
            "minimum": -3,
            "maximum": 3
          },
          "x-unit": "rad",
          "x-frame": "right_handed_world_xyz; +z_up; procedural_arm_base=world_origin",
          "description": "joint_angles; units=rad; frame=right_handed_world_xyz; +z_up; procedural_arm_base=world_origin"
        },
        "target_xyz": {
          "type": "array",
          "minItems": 3,
          "maxItems": 3,
          "items": {
            "type": "number",
            "minimum": -2,
            "maximum": 2
          },
          "x-unit": "m",
          "x-frame": "right_handed_world_xyz; +z_up; procedural_arm_base=world_origin",
          "x-order": [
            "x",
            "y",
            "z"
          ],
          "description": "target_xyz; units=m; frame=right_handed_world_xyz; +z_up; procedural_arm_base=world_origin; component order=x,y,z"
        }
      }
    },
    "output_schema": {
      "type": "object",
      "required": [
        "joint_angles_rad",
        "end_effector_xyz_m",
        "position_error_m"
      ],
      "additionalProperties": false,
      "properties": {
        "joint_angles_rad": {
          "type": "array",
          "minItems": 7,
          "maxItems": 7,
          "items": {
            "type": "number",
            "minimum": -100,
            "maximum": 100
          },
          "x-unit": "rad",
          "x-frame": "right_handed_world_xyz; +z_up; procedural_arm_base=world_origin",
          "description": "joint_angles_rad; units=rad; frame=right_handed_world_xyz; +z_up; procedural_arm_base=world_origin"
        },
        "end_effector_xyz_m": {
          "type": "array",
          "minItems": 3,
          "maxItems": 3,
          "items": {
            "type": "number",
            "minimum": -10,
            "maximum": 10
          },
          "x-unit": "m",
          "x-frame": "right_handed_world_xyz; +z_up; procedural_arm_base=world_origin",
          "x-order": [
            "x",
            "y",
            "z"
          ],
          "description": "end_effector_xyz_m; units=m; frame=right_handed_world_xyz; +z_up; procedural_arm_base=world_origin; component order=x,y,z"
        },
        "position_error_m": {
          "type": "number",
          "minimum": 0,
          "maximum": 10,
          "x-unit": "m",
          "x-frame": "right_handed_world_xyz; +z_up; procedural_arm_base=world_origin",
          "description": "position_error_m; units=m; frame=right_handed_world_xyz; +z_up; procedural_arm_base=world_origin"
        }
      }
    },
    "preconditions": [
      "PyBullet DIRECT CPU simulation with procedural shapes and a synthetic seven-axis arm where applicable; no downloaded models.",
      "This is an adaptation of the referenced API example, not verification of its original robot model or hardware.",
      "Simulation steps are fixed and bounded; force/torque order is Fx,Fy,Fz,Mx,My,Mz in the joint sensor frame."
    ],
    "postconditions": [
      "All declared checks must pass and all outputs must be finite.",
      "Success applies only to this operation and model, not higher-level task completion."
    ],
    "failure_codes": [
      "invalid_input_or_environment",
      "execution_failed",
      "task_failed"
    ],
    "composition": {
      "depends_on": [],
      "automatic_frame_conversion": false,
      "automatic_hardware_execution": false
    },
    "output_selector": "outputs",
    "origin_reference_ids": [
      "pybullet-inverse-kinematics"
    ],
    "origin_relationship": "adapted_from; inspect declared model and inputs, not original robot compatibility"
  },
  "completion": {
    "success_condition": "Exit 0, status=task_complete, success=true, finite outputs satisfying interface.output_schema and all declared numerical/model checks. This is not a physical robot or general task-success claim.",
    "timeout_seconds": 30,
    "failure_modes": [
      "Invalid or oversized JSON",
      "Source checksum mismatch",
      "Unavailable pinned dependency",
      "No valid path or postcondition failure",
      "Execution exceeding the declared bounded algorithm budget"
    ],
    "stop_condition": "Caller must terminate the separate adapter process after 30 seconds; adapters bound iterations/scene steps and close simulation clients."
  },
  "evidence": {
    "level": "task_complete",
    "verified_by": "Hub maintainer runtime harness",
    "date": "2026-10-19",
    "environment": {
      "scope": "simulation",
      "platforms": [
        "linux"
      ],
      "physical_robot": false
    },
    "commands": [
      "python tools/verify_executable_recipes.py --source-cache SOURCE_CACHE --output OUTPUT --backend pybullet"
    ],
    "result": "Three frozen positive cases passed against this exact adapter; see per-case receipts. This does not estimate general accuracy.",
    "artifacts": [
      "https://raw.githubusercontent.com/Superfast-Robotics/robot-skill-hub/f97266a5cdd2c600cd376397a54892f08290df20/evidence/runtime/executable-conversions-v1/pybullet-ik-skill.json"
    ],
    "runtime_verification": "task_complete",
    "contributor_reported": null,
    "hub_verification": {
      "runtime": "task_complete",
      "scope": "simulation",
      "case_count": 3,
      "source_unchanged": true
    }
  },
  "current_execution_state": "completed",
  "sample_url": "https://hub.superfastrobotics.com/samples/pybullet-ik-skill/",
  "execution_performed": false,
  "sharing_performed": false
}
