RobotLocomotion / drake

Model-based design and verification for robotics.
https://drake.mit.edu
Other
3.17k stars 1.24k forks source link

[multibody] Should support joint-level dry friction / stiction? #18932

Open EricCousineau-TRI opened 1 year ago

EricCousineau-TRI commented 1 year ago

Is your feature request related to a problem? Please describe. Relates #6527

Per f2f w/ Ale, we most likely don't support joint-level dry friction, aside from damping (viscous friction). Seems confirmed by not seeing something relevant in current API, and per message here: https://github.com/RobotLocomotion/drake/blob/2467945ffa9b9afe3879bbbe1a975a40e5b57759/multibody/parsing/detail_urdf_parser.cc#L405-L407

Specs appear to support it:

Describe the solution you'd like Would be nice to at least simple dry friction in MultibodyPlant for both continuous-time and discrete-time plants / solvers.

Ideally, where viable, it would be nice to have Stribeck static / dynamic friction (only continuous-time?).

Describe alternatives you've considered As a workaround, I can implement my own simple dry stiction model as a separate applied generalized force that I will then feed that into the MbP. If want some level of accuracy, then I can use an implicit integrator.

Additional context This is for doing basic system-id, trying to estimate stiction at the joints.

\cc @AdityaBhat-TRI

EricCousineau-TRI commented 1 year ago

In the FWIW category, using a sigmoid like hyperbolic tangent seems "better" than arctan, at least for making the continuous-time integrator "happy":

def arctanh(y):
    u = -(y + 1) / (y - 1)
    x = np.log(u) / 2
    return x

def regularizer_tanh(s, *, m=0.95):
    """m: Desired value for r(1)"""
    c = arctanh(m)
    value = np.tanh(c * s)
    return value

Still (slowly) doing basic sys id and very simple simulation experiments on compensation.

RussTedrake commented 1 year ago

fwiw -- i just ran into this, too. Specifically I was hoping to have joint stiction (via the urdf/joint friction element) in SAP, and found the same message in the urdf parser.

EricCousineau-TRI commented 1 year ago

From having tried out control with stiction + damping compensation on the plant, these terms do seem critical.

Is it possible to have these also as parameters in the plant? \cc @joemasterjohn

nepfaff commented 4 months ago

Supporting joint-level dry friction would be very useful for more accurate manipulator modelling