import enum
import nanobind
import pydrake.multibody.plant
import pydrake.systems.framework
import types
from _typeshed import Incomplete
from typing import Callable, ClassVar

ApplyDriverConfig: nanobind.nb_func
ApplyDriverConfigs: Callable
ApplyNamedPositionsAsDefaults: nanobind.nb_func
BuildIiwaControl: nanobind.nb_func
BuildSchunkWsgControl: nanobind.nb_func
GetSchunkWsgOpenPosition: nanobind.nb_func
MakeMultibodyForceToWsgForceSystem: nanobind.nb_func
MakeMultibodyStateToWsgStateSystem: nanobind.nb_func
PandaControlMode: types.SimpleNamespace
ParseIiwaControlMode: nanobind.nb_func
get_iiwa_max_joint_velocities: nanobind.nb_func
kIiwaArmNumJoints: int
kIiwaLcmStatusPeriod: float
kPandaArmNumJoints: int
position_enabled: nanobind.nb_func
torque_enabled: nanobind.nb_func

class IiwaCommandReceiver(pydrake.systems.framework.LeafSystem):
    def __init__(self, num_joints: int = ..., control_mode: IiwaControlMode = ...) -> None: ...
    def get_commanded_position_output_port(self) -> pydrake.systems.framework.OutputPort: ...
    def get_commanded_torque_output_port(self) -> pydrake.systems.framework.OutputPort: ...
    def get_message_input_port(self) -> pydrake.systems.framework.InputPort: ...
    def get_position_measured_input_port(self) -> pydrake.systems.framework.InputPort: ...
    def get_time_output_port(self) -> pydrake.systems.framework.OutputPort: ...

class IiwaCommandSender(pydrake.systems.framework.LeafSystem):
    def __init__(self, num_joints: int = ..., control_mode: IiwaControlMode = ...) -> None: ...
    def get_position_input_port(self) -> pydrake.systems.framework.InputPort: ...
    def get_time_input_port(self) -> pydrake.systems.framework.InputPort: ...
    def get_torque_input_port(self) -> pydrake.systems.framework.InputPort: ...

class IiwaControlMode(enum.Enum):
    __new__: ClassVar[Callable] = ...
    _generate_next_value_: ClassVar[Callable] = ...
    _hashable_values_: ClassVar[list] = ...
    _member_map_: ClassVar[dict] = ...
    _member_names_: ClassVar[list] = ...
    _member_type_: ClassVar[type[object]] = ...
    _unhashable_values_: ClassVar[list] = ...
    _unhashable_values_map_: ClassVar[dict] = ...
    _use_args_: ClassVar[bool] = ...
    _value2member_map_: ClassVar[dict] = ...
    _value_repr_: ClassVar[None] = ...
    kPositionAndTorque: ClassVar[IiwaControlMode] = ...
    kPositionOnly: ClassVar[IiwaControlMode] = ...
    kTorqueOnly: ClassVar[IiwaControlMode] = ...
    __nb_enum__: ClassVar[PyCapsule] = ...

class IiwaDriver:
    arm_child_frame_name: str | None
    control_mode: str
    desired_kp_gains: Incomplete
    ext_joint_filter_tau: float
    gripper_parent_frame_name: str | None
    hand_model_name: str
    lcm_bus: Incomplete
    lcm_status_period: float
    def __init__(self, **kwargs) -> None: ...
    def __copy__(self) -> IiwaDriver: ...
    def __deepcopy__(self, arg: dict) -> IiwaDriver: ...
    @property
    def __fields__(self): ...

class IiwaStatusReceiver(pydrake.systems.framework.LeafSystem):
    def __init__(self, num_joints: int = ...) -> None: ...
    def get_position_commanded_output_port(self) -> pydrake.systems.framework.OutputPort: ...
    def get_position_measured_output_port(self) -> pydrake.systems.framework.OutputPort: ...
    def get_time_measured_output_port(self) -> pydrake.systems.framework.OutputPort: ...
    def get_torque_commanded_output_port(self) -> pydrake.systems.framework.OutputPort: ...
    def get_torque_external_output_port(self) -> pydrake.systems.framework.OutputPort: ...
    def get_torque_measured_output_port(self) -> pydrake.systems.framework.OutputPort: ...
    def get_velocity_estimated_output_port(self) -> pydrake.systems.framework.OutputPort: ...

