# Collision filtering in headless procedural simulation

Collision filtering in headless procedural simulation. Parameterized bounded JSON adapter; synthetic DIRECT simulation, no physical robot.

Record version: `1.0.0` · Hub commit: `39b06d7a6016edcea27e348e49ffd86f29ec1811`

## Executable interface

```json
{
  "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": "not_used",
    "quaternion_order": "not_used"
  },
  "input_schema": {
    "type": "object",
    "required": [
      "offset"
    ],
    "additionalProperties": false,
    "properties": {
      "offset": {
        "type": "number",
        "minimum": 0.01,
        "maximum": 0.15,
        "x-unit": "m",
        "x-frame": "right_handed_world_xyz; +z_up; procedural_arm_base=world_origin",
        "description": "offset; units=m; frame=right_handed_world_xyz; +z_up; procedural_arm_base=world_origin"
      }
    }
  },
  "output_schema": {
    "type": "object",
    "required": [
      "contacts_enabled",
      "contacts_disabled"
    ],
    "additionalProperties": false,
    "properties": {
      "contacts_enabled": {
        "type": "integer",
        "minimum": 0,
        "maximum": 100,
        "x-unit": "dimensionless",
        "x-frame": "right_handed_world_xyz; +z_up; procedural_arm_base=world_origin",
        "description": "contacts_enabled; units=dimensionless; frame=right_handed_world_xyz; +z_up; procedural_arm_base=world_origin"
      },
      "contacts_disabled": {
        "type": "integer",
        "minimum": 0,
        "maximum": 100,
        "x-unit": "dimensionless",
        "x-frame": "right_handed_world_xyz; +z_up; procedural_arm_base=world_origin",
        "description": "contacts_disabled; units=dimensionless; 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-collisionfilter"
  ],
  "origin_relationship": "adapted_from; inspect declared model and inputs, not original robot compatibility"
}
```



## Exact environment

| Runtime | Robot | Controller | Observation | OS | Python | Evidence |
| --- | --- | --- | --- | --- | --- | --- |
| pybullet 3.2.7 | synthetic-seven-axis-or-procedural-scene | json-contract-v1 | explicit-json-input | linux x86_64 | >=3.10,<3.11 | task_complete |

All inputs and outputs follow interface v1. Simulation adapters query exact synthetic simulator state; no perception or physical sensor compatibility.

Compatibility status: **hub_verified**. An environment match does not establish task completion. Runtime verification: **task_complete**.

## Source and license

- Repository: https://github.com/bulletphysics/bullet3
- Source commit: `2c204c49e56ed15ec5fcfa71d199ab6d6570b3f5` (no tag)
- Original authors: Erwin Coumans and Bullet Physics contributors
- License: [Zlib](https://github.com/bulletphysics/bullet3/blob/2c204c49e56ed15ec5fcfa71d199ab6d6570b3f5/LICENSE.txt)
- Source archive SHA256: `f7c486f10b9f645d0577249d02855e076e8368babaa3d31ced6095e7162baee9`
- Upstream files: `LICENSE.txt`, `examples/pybullet/examples/collisionFilter.py`
- Upstream contribution rules: https://github.com/bulletphysics/bullet3

## Find, inspect, prepare

```sh
python /PATH_TO_SKILL/scripts/rsh.py find "algorithm" --runtime pybullet --runtime-version 3.2.7 --robot synthetic-seven-axis-or-procedural-scene --json
python /PATH_TO_SKILL/scripts/rsh.py inspect pybullet-collision-filter-skill --json
python /PATH_TO_SKILL/scripts/rsh.py prepare pybullet-collision-filter-skill --project ./experiment --expected-source-commit 2c204c49e56ed15ec5fcfa71d199ab6d6570b3f5 --expected-record-version 1.0.0 --plan --json
```

Remove `--plan` to download the checksum-verified pinned source and create an isolated project environment. Preparation returns the remaining configuration. Dependency installation is an explicit `--install-deps` step; it can execute package build hooks. Robot simulation is a separate command returned by prepare, never run by find/inspect.

Direct package pins: `numpy==1.26.4`, `pybullet==3.2.7`.

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.

Hardware: x86_64 CPU; no GPU or robot required.

Rendering: No display. Matplotlib Agg for numerical imports; PyBullet DIRECT for simulation..

External API keys: none.

## Invocation contract

Entrypoint: `python run.py`.

```json
{
  "argv": [
    "{python}",
    "{recipe_dir}/run.py",
    "--source-dir",
    "{source_dir}",
    "--example"
  ],
  "inputs": {
    "offset": 0.05
  },
  "outputs": {
    "format": "single JSON object on stdout",
    "payload_selector": "outputs",
    "schema": {
      "type": "object",
      "required": [
        "contacts_enabled",
        "contacts_disabled"
      ],
      "additionalProperties": false,
      "properties": {
        "contacts_enabled": {
          "type": "integer",
          "minimum": 0,
          "maximum": 100,
          "x-unit": "dimensionless",
          "x-frame": "right_handed_world_xyz; +z_up; procedural_arm_base=world_origin",
          "description": "contacts_enabled; units=dimensionless; frame=right_handed_world_xyz; +z_up; procedural_arm_base=world_origin"
        },
        "contacts_disabled": {
          "type": "integer",
          "minimum": 0,
          "maximum": 100,
          "x-unit": "dimensionless",
          "x-frame": "right_handed_world_xyz; +z_up; procedural_arm_base=world_origin",
          "description": "contacts_disabled; units=dimensionless; frame=right_handed_world_xyz; +z_up; procedural_arm_base=world_origin"
        }
      }
    }
  }
}
```

Success: 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: 30 seconds. Caller must terminate the separate adapter process after 30 seconds; adapters bound iterations/scene steps and close simulation clients.

Failures: Invalid or oversized JSON; Source checksum mismatch; Unavailable pinned dependency; No valid path or postcondition failure; Execution exceeding the declared bounded algorithm budget.

## Actual evidence

Three frozen positive cases passed against this exact adapter; see per-case receipts. This does not estimate general accuracy.

Reviewer: Hub maintainer runtime harness · 2026-10-19.

Commands/checks actually performed:

- python tools/verify_executable_recipes.py --source-cache SOURCE_CACHE --output OUTPUT --backend pybullet

Submitted evidence and hub verification remain separate. A schema check, PR creation or merge does not establish task success or publication.

## Reusable fixes

Preserve upstream origin/license and interface semantics. Edit the finite manifest/templates and regenerate; record new exact-byte evidence for behavior changes.

# Collision filtering in headless procedural simulation

Parameterized adaptation of `examples/pybullet/examples/collisionFilter.py` from https://github.com/bulletphysics/bullet3 at `2c204c49e56ed15ec5fcfa71d199ab6d6570b3f5`. Original authors: Erwin Coumans and Bullet Physics contributors. Upstream license: Zlib. Source license and all notices remain in the prepared checkout; the Hub adapter is MIT.

Use the record interface for input/output schemas, units, frames, prerequisites and failures. `--describe` reads the contract; `--example` runs the declared case. Replace `--example` with `--input TASK.json` for a different input. This adapter does not command physical hardware.

