Repository: Genesis-Embodied-AI/Genesis
File: genesis/options/solvers.py (Python)

Code before:
        Integrator type. Current supported integrators are 'gs.integrator.Euler', 'gs.integrator.implicitfast' and
        'gs.integrator.approximate_implicitfast'. 'Euler' and 'implicitfast' are consistent with their Mujoco
        counterpart. 'approximate_implicitfast' is an even faster approximation of 'implicitfast', which avoid
        computing the inverse mass matrix twice by considering the first order correction terms of the implicit
        integration scheme systematically, including for computing the acceleration resulting from the constraints
        and external forces. Although this approximation is wrong in theory, it works resonably well in practice.
        Defaults to 'approximate_implicitfast'.
    IK_max_targets : int, optional
        Maximum number of IK targets. Increasing this doesn't affect IK solving speed, but will increase memory usage.
        Defaults to 6.
    constraint_solver : gs.constraint_solver, optional
        Constraint solver type. Current supported constraint solvers are 'gs.constraint_solver.CG' (conjugate gradient)
        and 'gs.constraint_solver.Newton' (Newton's method). Defaults to 'Newton'.
    iterations : int, optional
        Number of iterations for the constraint solver. Defaults to 50.
    tolerance : float, optional
        Tolerance for the constraint solver. Defaults to 1e-8.
    ls_iterations : int, optional
        Number of line search iterations for the constraint solver. Defaults to 50.
    ls_tolerance : float, optional
        Tolerance for the line search. Defaults to 1e-2.
    noslip_iterations : int, optional
        Number of iterations for the noslip solver. Defaults to 0. noslip is a post-processing step after the main solver.
        It is used to suppress slip/drift. The default setting 0 disables this solver.
        Recommended to set this value to 5 for manipulation tasks or when slip/drift is a big problem.
        It can make the solver slower and less stable.
    noslip_tolerance : float, optional
        Tolerance for the noslip solver. Defaults to 1e-6.
    sparse_solve : bool, optional
        Whether to exploit sparsity in the constraint system. Defaults to False.
    contact_resolve_time : float, optional
        Please note that this option will be deprecated in a future version. Use 'constraint_timeconst'
        instead.
    constraint_timeconst : float
        Lower-bound of the default time to resolve the constraint (2*dt). The smaller the value, the more stiff the
        constraint. This parameter is called 'timeconst' in Mujoco
        (https://mujoco.readthedocs.io/en/latest/modeling.html#solver-parameters). Defaults to 0.01.
    use_contact_island : bool, optional
        Whether to use contact island to speed up contact resolving. Defaults to False.
    use_hibernation : bool, optional
        Whether to enable hibernation. Defaults to False.
    hibernation_thresh_vel : float, optional
        Velocity threshold for hibernation. Defaults to 1e-3.
    hibernation_thresh_acc : float, optional
        Acceleration threshold for hibernation. Defaults to 1e-2.
    max_dynamic_constraints : int, optional
        Maximum number of dynamic constraints (like suction cup). Defaults to 8.
    use_gjk_collision: bool, optional
        Whether to use GJK for collision detection instead of MPR. Defaults to True.

    Warning

Review comment (performance):
I don't think we should say that. Maybe something like
```
This option should only be enabled if necessary because it is still experimental and it will slow down the simulation.
```

Code after:
        Integrator type. Current supported integrators are 'gs.integrator.Euler', 'gs.integrator.implicitfast' and
        'gs.integrator.approximate_implicitfast'. 'Euler' and 'implicitfast' are consistent with their Mujoco
        counterpart. 'approximate_implicitfast' is an even faster approximation of 'implicitfast', which avoid
        computing the inverse mass matrix twice by considering the first order correction terms of the implicit
        integration scheme systematically, including for computing the acceleration resulting from the constraints
        and external forces. Although this approximation is wrong in theory, it works resonably well in practice.
        Defaults to 'approximate_implicitfast'.
    IK_max_targets : int, optional
        Maximum number of IK targets. Increasing this doesn't affect IK solving speed, but will increase memory usage.
        Defaults to 6.
    constraint_solver : gs.constraint_solver, optional
        Constraint solver type. Current supported constraint solvers are 'gs.constraint_solver.CG' (conjugate gradient)
        and 'gs.constraint_solver.Newton' (Newton's method). Defaults to 'Newton'.
    iterations : int, optional
        Number of iterations for the constraint solver. Defaults to 50.
    tolerance : float, optional
        Tolerance for the constraint solver. Defaults to 1e-8.
    ls_iterations : int, optional
        Number of line search iterations for the constraint solver. Defaults to 50.
    ls_tolerance : float, optional
        Tolerance for the line search. Defaults to 1e-2.
    noslip_iterations : int, optional
        Number of iterations for the noslip solver. Defaults to 0 (disabled).
        noslip is a post-processing step after the main solver to suppress slip/drift.
        Recommended to set this value to 5 for manipulation tasks or when slip/drift is a big problem.
        This option should only be enabled if necessary because it is experimental and will slow down the simulation.
    noslip_tolerance : float, optional
        Tolerance for the noslip solver. Defaults to 1e-6.
    sparse_solve : bool, optional
        Whether to exploit sparsity in the constraint system. Defaults to False.
    contact_resolve_time : float, optional
        Please note that this option will be deprecated in a future version. Use 'constraint_timeconst'
        instead.
    constraint_timeconst : float
        Lower-bound of the default time to resolve the constraint (2*dt). The smaller the value, the more stiff the
        constraint. This parameter is called 'timeconst' in Mujoco
        (https://mujoco.readthedocs.io/en/latest/modeling.html#solver-parameters). Defaults to 0.01.
    use_contact_island : bool, optional
        Whether to use contact island to speed up contact resolving. Defaults to False.
    use_hibernation : bool, optional
        Whether to enable hibernation. Defaults to False.
    hibernation_thresh_vel : float, optional
        Velocity threshold for hibernation. Defaults to 1e-3.
    hibernation_thresh_acc : float, optional
        Acceleration threshold for hibernation. Defaults to 1e-2.
    max_dynamic_constraints : int, optional
        Maximum number of dynamic constraints (like suction cup). Defaults to 8.
    use_gjk_collision: bool, optional
        Whether to use GJK for collision detection instead of MPR. Defaults to True.

    Warning