{
  "mode": "contact_parent_rewire",
  "actions": [
    {
      "type": "set_parent",
      "node_id": 0,
      "old_parent": -1,
      "new_parent": 1,
      "reason": "contact_ot"
    }
  ],
  "skipped_actions": [
    {
      "type": "skip_parent",
      "node_id": 1,
      "new_parent": 0,
      "reason": "cycle_guard"
    }
  ],
  "gates": {
    "pred_count": 2,
    "template_count": 3,
    "count_close": true,
    "assignment_mean_confidence": 0.5362494782959324,
    "assignment_min_confidence": 0.4686107633083994,
    "confident": true,
    "contact_cost_delta": -0.048716158870552806,
    "contact_better": true
  },
  "assignment": {
    "mean_confidence": 0.5362494782959324,
    "min_confidence": 0.4686107633083994,
    "pairs": [
      {
        "pred_id": 0,
        "pred_name": "handle",
        "template_id": 1,
        "template_name": "surface_board",
        "cost": 0.45,
        "confidence": 0.4686107633083994
      },
      {
        "pred_id": 1,
        "pred_name": "handle",
        "template_id": 2,
        "template_name": "fixed_part",
        "cost": 0.7,
        "confidence": 0.19805590335826734
      }
    ],
    "cost_matrix": [
      [
        1.0,
        0.45,
        0.45
      ],
      [
        1.0,
        0.7,
        0.7
      ]
    ],
    "plan": [
      [
        0.031389236691600625,
        0.23430538165419965,
        0.23430538165419965
      ],
      [
        0.30194409664173266,
        0.09902795167913366,
        0.09902795167913366
      ]
    ]
  },
  "contact_assignment": {
    "baseline_cost": 0.4014609467626994,
    "contact_ot_cost": 0.3527447878921466,
    "cost_delta": -0.048716158870552806,
    "selected_pairs": [
      {
        "parent_id": 0,
        "parent_name": "handle",
        "child_id": 1,
        "child_name": "handle",
        "template_joint_id": 1,
        "template_joint_name": "surface_board",
        "template_joint_type": "revolute",
        "template_axis": [
          0.0,
          1.0,
          0.0
        ],
        "cost": 0.4196201424121942,
        "features": {
          "gap": 0.0,
          "contact_overlap": 0.5573854886874102,
          "pivot_child_surface": 0.29168255782978153,
          "pivot_parent_surface": 0.22375598109377953,
          "pivot_contact": 0.25771926946178053,
          "axis_principal_error": 0.0051839963914072085,
          "relation": 0.28,
          "semantic": 1.0,
          "type": 1.0,
          "axis": 0.06485078832477154
        }
      },
      {
        "parent_id": 1,
        "parent_name": "handle",
        "child_id": 0,
        "child_name": "handle",
        "template_joint_id": 2,
        "template_joint_name": "fixed_part",
        "template_joint_type": "revolute",
        "template_axis": [
          -0.7071076016277473,
          1.6327306245056322e-08,
          -0.7071059607443956
        ],
        "cost": 0.2858694333720989,
        "features": {
          "gap": 0.0,
          "contact_overlap": 0.5573854886874102,
          "pivot_child_surface": 0.0,
          "pivot_parent_surface": 0.277822166001918,
          "pivot_contact": 0.138911083000959,
          "axis_principal_error": 0.0,
          "relation": 0.28,
          "semantic": 1.0,
          "type": 0.0,
          "axis": 0.5000007386570273
        }
      }
    ],
    "cost_matrix": [
      [
        0.4196201424121942,
        0.5444848813063893
      ],
      [
        0.3558693299601151,
        0.2858694333720989
      ]
    ]
  },
  "template": {
    "pm_id": "8867",
    "category": "Door",
    "node_count": 3,
    "movable_joint_count": 2
  }
}
