Skip to content

raisim::MaterialPairProperties ​

struct · #include <raisim/Materials.hpp>

Contact properties of a pair of materials.

Constructors & destructor ​

MaterialPairProperties ​

cpp
MaterialPairProperties() = default
cpp
MaterialPairProperties(double c_f_, double c_r_, double r_th_)

The static friction coefficient equals c_f_ and its transition speed is 1 m/s.

Parameters

ParameterDescription
c_f_ (in)friction coefficient
c_r_ (in)restitution coefficient
r_th_ (in)restitution threshold velocity (m/s)
cpp
MaterialPairProperties(
    double c_f_,
    double c_r_,
    double r_th_,
    double c_sf_,
    double v_sf_)

Parameters

ParameterDescription
c_f_ (in)dynamic friction coefficient
c_r_ (in)restitution coefficient
r_th_ (in)restitution threshold velocity (m/s)
c_sf_ (in)static friction coefficient
v_sf_ (in)static friction transition speed (m/s), see setStaticFrictionVelocityThreshold()
cpp
MaterialPairProperties(
    double c_f_,
    double c_r_,
    double r_th_,
    double c_sf_,
    double v_sf_,
    double c_rf_,
    double c_spf_)

Parameters

ParameterDescription
c_f_ (in)dynamic friction coefficient
c_r_ (in)restitution coefficient
r_th_ (in)restitution threshold velocity (m/s)
c_sf_ (in)static friction coefficient
v_sf_ (in)static friction transition speed (m/s)
c_rf_ (in)rolling friction coefficient
c_spf_ (in)spinning friction coefficient

Public member functions ​

setStaticFrictionVelocityThreshold ​

cpp
void setStaticFrictionVelocityThreshold(double threshold)

Sets the transition speed and its reciprocal together. A non-positive or non-finite threshold disables the static-friction blend rather than storing 1/0 = inf in the material table, where it would propagate through copies, checkpoints and XML export.

Parameters

ParameterDescription
threshold (in)transition speed (m/s)

Public attributes ​

c_f ​

cpp
double c_f

Coefficient of friction.

c_r ​

cpp
double c_r

Coefficient of restitution.

r_th ​

cpp
double r_th

Restitution threshold velocity (m/s).

c_static_f ​

cpp
double c_static_f

Static friction coefficient.

v_static_speed ​

cpp
double v_static_speed

Static friction transition speed (m/s). Set it with setStaticFrictionVelocityThreshold().

v_static_speed_inv ​

cpp
double v_static_speed_inv

Inverse of static friction transition speed. Zero when there is no transition band.

c_rolling_f ​

cpp
double c_rolling_f

Rolling friction coefficient. Zero keeps the standard contact solver path.

c_spinning_f ​

cpp
double c_spinning_f

Spinning friction coefficient. Zero keeps the standard contact solver path.

RaiSim — physics for robotics and AI.