from .dual_arm import DualArmAssembly, DualArmMounts, load_dual_arm_mounts
from .kinematics import RM75Kinematics, default_urdf_path, pose_errors, validate_se3
from .mujoco_model import build_normalized_dual_mjcf
from .realman_reference import RealManFkReference
from .solver import RM75IkSolver, deterministic_recovery_seeds
from .robot_backend import DualArmJointState, RobotBackend
from .teleop_config import ArmTeleopProfile, load_dual_arm_profiles
from .teleop_control import (
    ControllerSample,
    ControlCycleResult,
    DualArmQpTeleopController,
    RelativePoseMapper,
    SafetyState,
)
from .types import (
    IkOptions,
    IkResult,
    IkStatus,
    JointLimits,
    joint_limit_profile,
    physical_joint_limits,
    teleop_joint_limits,
)

__all__ = [
    "DualArmAssembly",
    "DualArmJointState",
    "DualArmMounts",
    "DualArmMuJoCo",
    "DualArmQpTeleopController",
    "ControllerSample",
    "ControlCycleResult",
    "IkOptions",
    "IkResult",
    "IkStatus",
    "JointLimits",
    "InitialPoseDiagnostic",
    "MujocoRobot",
    "PlaybackResult",
    "RM75IkSolver",
    "RM75Kinematics",
    "RealManFkReference",
    "RelativePoseMapper",
    "RobotBackend",
    "SafetyState",
    "ArmTeleopProfile",
    "default_urdf_path",
    "build_normalized_dual_mjcf",
    "deterministic_recovery_seeds",
    "joint_limit_profile",
    "load_dual_arm_mounts",
    "load_dual_arm_profiles",
    "physical_joint_limits",
    "pose_errors",
    "teleop_joint_limits",
    "validate_se3",
]


def __getattr__(name):
    if name in {"DualArmMuJoCo", "PlaybackResult"}:
        from .mujoco_backend import DualArmMuJoCo, PlaybackResult

        return {"DualArmMuJoCo": DualArmMuJoCo, "PlaybackResult": PlaybackResult}[name]
    if name in {"MujocoRobot", "InitialPoseDiagnostic"}:
        from .mujoco_robot import InitialPoseDiagnostic, MujocoRobot

        return {
            "MujocoRobot": MujocoRobot,
            "InitialPoseDiagnostic": InitialPoseDiagnostic,
        }[name]
    raise AttributeError(name)
