Remove mjDSBL_PASSIVE, split it into mjDSBL_SPRING and mjDSBL_DAMPING.

PiperOrigin-RevId: 800870384
Change-Id: I273e0ceec090901e2620febb67e57914928e94bb
This commit is contained in:
Yuval Tassa
2025-08-29 06:05:18 -07:00
committed by Copybara-Service
parent 0eea5d6dbd
commit b092563cab
39 changed files with 455 additions and 289 deletions
@@ -915,28 +915,51 @@ class MjcPhysicsSceneAPI : public UsdAPISchemaBase {
public:
// --------------------------------------------------------------------- //
// PASSIVEFLAG
// SPRINGFLAG
// --------------------------------------------------------------------- //
/// Enables the simulation of joint and tendon spring-dampers, fluid dynamics
/// forces, and custom passive forces.
/// Enables the simulation of joint and tendon springs.
///
/// | ||
/// | -- | -- |
/// | Declaration | `uniform bool mjc:flag:passive = 1` |
/// | Declaration | `uniform bool mjc:flag:spring = 1` |
/// | C++ Type | bool |
/// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
/// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
MJCPHYSICS_API
UsdAttribute GetPassiveFlagAttr() const;
UsdAttribute GetSpringFlagAttr() const;
/// See GetPassiveFlagAttr(), and also
/// See GetSpringFlagAttr(), and also
/// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
/// If specified, author \p defaultValue as the attribute's default,
/// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
/// the default for \p writeSparsely is \c false.
MJCPHYSICS_API
UsdAttribute CreatePassiveFlagAttr(VtValue const& defaultValue = VtValue(),
bool writeSparsely = false) const;
UsdAttribute CreateSpringFlagAttr(VtValue const& defaultValue = VtValue(),
bool writeSparsely = false) const;
public:
// --------------------------------------------------------------------- //
// DAMPERFLAG
// --------------------------------------------------------------------- //
/// Enables the simulation of joint and tendon dampers.
///
/// | ||
/// | -- | -- |
/// | Declaration | `uniform bool mjc:flag:damper = 1` |
/// | C++ Type | bool |
/// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
/// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
MJCPHYSICS_API
UsdAttribute GetDamperFlagAttr() const;
/// See GetDamperFlagAttr(), and also
/// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
/// If specified, author \p defaultValue as the attribute's default,
/// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
/// the default for \p writeSparsely is \c false.
MJCPHYSICS_API
UsdAttribute CreateDamperFlagAttr(VtValue const& defaultValue = VtValue(),
bool writeSparsely = false) const;
public:
// --------------------------------------------------------------------- //
@@ -302,6 +302,10 @@ struct MjcPhysicsTokensType {
///
/// MjcPhysicsSceneAPI
const TfToken mjcFlagContact;
/// \brief "mjc:flag:damper"
///
/// MjcPhysicsSceneAPI
const TfToken mjcFlagDamper;
/// \brief "mjc:flag:energy"
///
/// MjcPhysicsSceneAPI
@@ -358,10 +362,6 @@ struct MjcPhysicsTokensType {
///
/// MjcPhysicsSceneAPI
const TfToken mjcFlagOverride;
/// \brief "mjc:flag:passive"
///
/// MjcPhysicsSceneAPI
const TfToken mjcFlagPassive;
/// \brief "mjc:flag:refsafe"
///
/// MjcPhysicsSceneAPI
@@ -370,6 +370,10 @@ struct MjcPhysicsTokensType {
///
/// MjcPhysicsSceneAPI
const TfToken mjcFlagSensor;
/// \brief "mjc:flag:spring"
///
/// MjcPhysicsSceneAPI
const TfToken mjcFlagSpring;
/// \brief "mjc:flag:warmstart"
///
/// MjcPhysicsSceneAPI