class IiwaStatusSender(pydrake.systems.framework.LeafSystem):
    def __init__(self, num_joints: int = ...) -> None: ...
    def get_position_commanded_input_port(self) -> pydrake.systems.framework.InputPort: ...
    def get_position_measured_input_port(self) -> pydrake.systems.framework.InputPort: ...
    def get_time_measured_input_port(self) -> pydrake.systems.framework.InputPort: ...
    def get_torque_commanded_input_port(self) -> pydrake.systems.framework.InputPort: ...
    def get_torque_external_input_port(self) -> pydrake.systems.framework.InputPort: ...
    def get_torque_measured_input_port(self) -> pydrake.systems.framework.InputPort: ...
    def get_velocity_estimated_input_port(self) -> pydrake.systems.framework.InputPort: ...

class PandaCommandReceiver(pydrake.systems.framework.LeafSystem):
    def __init__(self, num_joints: int, control_mode: int) -> None: ...
    def LatchInitialPosition(self, context: pydrake.systems.framework.Context) -> None: ...
    def get_commanded_position_output_port(self) -> pydrake.systems.framework.OutputPort: ...
    def get_commanded_torque_output_port(self) -> pydrake.systems.framework.OutputPort: ...
    def get_commanded_velocity_output_port(self) -> pydrake.systems.framework.OutputPort: ...
    def get_message_input_port(self) -> pydrake.systems.framework.InputPort: ...
    def get_position_measured_input_port(self) -> pydrake.systems.framework.InputPort: ...

class PandaCommandSender(pydrake.systems.framework.LeafSystem):
    def __init__(self, num_joints: int, control_mode: int) -> None: ...
    def get_position_input_port(self) -> pydrake.systems.framework.InputPort: ...
    def get_torque_input_port(self) -> pydrake.systems.framework.InputPort: ...
    def get_velocity_input_port(self) -> pydrake.systems.framework.InputPort: ...

class PandaStatusReceiver(pydrake.systems.framework.LeafSystem):
    def __init__(self, num_joints: int = ...) -> None: ...
    def get_acceleration_commanded_output_port(self) -> pydrake.systems.framework.OutputPort: ...
    def get_position_commanded_output_port(self) -> pydrake.systems.framework.OutputPort: ...
    def get_position_measured_output_port(self) -> pydrake.systems.framework.OutputPort: ...
    def get_torque_commanded_output_port(self) -> pydrake.systems.framework.OutputPort: ...
    def get_torque_external_output_port(self) -> pydrake.systems.framework.OutputPort: ...
    def get_torque_measured_output_port(self) -> pydrake.systems.framework.OutputPort: ...
    def get_velocity_commanded_output_port(self) -> pydrake.systems.framework.OutputPort: ...
    def get_velocity_measured_output_port(self) -> pydrake.systems.framework.OutputPort: ...

class PandaStatusSender(pydrake.systems.framework.LeafSystem):
    def __init__(self, num_joints: int = ...) -> None: ...
    def get_acceleration_commanded_input_port(self) -> pydrake.systems.framework.InputPort: ...
    def get_position_commanded_input_port(self) -> pydrake.systems.framework.InputPort: ...
    def get_position_measured_input_port(self) -> pydrake.systems.framework.InputPort: ...
    def get_torque_commanded_input_port(self) -> pydrake.systems.framework.InputPort: ...
    def get_torque_external_input_port(self) -> pydrake.systems.framework.InputPort: ...
    def get_torque_measured_input_port(self) -> pydrake.systems.framework.InputPort: ...
    def get_velocity_commanded_input_port(self) -> pydrake.systems.framework.InputPort: ...
    def get_velocity_measured_input_port(self) -> pydrake.systems.framework.InputPort: ...

