from cmvr.common import geometry_pb2 as _geometry_pb2
from cmvr.config import joint_limits_config_pb2 as _joint_limits_config_pb2
from cmvr.config import lawba_ik_config_pb2 as _lawba_ik_config_pb2
from cmvr.config import pinocchio_dls_ik_config_pb2 as _pinocchio_dls_ik_config_pb2
from cmvr.config import pinocchio_qp_ik_config_pb2 as _pinocchio_qp_ik_config_pb2
from cmvr.config import srs_ik_config_pb2 as _srs_ik_config_pb2
from google.protobuf.internal import containers as _containers
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from collections.abc import Iterable as _Iterable, Mapping as _Mapping
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union

DESCRIPTOR: _descriptor.FileDescriptor

class ToppraPathType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
    __slots__ = ()
    TOPPRA_PATH_TYPE_UNKNOWN: _ClassVar[ToppraPathType]
    TOPPRA_PATH_TYPE_LINEAR: _ClassVar[ToppraPathType]
    TOPPRA_PATH_TYPE_CUBIC_HERMITE: _ClassVar[ToppraPathType]
    TOPPRA_PATH_TYPE_QUINTIC: _ClassVar[ToppraPathType]
    TOPPRA_PATH_TYPE_NATURAL: _ClassVar[ToppraPathType]

