"""Robot configs: map a config name to its MuJoCo model + default joint.
Calibration state for each config is stored in calib/<config>.json."""
import os

_HERE = os.path.dirname(os.path.abspath(__file__))

CONFIGS = {
    # single-servo UMI gripper. Uses Cameron's existing, properly-lit MuJoCo model
    # (the one that runs with `python -m mujoco.viewer --mjcf=umi_gripper_v2.xml`).
    # Actuated joint = 'jaw' (hinge, -0.9..0.1). Override the model with --model.
    "gripper": {
        "model": "/Users/cameronsmith/Projects/robotics_testing/stl_transfers/mj_umi_v2/umi_gripper_v2.xml",
        "default_joint": "jaw",
    },
    # 6-servo arm + UMI gripper. Convention: servo id i -> joint output_i
    # (ids 0..5 == output_0..output_5); id 6 -> gripper_jaw. Uses the arm_umi_v2 model.
    "arm": {
        "model": "/Users/cameronsmith/Projects/robotics_testing/stl_transfers/mj_arm_v2/arm_umi_v2.xml",
        "joint_map": {**{i: f"output_{i}" for i in range(6)}, 6: "gripper_jaw"},
    },
}


def calib_path(config):
    return os.path.join(_HERE, "calib", f"{config}.json")
