Remove mjDSBL_PASSIVE, split it into mjDSBL_SPRING and mjDSBL_DAMPING.
PiperOrigin-RevId: 800870384 Change-Id: I273e0ceec090901e2620febb67e57914928e94bb
This commit is contained in:
committed by
Copybara-Service
parent
0eea5d6dbd
commit
b092563cab
@@ -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
|
||||
|
||||
+15
-14
@@ -54,21 +54,22 @@ typedef enum mjtDisableBit_ { // disable default feature bitflags
|
||||
mjDSBL_FRICTIONLOSS = 1<<2, // joint and tendon frictionloss constraints
|
||||
mjDSBL_LIMIT = 1<<3, // joint and tendon limit constraints
|
||||
mjDSBL_CONTACT = 1<<4, // contact constraints
|
||||
mjDSBL_PASSIVE = 1<<5, // passive forces
|
||||
mjDSBL_GRAVITY = 1<<6, // gravitational forces
|
||||
mjDSBL_CLAMPCTRL = 1<<7, // clamp control to specified range
|
||||
mjDSBL_WARMSTART = 1<<8, // warmstart constraint solver
|
||||
mjDSBL_FILTERPARENT = 1<<9, // remove collisions with parent body
|
||||
mjDSBL_ACTUATION = 1<<10, // apply actuation forces
|
||||
mjDSBL_REFSAFE = 1<<11, // integrator safety: make ref[0]>=2*timestep
|
||||
mjDSBL_SENSOR = 1<<12, // sensors
|
||||
mjDSBL_MIDPHASE = 1<<13, // mid-phase collision filtering
|
||||
mjDSBL_EULERDAMP = 1<<14, // implicit integration of joint damping in Euler integrator
|
||||
mjDSBL_AUTORESET = 1<<15, // automatic reset when numerical issues are detected
|
||||
mjDSBL_NATIVECCD = 1<<16, // native convex collision detection
|
||||
mjDSBL_ISLAND = 1<<17, // constraint island discovery
|
||||
mjDSBL_SPRING = 1<<5, // passive spring forces
|
||||
mjDSBL_DAMPER = 1<<6, // passive damping forces
|
||||
mjDSBL_GRAVITY = 1<<7, // gravitational forces
|
||||
mjDSBL_CLAMPCTRL = 1<<8, // clamp control to specified range
|
||||
mjDSBL_WARMSTART = 1<<9, // warmstart constraint solver
|
||||
mjDSBL_FILTERPARENT = 1<<10, // remove collisions with parent body
|
||||
mjDSBL_ACTUATION = 1<<11, // apply actuation forces
|
||||
mjDSBL_REFSAFE = 1<<12, // integrator safety: make ref[0]>=2*timestep
|
||||
mjDSBL_SENSOR = 1<<13, // sensors
|
||||
mjDSBL_MIDPHASE = 1<<14, // mid-phase collision filtering
|
||||
mjDSBL_EULERDAMP = 1<<15, // implicit integration of joint damping in Euler integrator
|
||||
mjDSBL_AUTORESET = 1<<16, // automatic reset when numerical issues are detected
|
||||
mjDSBL_NATIVECCD = 1<<17, // native convex collision detection
|
||||
mjDSBL_ISLAND = 1<<18, // constraint island discovery
|
||||
|
||||
mjNDISABLE = 18 // number of disable flags
|
||||
mjNDISABLE = 19 // number of disable flags
|
||||
} mjtDisableBit;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user