class VendorRobotArmBrand(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
    __slots__ = ()
    VENDOR_ROBOT_ARM_BRAND_UNKNOWN: _ClassVar[VendorRobotArmBrand]
    VENDOR_ROBOT_ARM_BRAND_AUBO_ARM: _ClassVar[VendorRobotArmBrand]
    VENDOR_ROBOT_ARM_BRAND_HUAYAN_ARM: _ClassVar[VendorRobotArmBrand]
TOPPRA_PATH_TYPE_UNKNOWN: ToppraPathType
TOPPRA_PATH_TYPE_LINEAR: ToppraPathType
TOPPRA_PATH_TYPE_CUBIC_HERMITE: ToppraPathType
TOPPRA_PATH_TYPE_QUINTIC: ToppraPathType
TOPPRA_PATH_TYPE_NATURAL: ToppraPathType
VENDOR_ROBOT_ARM_BRAND_UNKNOWN: VendorRobotArmBrand
VENDOR_ROBOT_ARM_BRAND_AUBO_ARM: VendorRobotArmBrand
VENDOR_ROBOT_ARM_BRAND_HUAYAN_ARM: VendorRobotArmBrand

class MotorRobotArmBackendConfig(_message.Message):
    __slots__ = ("motor_system_id", "dof", "joint_names", "upd_freq", "buffer_size", "default_vel", "default_acc", "motor_group_ids")
    MOTOR_SYSTEM_ID_FIELD_NUMBER: _ClassVar[int]
    DOF_FIELD_NUMBER: _ClassVar[int]
    JOINT_NAMES_FIELD_NUMBER: _ClassVar[int]
    UPD_FREQ_FIELD_NUMBER: _ClassVar[int]
    BUFFER_SIZE_FIELD_NUMBER: _ClassVar[int]
    DEFAULT_VEL_FIELD_NUMBER: _ClassVar[int]
    DEFAULT_ACC_FIELD_NUMBER: _ClassVar[int]
    MOTOR_GROUP_IDS_FIELD_NUMBER: _ClassVar[int]
    motor_system_id: str
    dof: int
    joint_names: _containers.RepeatedScalarFieldContainer[str]
    upd_freq: int
    buffer_size: int
    default_vel: float
    default_acc: float
    motor_group_ids: _containers.RepeatedScalarFieldContainer[str]
    def __init__(self, motor_system_id: _Optional[str] = ..., dof: _Optional[int] = ..., joint_names: _Optional[_Iterable[str]] = ..., upd_freq: _Optional[int] = ..., buffer_size: _Optional[int] = ..., default_vel: _Optional[float] = ..., default_acc: _Optional[float] = ..., motor_group_ids: _Optional[_Iterable[str]] = ...) -> None: ...

class VendorRobotArmBackendConfig(_message.Message):
    __slots__ = ("brand", "ip", "port", "model", "dof", "joint_names", "base_frame", "tool_frame", "username", "password")
    BRAND_FIELD_NUMBER: _ClassVar[int]
    IP_FIELD_NUMBER: _ClassVar[int]
    PORT_FIELD_NUMBER: _ClassVar[int]
    MODEL_FIELD_NUMBER: _ClassVar[int]
    DOF_FIELD_NUMBER: _ClassVar[int]
    JOINT_NAMES_FIELD_NUMBER: _ClassVar[int]
    BASE_FRAME_FIELD_NUMBER: _ClassVar[int]
    TOOL_FRAME_FIELD_NUMBER: _ClassVar[int]
    USERNAME_FIELD_NUMBER: _ClassVar[int]
    PASSWORD_FIELD_NUMBER: _ClassVar[int]
    brand: VendorRobotArmBrand
    ip: str
    port: int
    model: str
    dof: int
    joint_names: _containers.RepeatedScalarFieldContainer[str]
    base_frame: str
    tool_frame: str
    username: str
    password: str
    def __init__(self, brand: _Optional[_Union[VendorRobotArmBrand, str]] = ..., ip: _Optional[str] = ..., port: _Optional[int] = ..., model: _Optional[str] = ..., dof: _Optional[int] = ..., joint_names: _Optional[_Iterable[str]] = ..., base_frame: _Optional[str] = ..., tool_frame: _Optional[str] = ..., username: _Optional[str] = ..., password: _Optional[str] = ...) -> None: ...

class QpJointLimitAvoidanceConfig(_message.Message):
    __slots__ = ("enable", "margin_ratio", "gain", "max_push", "weight")
    ENABLE_FIELD_NUMBER: _ClassVar[int]
    MARGIN_RATIO_FIELD_NUMBER: _ClassVar[int]
    GAIN_FIELD_NUMBER: _ClassVar[int]
    MAX_PUSH_FIELD_NUMBER: _ClassVar[int]
    WEIGHT_FIELD_NUMBER: _ClassVar[int]
    enable: bool
    margin_ratio: float
    gain: float
    max_push: float
    weight: float
    def __init__(self, enable: _Optional[bool] = ..., margin_ratio: _Optional[float] = ..., gain: _Optional[float] = ..., max_push: _Optional[float] = ..., weight: _Optional[float] = ...) -> None: ...

class CartesianVelocityQpConfig(_message.Message):
    __slots__ = ("joint_limits", "twist_tracking_weight", "qdot_regularization", "prev_qdot_regularization", "solver_eps", "joint_limit_avoidance")
    JOINT_LIMITS_FIELD_NUMBER: _ClassVar[int]
    TWIST_TRACKING_WEIGHT_FIELD_NUMBER: _ClassVar[int]
    QDOT_REGULARIZATION_FIELD_NUMBER: _ClassVar[int]
    PREV_QDOT_REGULARIZATION_FIELD_NUMBER: _ClassVar[int]
    SOLVER_EPS_FIELD_NUMBER: _ClassVar[int]
    JOINT_LIMIT_AVOIDANCE_FIELD_NUMBER: _ClassVar[int]
    joint_limits: _joint_limits_config_pb2.JointLimitsConfig
    twist_tracking_weight: _geometry_pb2.Vec6
    qdot_regularization: float
    prev_qdot_regularization: float
    solver_eps: float
    joint_limit_avoidance: QpJointLimitAvoidanceConfig
    def __init__(self, joint_limits: _Optional[_Union[_joint_limits_config_pb2.JointLimitsConfig, _Mapping]] = ..., twist_tracking_weight: _Optional[_Union[_geometry_pb2.Vec6, _Mapping]] = ..., qdot_regularization: _Optional[float] = ..., prev_qdot_regularization: _Optional[float] = ..., solver_eps: _Optional[float] = ..., joint_limit_avoidance: _Optional[_Union[QpJointLimitAvoidanceConfig, _Mapping]] = ...) -> None: ...

class SpeedLPlannerConfig(_message.Message):
    __slots__ = ("linear_velocity_max", "linear_acceleration_max", "linear_jerk_max", "angular_velocity_max", "angular_acceleration_max", "angular_jerk_max", "joint_acceleration_max", "linear_target_replan_threshold", "angular_target_replan_threshold", "linear_reverse_cos_threshold", "linear_reverse_switch_speed_threshold", "normal_direction_deviation_deg", "mild_direction_deviation_deg", "severe_direction_deviation_deg", "linear_min_speed_ratio", "qp")
    LINEAR_VELOCITY_MAX_FIELD_NUMBER: _ClassVar[int]
    LINEAR_ACCELERATION_MAX_FIELD_NUMBER: _ClassVar[int]
    LINEAR_JERK_MAX_FIELD_NUMBER: _ClassVar[int]
    ANGULAR_VELOCITY_MAX_FIELD_NUMBER: _ClassVar[int]
    ANGULAR_ACCELERATION_MAX_FIELD_NUMBER: _ClassVar[int]
    ANGULAR_JERK_MAX_FIELD_NUMBER: _ClassVar[int]
    JOINT_ACCELERATION_MAX_FIELD_NUMBER: _ClassVar[int]
    LINEAR_TARGET_REPLAN_THRESHOLD_FIELD_NUMBER: _ClassVar[int]
    ANGULAR_TARGET_REPLAN_THRESHOLD_FIELD_NUMBER: _ClassVar[int]
    LINEAR_REVERSE_COS_THRESHOLD_FIELD_NUMBER: _ClassVar[int]
    LINEAR_REVERSE_SWITCH_SPEED_THRESHOLD_FIELD_NUMBER: _ClassVar[int]
    NORMAL_DIRECTION_DEVIATION_DEG_FIELD_NUMBER: _ClassVar[int]
    MILD_DIRECTION_DEVIATION_DEG_FIELD_NUMBER: _ClassVar[int]
    SEVERE_DIRECTION_DEVIATION_DEG_FIELD_NUMBER: _ClassVar[int]
    LINEAR_MIN_SPEED_RATIO_FIELD_NUMBER: _ClassVar[int]
    QP_FIELD_NUMBER: _ClassVar[int]
    linear_velocity_max: float
    linear_acceleration_max: float
    linear_jerk_max: float
    angular_velocity_max: float
    angular_acceleration_max: float
    angular_jerk_max: float
    joint_acceleration_max: _containers.RepeatedScalarFieldContainer[float]
    linear_target_replan_threshold: float
    angular_target_replan_threshold: float
    linear_reverse_cos_threshold: float
    linear_reverse_switch_speed_threshold: float
    normal_direction_deviation_deg: float
    mild_direction_deviation_deg: float
    severe_direction_deviation_deg: float
    linear_min_speed_ratio: float
    qp: CartesianVelocityQpConfig
    def __init__(self, linear_velocity_max: _Optional[float] = ..., linear_acceleration_max: _Optional[float] = ..., linear_jerk_max: _Optional[float] = ..., angular_velocity_max: _Optional[float] = ..., angular_acceleration_max: _Optional[float] = ..., angular_jerk_max: _Optional[float] = ..., joint_acceleration_max: _Optional[_Iterable[float]] = ..., linear_target_replan_threshold: _Optional[float] = ..., angular_target_replan_threshold: _Optional[float] = ..., linear_reverse_cos_threshold: _Optional[float] = ..., linear_reverse_switch_speed_threshold: _Optional[float] = ..., normal_direction_deviation_deg: _Optional[float] = ..., mild_direction_deviation_deg: _Optional[float] = ..., severe_direction_deviation_deg: _Optional[float] = ..., linear_min_speed_ratio: _Optional[float] = ..., qp: _Optional[_Union[CartesianVelocityQpConfig, _Mapping]] = ...) -> None: ...

class CartesianVelocityControllerConfig(_message.Message):
    __slots__ = ("control_period_s", "stop_twist_norm", "stop_command_velocity_norm", "stop_measured_velocity_norm")
    CONTROL_PERIOD_S_FIELD_NUMBER: _ClassVar[int]
    STOP_TWIST_NORM_FIELD_NUMBER: _ClassVar[int]
    STOP_COMMAND_VELOCITY_NORM_FIELD_NUMBER: _ClassVar[int]
    STOP_MEASURED_VELOCITY_NORM_FIELD_NUMBER: _ClassVar[int]
    control_period_s: float
    stop_twist_norm: float
    stop_command_velocity_norm: float
    stop_measured_velocity_norm: float
    def __init__(self, control_period_s: _Optional[float] = ..., stop_twist_norm: _Optional[float] = ..., stop_command_velocity_norm: _Optional[float] = ..., stop_measured_velocity_norm: _Optional[float] = ...) -> None: ...

class ToppraJointMotionPlannerConfig(_message.Message):
    __slots__ = ("path_type", "sample_period_s", "grid_size", "high_grid_size")
    PATH_TYPE_FIELD_NUMBER: _ClassVar[int]
    SAMPLE_PERIOD_S_FIELD_NUMBER: _ClassVar[int]
    GRID_SIZE_FIELD_NUMBER: _ClassVar[int]
    HIGH_GRID_SIZE_FIELD_NUMBER: _ClassVar[int]
    path_type: ToppraPathType
    sample_period_s: float
    grid_size: int
    high_grid_size: int
    def __init__(self, path_type: _Optional[_Union[ToppraPathType, str]] = ..., sample_period_s: _Optional[float] = ..., grid_size: _Optional[int] = ..., high_grid_size: _Optional[int] = ...) -> None: ...

class MoveJConfig(_message.Message):
    __slots__ = ("toppra_joint_motion_planner",)
    TOPPRA_JOINT_MOTION_PLANNER_FIELD_NUMBER: _ClassVar[int]
    toppra_joint_motion_planner: ToppraJointMotionPlannerConfig
    def __init__(self, toppra_joint_motion_planner: _Optional[_Union[ToppraJointMotionPlannerConfig, _Mapping]] = ...) -> None: ...

class MoveLPlannerConfig(_message.Message):
    __slots__ = ("sample_period_s", "position_gain", "rotation_gain", "qp")
    SAMPLE_PERIOD_S_FIELD_NUMBER: _ClassVar[int]
    POSITION_GAIN_FIELD_NUMBER: _ClassVar[int]
    ROTATION_GAIN_FIELD_NUMBER: _ClassVar[int]
    QP_FIELD_NUMBER: _ClassVar[int]
    sample_period_s: float
    position_gain: float
    rotation_gain: float
    qp: CartesianVelocityQpConfig
    def __init__(self, sample_period_s: _Optional[float] = ..., position_gain: _Optional[float] = ..., rotation_gain: _Optional[float] = ..., qp: _Optional[_Union[CartesianVelocityQpConfig, _Mapping]] = ...) -> None: ...

class MoveLConfig(_message.Message):
    __slots__ = ("pinocchio_dls_cartesian_motion_planner", "pinocchio_qp_cartesian_motion_planner")
    PINOCCHIO_DLS_CARTESIAN_MOTION_PLANNER_FIELD_NUMBER: _ClassVar[int]
    PINOCCHIO_QP_CARTESIAN_MOTION_PLANNER_FIELD_NUMBER: _ClassVar[int]
    pinocchio_dls_cartesian_motion_planner: MoveLPlannerConfig
    pinocchio_qp_cartesian_motion_planner: MoveLPlannerConfig
    def __init__(self, pinocchio_dls_cartesian_motion_planner: _Optional[_Union[MoveLPlannerConfig, _Mapping]] = ..., pinocchio_qp_cartesian_motion_planner: _Optional[_Union[MoveLPlannerConfig, _Mapping]] = ...) -> None: ...

class SpeedLControllerConfig(_message.Message):
    __slots__ = ("cartesian_velocity_controller",)
    CARTESIAN_VELOCITY_CONTROLLER_FIELD_NUMBER: _ClassVar[int]
    cartesian_velocity_controller: CartesianVelocityControllerConfig
    def __init__(self, cartesian_velocity_controller: _Optional[_Union[CartesianVelocityControllerConfig, _Mapping]] = ...) -> None: ...

class SpeedLConfig(_message.Message):
    __slots__ = ("pinocchio_dls_cartesian_motion_planner", "pinocchio_qp_cartesian_motion_planner", "speed_l_controller")
    PINOCCHIO_DLS_CARTESIAN_MOTION_PLANNER_FIELD_NUMBER: _ClassVar[int]
    PINOCCHIO_QP_CARTESIAN_MOTION_PLANNER_FIELD_NUMBER: _ClassVar[int]
    SPEED_L_CONTROLLER_FIELD_NUMBER: _ClassVar[int]
    pinocchio_dls_cartesian_motion_planner: SpeedLPlannerConfig
    pinocchio_qp_cartesian_motion_planner: SpeedLPlannerConfig
    speed_l_controller: SpeedLControllerConfig
    def __init__(self, pinocchio_dls_cartesian_motion_planner: _Optional[_Union[SpeedLPlannerConfig, _Mapping]] = ..., pinocchio_qp_cartesian_motion_planner: _Optional[_Union[SpeedLPlannerConfig, _Mapping]] = ..., speed_l_controller: _Optional[_Union[SpeedLControllerConfig, _Mapping]] = ...) -> None: ...

class ArmKinematicsConfig(_message.Message):
    __slots__ = ("pinocchio_dls_ik_solver", "pinocchio_qp_ik_solver", "srs_ik_solver", "lawba_ik_solver")
    PINOCCHIO_DLS_IK_SOLVER_FIELD_NUMBER: _ClassVar[int]
    PINOCCHIO_QP_IK_SOLVER_FIELD_NUMBER: _ClassVar[int]
    SRS_IK_SOLVER_FIELD_NUMBER: _ClassVar[int]
    LAWBA_IK_SOLVER_FIELD_NUMBER: _ClassVar[int]
    pinocchio_dls_ik_solver: _pinocchio_dls_ik_config_pb2.PinocchioDlsIKConfig
    pinocchio_qp_ik_solver: _pinocchio_qp_ik_config_pb2.PinocchioQpIKConfig
    srs_ik_solver: _srs_ik_config_pb2.SrsIKConfig
    lawba_ik_solver: _lawba_ik_config_pb2.LawbaIKConfig
    def __init__(self, pinocchio_dls_ik_solver: _Optional[_Union[_pinocchio_dls_ik_config_pb2.PinocchioDlsIKConfig, _Mapping]] = ..., pinocchio_qp_ik_solver: _Optional[_Union[_pinocchio_qp_ik_config_pb2.PinocchioQpIKConfig, _Mapping]] = ..., srs_ik_solver: _Optional[_Union[_srs_ik_config_pb2.SrsIKConfig, _Mapping]] = ..., lawba_ik_solver: _Optional[_Union[_lawba_ik_config_pb2.LawbaIKConfig, _Mapping]] = ...) -> None: ...

class ArmMotionConfig(_message.Message):
    __slots__ = ("move_j", "move_l", "speed_l")
    MOVE_J_FIELD_NUMBER: _ClassVar[int]
    MOVE_L_FIELD_NUMBER: _ClassVar[int]
    SPEED_L_FIELD_NUMBER: _ClassVar[int]
    move_j: MoveJConfig
    move_l: MoveLConfig
    speed_l: SpeedLConfig
    def __init__(self, move_j: _Optional[_Union[MoveJConfig, _Mapping]] = ..., move_l: _Optional[_Union[MoveLConfig, _Mapping]] = ..., speed_l: _Optional[_Union[SpeedLConfig, _Mapping]] = ...) -> None: ...

class RobotArmConfig(_message.Message):
    __slots__ = ("id", "motor", "vendor", "kinematics", "motion")
    ID_FIELD_NUMBER: _ClassVar[int]
    MOTOR_FIELD_NUMBER: _ClassVar[int]
    VENDOR_FIELD_NUMBER: _ClassVar[int]
    KINEMATICS_FIELD_NUMBER: _ClassVar[int]
    MOTION_FIELD_NUMBER: _ClassVar[int]
    id: str
    motor: MotorRobotArmBackendConfig
    vendor: VendorRobotArmBackendConfig
    kinematics: ArmKinematicsConfig
    motion: ArmMotionConfig
    def __init__(self, id: _Optional[str] = ..., motor: _Optional[_Union[MotorRobotArmBackendConfig, _Mapping]] = ..., vendor: _Optional[_Union[VendorRobotArmBackendConfig, _Mapping]] = ..., kinematics: _Optional[_Union[ArmKinematicsConfig, _Mapping]] = ..., motion: _Optional[_Union[ArmMotionConfig, _Mapping]] = ...) -> None: ...

class ArmConfig(_message.Message):
    __slots__ = ("robot_arms",)
    ROBOT_ARMS_FIELD_NUMBER: _ClassVar[int]
    robot_arms: _containers.RepeatedCompositeFieldContainer[RobotArmConfig]
    def __init__(self, robot_arms: _Optional[_Iterable[_Union[RobotArmConfig, _Mapping]]] = ...) -> None: ...

class ArmRootConfig(_message.Message):
    __slots__ = ("arm",)
    ARM_FIELD_NUMBER: _ClassVar[int]
    arm: ArmConfig
    def __init__(self, arm: _Optional[_Union[ArmConfig, _Mapping]] = ...) -> None: ...