class SchunkWsgCommandReceiver(pydrake.systems.framework.LeafSystem):
    def __init__(self, initial_position: float = ..., initial_force: float = ...) -> None: ...
    def get_force_limit_output_port(self) -> pydrake.systems.framework.OutputPort: ...
    def get_position_output_port(self) -> pydrake.systems.framework.OutputPort: ...

class SchunkWsgCommandSender(pydrake.systems.framework.LeafSystem):
    def __init__(self, default_force_limit: float = ...) -> None: ...
    def get_command_output_port(self) -> pydrake.systems.framework.OutputPort: ...
    def get_force_limit_input_port(self) -> pydrake.systems.framework.InputPort: ...
    def get_position_input_port(self) -> pydrake.systems.framework.InputPort: ...

class SchunkWsgController(pydrake.systems.framework.Diagram):
    def __init__(self, kp: float = ..., ki: float = ..., kd: float = ...) -> None: ...

class SchunkWsgDriver:
    lcm_bus: Incomplete
    pid_gains: Incomplete
    def __init__(self, **kwargs) -> None: ...
    def __copy__(self) -> SchunkWsgDriver: ...
    def __deepcopy__(self, arg: dict) -> SchunkWsgDriver: ...
    @property
    def __fields__(self): ...

class SchunkWsgPositionController(pydrake.systems.framework.Diagram):
    def __init__(self, time_step: float = ..., kp_command: float = ..., kd_command: float = ..., kp_constraint: float = ..., kd_constraint: float = ..., default_force_limit: float = ...) -> None: ...
    def get_desired_position_input_port(self) -> pydrake.systems.framework.InputPort: ...
    def get_force_limit_input_port(self) -> pydrake.systems.framework.InputPort: ...
    def get_generalized_force_output_port(self) -> pydrake.systems.framework.OutputPort: ...
    def get_grip_force_output_port(self) -> pydrake.systems.framework.OutputPort: ...
    def get_state_input_port(self) -> pydrake.systems.framework.InputPort: ...

class SchunkWsgStatusReceiver(pydrake.systems.framework.LeafSystem):
    def __init__(self) -> None: ...
    def get_force_output_port(self) -> pydrake.systems.framework.OutputPort: ...
    def get_state_output_port(self) -> pydrake.systems.framework.OutputPort: ...
    def get_status_input_port(self) -> pydrake.systems.framework.InputPort: ...

class SchunkWsgStatusSender(pydrake.systems.framework.LeafSystem):
    def __init__(self) -> None: ...
    def get_force_input_port(self) -> pydrake.systems.framework.InputPort: ...
    def get_state_input_port(self) -> pydrake.systems.framework.InputPort: ...

class SchunkWsgTrajectoryGenerator(pydrake.systems.framework.LeafSystem):
    def __init__(self, input_size: int, position_index: int, use_force_limit: bool = ...) -> None: ...
    def get_desired_position_input_port(self) -> pydrake.systems.framework.InputPort: ...
    def get_force_limit_input_port(self) -> pydrake.systems.framework.InputPort: ...
    def get_max_force_output_port(self) -> pydrake.systems.framework.OutputPort: ...
    def get_state_input_port(self) -> pydrake.systems.framework.InputPort: ...
    def get_target_output_port(self) -> pydrake.systems.framework.OutputPort: ...

class SimIiwaDriver(pydrake.systems.framework.Diagram):
    AddToBuilder: ClassVar[nanobind.nb_func] = ...
    def __init__(self, driver_config: IiwaDriver, controller_plant: pydrake.multibody.plant.MultibodyPlant) -> None: ...

class ZeroForceDriver:
    def __init__(self, **kwargs) -> None: ...
    def __copy__(self) -> ZeroForceDriver: ...
    def __deepcopy__(self, arg: dict) -> ZeroForceDriver: ...
    @property
    def __fields__(self): ...
