Add group support to mjcPhysics equivalents for sites, geoms, actuators, and joints.

PiperOrigin-RevId: 781945497
Change-Id: I5c409f05e6bae33c181a51c273f260daea6004fc
This commit is contained in:
Sam Haves
2025-07-11 05:36:35 -07:00
committed by Copybara-Service
parent bbb265da4a
commit 3473e4e451
14 changed files with 234 additions and 24 deletions
@@ -40,7 +40,7 @@ class SdfAssetPath;
/// \class MjcPhysicsJointAPI
///
/// API describing a Mujoco joint.
/// API describing a MuJoCo joint.
///
/// For any described attribute \em Fallback \em Value or \em Allowed \em Values
/// below that are text/tokens, the actual token is published and defined in
@@ -146,6 +146,30 @@ class MjcPhysicsJointAPI : public UsdAPISchemaBase {
MJCPHYSICS_API
const TfType &_GetTfType() const override;
public:
// --------------------------------------------------------------------- //
// GROUP
// --------------------------------------------------------------------- //
/// Integer MuJoCo group to which the joint belongs.
///
/// | ||
/// | -- | -- |
/// | Declaration | `uniform int mjc:group = 0` |
/// | C++ Type | int |
/// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
/// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
MJCPHYSICS_API
UsdAttribute GetGroupAttr() const;
/// See GetGroupAttr(), 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 CreateGroupAttr(VtValue const &defaultValue = VtValue(),
bool writeSparsely = false) const;
public:
// --------------------------------------------------------------------- //
// MJCSPRINGDAMPER