import collections.abc
import enum
import nanobind
import pydrake.geometry
import pydrake.multibody.math
import pydrake.multibody.plant
import pydrake.multibody.tree
import pydrake.solvers
import pydrake.systems.framework
import pydrake.trajectories
from _typeshed import Incomplete
from typing import Callable, ClassVar, overload

class CalcGridPointsOptions:
    max_err: Incomplete
    max_iter: Incomplete
    max_seg_length: Incomplete
    min_points: Incomplete
    def __init__(self, **kwargs) -> None: ...
    def __copy__(self) -> CalcGridPointsOptions: ...
    def __deepcopy__(self, arg: dict) -> CalcGridPointsOptions: ...
    @property
    def __fields__(self): ...

class CentroidalMomentumConstraint(pydrake.solvers.Constraint):
    def __init__(self, plant: pydrake.multibody.plant.MultibodyPlant_TAutoDiffXdU, model_instances: collections.abc.Sequence[pydrake.multibody.tree.ModelInstanceIndex] | None, plant_context: pydrake.systems.framework.Context_TAutoDiffXdU, angular_only: bool) -> None: ...

class ContactWrench:
    def __init__(self, *args, **kwargs) -> None: ...
    @property
    def F_Cb_W(self) -> pydrake.multibody.math.SpatialForce: ...
    @property
    def bodyA_index(self) -> pydrake.multibody.tree.BodyIndex: ...
    @property
    def bodyB_index(self) -> pydrake.multibody.tree.BodyIndex: ...
    @property
    def p_WCb_W(self): ...

class ContactWrenchFromForceInWorldFrameEvaluator(pydrake.solvers.EvaluatorBase):
    def __init__(self, plant: pydrake.multibody.plant.MultibodyPlant_TAutoDiffXdU, context: pydrake.systems.framework.Context_TAutoDiffXdU, geometry_id_pair: tuple[pydrake.geometry.GeometryId, pydrake.geometry.GeometryId]) -> None: ...

class QuaternionEulerIntegrationConstraint(pydrake.solvers.Constraint):
    def __init__(self, allow_quaternion_negation: bool) -> None: ...
    def ComposeVariable(self, *args, **kwargs): ...
    def allow_quaternion_negation(self) -> bool: ...

class SpatialVelocityConstraint(pydrake.solvers.Constraint):
    class AngularVelocityBounds:
        magnitude_lower: float
        magnitude_upper: float
        reference_direction: Incomplete
        theta_bound: float
        def __init__(self) -> None: ...
    def __init__(self, plant: pydrake.multibody.plant.MultibodyPlant_TAutoDiffXdU, frameA: pydrake.multibody.tree.Frame_TAutoDiffXdU, v_AC_lower, v_AC_upper, frameB: pydrake.multibody.tree.Frame_TAutoDiffXdU, p_BCo, plant_context: pydrake.systems.framework.Context_TAutoDiffXdU, w_AC_bounds: SpatialVelocityConstraint.AngularVelocityBounds | None = ...) -> None: ...

class StaticEquilibriumProblem:
    def __init__(self, plant: pydrake.multibody.plant.MultibodyPlant_TAutoDiffXdU, context: pydrake.systems.framework.Context_TAutoDiffXdU, ignored_collision_pairs: collections.abc.Set[tuple[pydrake.geometry.GeometryId, pydrake.geometry.GeometryId]]) -> None: ...
    def GetContactWrenchSolution(self, result: pydrake.solvers.MathematicalProgramResult) -> list[ContactWrench]: ...
    def UpdateComplementarityTolerance(self, tol: float) -> None: ...
    def get_mutable_prog(self) -> pydrake.solvers.MathematicalProgram: ...
    def prog(self) -> pydrake.solvers.MathematicalProgram: ...
    def q_vars(self, *args, **kwargs): ...
    def u_vars(self, *args, **kwargs): ...

class Toppra:
    CalcGridPoints: ClassVar[nanobind.nb_func] = ...
    def __init__(self, path: pydrake.trajectories.Trajectory, plant: pydrake.multibody.plant.MultibodyPlant, gridpoints) -> None: ...
    @overload
    def AddFrameAccelerationLimit(self, constraint_frame: pydrake.multibody.tree.Frame, lower_limit, upper_limit, discretization: ToppraDiscretization = ...) -> tuple[pydrake.solvers.BindingTLinearConstraintU, pydrake.solvers.BindingTLinearConstraintU]: ...
    @overload
    def AddFrameAccelerationLimit(self, constraint_frame: pydrake.multibody.tree.Frame, lower_limit: pydrake.trajectories.Trajectory, upper_limit: pydrake.trajectories.Trajectory, discretization: ToppraDiscretization = ...) -> tuple[pydrake.solvers.BindingTLinearConstraintU, pydrake.solvers.BindingTLinearConstraintU]: ...
    @overload
    def AddFrameTranslationalSpeedLimit(self, constraint_frame: pydrake.multibody.tree.Frame, upper_limit: float) -> pydrake.solvers.BindingTBoundingBoxConstraintU: ...
    @overload
    def AddFrameTranslationalSpeedLimit(self, constraint_frame: pydrake.multibody.tree.Frame, upper_limit: pydrake.trajectories.Trajectory) -> pydrake.solvers.BindingTBoundingBoxConstraintU: ...
    def AddFrameVelocityLimit(self, constraint_frame: pydrake.multibody.tree.Frame, lower_limit, upper_limit) -> pydrake.solvers.BindingTBoundingBoxConstraintU: ...
    def AddJointAccelerationLimit(self, lower_limit, upper_limit, discretization: ToppraDiscretization = ...) -> tuple[pydrake.solvers.BindingTLinearConstraintU, pydrake.solvers.BindingTLinearConstraintU]: ...
    def AddJointTorqueLimit(self, lower_limit, upper_limit, discretization: ToppraDiscretization = ...) -> tuple[pydrake.solvers.BindingTLinearConstraintU, pydrake.solvers.BindingTLinearConstraintU]: ...
    def AddJointVelocityLimit(self, lower_limit, upper_limit) -> pydrake.solvers.BindingTBoundingBoxConstraintU: ...
    def SolvePathParameterization(self, s_dot_start: float = ..., s_dot_end: float = ...) -> pydrake.trajectories.PiecewisePolynomial | None: ...
    def constraint_relaxation(self) -> float: ...
    def set_constraint_relaxation(self, relaxation: float) -> None: ...

class ToppraDiscretization(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] = ...
    kCollocation: ClassVar[ToppraDiscretization] = ...
    kInterpolation: ClassVar[ToppraDiscretization] = ...
    __nb_enum__: ClassVar[PyCapsule] = ...
