Skip to content

Commit 11e695b

Browse files
havesscopybara-github
authored andcommitted
Rename MjcTransmission to MjcActuator in mjcPhysics schema.
PiperOrigin-RevId: 782352356 Change-Id: I4b74e3131b0fed925c506742c22038231f848909
1 parent 3473e4e commit 11e695b

File tree

12 files changed

+243
-250
lines changed

12 files changed

+243
-250
lines changed

include/mujoco/experimental/usd/mjcPhysics/transmission.h renamed to include/mujoco/experimental/usd/mjcPhysics/actuator.h

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef MJCPHYSICS_GENERATED_TRANSMISSION_H
16-
#define MJCPHYSICS_GENERATED_TRANSMISSION_H
15+
#ifndef MJCPHYSICS_GENERATED_ACTUATOR_H
16+
#define MJCPHYSICS_GENERATED_ACTUATOR_H
1717

18-
/// \file mjcPhysics/transmission.h
18+
/// \file mjcPhysics/actuator.h
1919

2020
#include <mujoco/experimental/usd/mjcPhysics/api.h>
2121
#include <mujoco/experimental/usd/mjcPhysics/tokens.h>
@@ -35,10 +35,10 @@ PXR_NAMESPACE_OPEN_SCOPE
3535
class SdfAssetPath;
3636

3737
// -------------------------------------------------------------------------- //
38-
// MJCTRANSMISSION //
38+
// MJCACTUATOR //
3939
// -------------------------------------------------------------------------- //
4040

41-
/// \class MjcPhysicsTransmission
41+
/// \class MjcPhysicsActuator
4242
///
4343
/// Known as actuator in MuJoCo, this prim represents force transmission to
4444
/// joints, bodies, or sites.
@@ -48,29 +48,29 @@ class SdfAssetPath;
4848
/// \ref MjcPhysicsTokens. So to set an attribute to the value "rightHanded",
4949
/// use MjcPhysicsTokens->rightHanded as the value.
5050
///
51-
class MjcPhysicsTransmission : public UsdTyped {
51+
class MjcPhysicsActuator : public UsdTyped {
5252
public:
5353
/// Compile time constant representing what kind of schema this class is.
5454
///
5555
/// \sa UsdSchemaKind
5656
static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped;
5757

58-
/// Construct a MjcPhysicsTransmission on UsdPrim \p prim .
59-
/// Equivalent to MjcPhysicsTransmission::Get(prim.GetStage(), prim.GetPath())
58+
/// Construct a MjcPhysicsActuator on UsdPrim \p prim .
59+
/// Equivalent to MjcPhysicsActuator::Get(prim.GetStage(), prim.GetPath())
6060
/// for a \em valid \p prim, but will not immediately throw an error for
6161
/// an invalid \p prim
62-
explicit MjcPhysicsTransmission(const UsdPrim &prim = UsdPrim())
62+
explicit MjcPhysicsActuator(const UsdPrim &prim = UsdPrim())
6363
: UsdTyped(prim) {}
6464

65-
/// Construct a MjcPhysicsTransmission on the prim held by \p schemaObj .
66-
/// Should be preferred over MjcPhysicsTransmission(schemaObj.GetPrim()),
65+
/// Construct a MjcPhysicsActuator on the prim held by \p schemaObj .
66+
/// Should be preferred over MjcPhysicsActuator(schemaObj.GetPrim()),
6767
/// as it preserves SchemaBase state.
68-
explicit MjcPhysicsTransmission(const UsdSchemaBase &schemaObj)
68+
explicit MjcPhysicsActuator(const UsdSchemaBase &schemaObj)
6969
: UsdTyped(schemaObj) {}
7070

7171
/// Destructor.
7272
MJCPHYSICS_API
73-
virtual ~MjcPhysicsTransmission();
73+
virtual ~MjcPhysicsActuator();
7474

7575
/// Return a vector of names of all pre-declared attributes for this schema
7676
/// class and all its ancestor classes. Does not include attributes that
@@ -79,18 +79,17 @@ class MjcPhysicsTransmission : public UsdTyped {
7979
static const TfTokenVector &GetSchemaAttributeNames(
8080
bool includeInherited = true);
8181

82-
/// Return a MjcPhysicsTransmission holding the prim adhering to this
82+
/// Return a MjcPhysicsActuator holding the prim adhering to this
8383
/// schema at \p path on \p stage. If no prim exists at \p path on
8484
/// \p stage, or if the prim at that path does not adhere to this schema,
8585
/// return an invalid schema object. This is shorthand for the following:
8686
///
8787
/// \code
88-
/// MjcPhysicsTransmission(stage->GetPrimAtPath(path));
88+
/// MjcPhysicsActuator(stage->GetPrimAtPath(path));
8989
/// \endcode
9090
///
9191
MJCPHYSICS_API
92-
static MjcPhysicsTransmission Get(const UsdStagePtr &stage,
93-
const SdfPath &path);
92+
static MjcPhysicsActuator Get(const UsdStagePtr &stage, const SdfPath &path);
9493

9594
/// Attempt to ensure a \a UsdPrim adhering to this schema at \p path
9695
/// is defined (according to UsdPrim::IsDefined()) on this stage.
@@ -115,8 +114,8 @@ class MjcPhysicsTransmission : public UsdTyped {
115114
/// the opinion at the current EditTarget.
116115
///
117116
MJCPHYSICS_API
118-
static MjcPhysicsTransmission Define(const UsdStagePtr &stage,
119-
const SdfPath &path);
117+
static MjcPhysicsActuator Define(const UsdStagePtr &stage,
118+
const SdfPath &path);
120119

121120
protected:
122121
/// Returns the kind of schema this class belongs to.

include/mujoco/experimental/usd/mjcPhysics/tokens.h

Lines changed: 56 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ struct MjcPhysicsTokensType {
5555
MJCPHYSICS_API MjcPhysicsTokensType();
5656
/// \brief "affine"
5757
///
58-
/// Possible value for MjcPhysicsTransmission::GetMjcBiasTypeAttr(), Possible
59-
/// value for MjcPhysicsTransmission::GetMjcGainTypeAttr()
58+
/// Possible value for MjcPhysicsActuator::GetMjcBiasTypeAttr(), Possible
59+
/// value for MjcPhysicsActuator::GetMjcGainTypeAttr()
6060
const TfToken affine;
6161
/// \brief "auto"
6262
///
6363
/// Fallback value for MjcPhysicsSceneAPI::GetJacobianAttr(), Fallback value
64-
/// for MjcPhysicsTransmission::GetMjcActLimitedAttr(), Fallback value for
65-
/// MjcPhysicsTransmission::GetMjcCtrlLimitedAttr(), Fallback value for
66-
/// MjcPhysicsTransmission::GetMjcForceLimitedAttr(), Fallback value for
64+
/// for MjcPhysicsActuator::GetMjcActLimitedAttr(), Fallback value for
65+
/// MjcPhysicsActuator::GetMjcCtrlLimitedAttr(), Fallback value for
66+
/// MjcPhysicsActuator::GetMjcForceLimitedAttr(), Fallback value for
6767
/// MjcPhysicsJointAPI::GetMjcActuatorfrclimitedAttr(), This token represents
6868
/// the auto constraint Jacobian and matrices computed from it.
6969
const TfToken auto_;
@@ -97,22 +97,22 @@ struct MjcPhysicsTokensType {
9797
const TfToken exact;
9898
/// \brief "false"
9999
///
100-
/// Possible value for MjcPhysicsTransmission::GetMjcActLimitedAttr(),
101-
/// Possible value for MjcPhysicsTransmission::GetMjcCtrlLimitedAttr(),
102-
/// Possible value for MjcPhysicsTransmission::GetMjcForceLimitedAttr(),
103-
/// Possible value for MjcPhysicsJointAPI::GetMjcActuatorfrclimitedAttr()
100+
/// Possible value for MjcPhysicsActuator::GetMjcActLimitedAttr(), Possible
101+
/// value for MjcPhysicsActuator::GetMjcCtrlLimitedAttr(), Possible value for
102+
/// MjcPhysicsActuator::GetMjcForceLimitedAttr(), Possible value for
103+
/// MjcPhysicsJointAPI::GetMjcActuatorfrclimitedAttr()
104104
const TfToken false_;
105105
/// \brief "filter"
106106
///
107-
/// Possible value for MjcPhysicsTransmission::GetMjcDynTypeAttr()
107+
/// Possible value for MjcPhysicsActuator::GetMjcDynTypeAttr()
108108
const TfToken filter;
109109
/// \brief "filterexact"
110110
///
111-
/// Possible value for MjcPhysicsTransmission::GetMjcDynTypeAttr()
111+
/// Possible value for MjcPhysicsActuator::GetMjcDynTypeAttr()
112112
const TfToken filterexact;
113113
/// \brief "fixed"
114114
///
115-
/// Fallback value for MjcPhysicsTransmission::GetMjcGainTypeAttr()
115+
/// Fallback value for MjcPhysicsActuator::GetMjcGainTypeAttr()
116116
const TfToken fixed;
117117
/// \brief "implicit"
118118
///
@@ -126,7 +126,7 @@ struct MjcPhysicsTokensType {
126126
const TfToken implicitfast;
127127
/// \brief "integrator"
128128
///
129-
/// Possible value for MjcPhysicsTransmission::GetMjcDynTypeAttr()
129+
/// Possible value for MjcPhysicsActuator::GetMjcDynTypeAttr()
130130
const TfToken integrator;
131131
/// \brief "legacy"
132132
///
@@ -138,23 +138,23 @@ struct MjcPhysicsTokensType {
138138
const TfToken mjcAct;
139139
/// \brief "mjc:actDim"
140140
///
141-
/// MjcPhysicsTransmission
141+
/// MjcPhysicsActuator
142142
const TfToken mjcActDim;
143143
/// \brief "mjc:actEarly"
144144
///
145-
/// MjcPhysicsTransmission
145+
/// MjcPhysicsActuator
146146
const TfToken mjcActEarly;
147147
/// \brief "mjc:actLimited"
148148
///
149-
/// MjcPhysicsTransmission
149+
/// MjcPhysicsActuator
150150
const TfToken mjcActLimited;
151151
/// \brief "mjc:actRange:max"
152152
///
153-
/// MjcPhysicsTransmission
153+
/// MjcPhysicsActuator
154154
const TfToken mjcActRangeMax;
155155
/// \brief "mjc:actRange:min"
156156
///
157-
/// MjcPhysicsTransmission
157+
/// MjcPhysicsActuator
158158
const TfToken mjcActRangeMin;
159159
/// \brief "mjc:actuatorfrclimited"
160160
///
@@ -178,43 +178,43 @@ struct MjcPhysicsTokensType {
178178
const TfToken mjcArmature;
179179
/// \brief "mjc:biasPrm"
180180
///
181-
/// MjcPhysicsTransmission
181+
/// MjcPhysicsActuator
182182
const TfToken mjcBiasPrm;
183183
/// \brief "mjc:biasType"
184184
///
185-
/// MjcPhysicsTransmission
185+
/// MjcPhysicsActuator
186186
const TfToken mjcBiasType;
187187
/// \brief "mjc:crankLength"
188188
///
189-
/// MjcPhysicsTransmission
189+
/// MjcPhysicsActuator
190190
const TfToken mjcCrankLength;
191191
/// \brief "mjc:ctrl"
192192
///
193193
/// MjcPhysicsKeyframe
194194
const TfToken mjcCtrl;
195195
/// \brief "mjc:ctrlLimited"
196196
///
197-
/// MjcPhysicsTransmission
197+
/// MjcPhysicsActuator
198198
const TfToken mjcCtrlLimited;
199199
/// \brief "mjc:ctrlRange:max"
200200
///
201-
/// MjcPhysicsTransmission
201+
/// MjcPhysicsActuator
202202
const TfToken mjcCtrlRangeMax;
203203
/// \brief "mjc:ctrlRange:min"
204204
///
205-
/// MjcPhysicsTransmission
205+
/// MjcPhysicsActuator
206206
const TfToken mjcCtrlRangeMin;
207207
/// \brief "mjc:damping"
208208
///
209209
/// MjcPhysicsJointAPI
210210
const TfToken mjcDamping;
211211
/// \brief "mjc:dynPrm"
212212
///
213-
/// MjcPhysicsTransmission
213+
/// MjcPhysicsActuator
214214
const TfToken mjcDynPrm;
215215
/// \brief "mjc:dynType"
216216
///
217-
/// MjcPhysicsTransmission
217+
/// MjcPhysicsActuator
218218
const TfToken mjcDynType;
219219
/// \brief "mjc:flag:actuation"
220220
///
@@ -310,52 +310,52 @@ struct MjcPhysicsTokensType {
310310
const TfToken mjcFlagWarmstart;
311311
/// \brief "mjc:forceLimited"
312312
///
313-
/// MjcPhysicsTransmission
313+
/// MjcPhysicsActuator
314314
const TfToken mjcForceLimited;
315315
/// \brief "mjc:forceRange:max"
316316
///
317-
/// MjcPhysicsTransmission
317+
/// MjcPhysicsActuator
318318
const TfToken mjcForceRangeMax;
319319
/// \brief "mjc:forceRange:min"
320320
///
321-
/// MjcPhysicsTransmission
321+
/// MjcPhysicsActuator
322322
const TfToken mjcForceRangeMin;
323323
/// \brief "mjc:frictionloss"
324324
///
325325
/// MjcPhysicsJointAPI
326326
const TfToken mjcFrictionloss;
327327
/// \brief "mjc:gainPrm"
328328
///
329-
/// MjcPhysicsTransmission
329+
/// MjcPhysicsActuator
330330
const TfToken mjcGainPrm;
331331
/// \brief "mjc:gainType"
332332
///
333-
/// MjcPhysicsTransmission
333+
/// MjcPhysicsActuator
334334
const TfToken mjcGainType;
335335
/// \brief "mjc:gear"
336336
///
337-
/// MjcPhysicsTransmission
337+
/// MjcPhysicsActuator
338338
const TfToken mjcGear;
339339
/// \brief "mjc:group"
340340
///
341-
/// MjcPhysicsSiteAPI, MjcPhysicsImageableAPI, MjcPhysicsCollisionAPI,
342-
/// MjcPhysicsTransmission, MjcPhysicsJointAPI
341+
/// MjcPhysicsSiteAPI, MjcPhysicsCollisionAPI, MjcPhysicsActuator,
342+
/// MjcPhysicsJointAPI
343343
const TfToken mjcGroup;
344344
/// \brief "mjc:inertia"
345345
///
346346
/// MjcPhysicsMeshCollisionAPI
347347
const TfToken mjcInertia;
348348
/// \brief "mjc:jointInParent"
349349
///
350-
/// MjcPhysicsTransmission
350+
/// MjcPhysicsActuator
351351
const TfToken mjcJointInParent;
352352
/// \brief "mjc:lengthRange:max"
353353
///
354-
/// MjcPhysicsTransmission
354+
/// MjcPhysicsActuator
355355
const TfToken mjcLengthRangeMax;
356356
/// \brief "mjc:lengthRange:min"
357357
///
358-
/// MjcPhysicsTransmission
358+
/// MjcPhysicsActuator
359359
const TfToken mjcLengthRangeMin;
360360
/// \brief "mjc:margin"
361361
///
@@ -491,15 +491,15 @@ struct MjcPhysicsTokensType {
491491
const TfToken mjcRef;
492492
/// \brief "mjc:refSite"
493493
///
494-
/// MjcPhysicsTransmission
494+
/// MjcPhysicsActuator
495495
const TfToken mjcRefSite;
496496
/// \brief "mjc:shellinertia"
497497
///
498498
/// MjcPhysicsCollisionAPI
499499
const TfToken mjcShellinertia;
500500
/// \brief "mjc:sliderSite"
501501
///
502-
/// MjcPhysicsTransmission
502+
/// MjcPhysicsActuator
503503
const TfToken mjcSliderSite;
504504
/// \brief "mjc:solimpfriction"
505505
///
@@ -531,13 +531,13 @@ struct MjcPhysicsTokensType {
531531
const TfToken mjcStiffness;
532532
/// \brief "mjc:target"
533533
///
534-
/// MjcPhysicsTransmission
534+
/// MjcPhysicsActuator
535535
const TfToken mjcTarget;
536536
/// \brief "muscle"
537537
///
538-
/// Possible value for MjcPhysicsTransmission::GetMjcBiasTypeAttr(), Possible
539-
/// value for MjcPhysicsTransmission::GetMjcDynTypeAttr(), Possible value for
540-
/// MjcPhysicsTransmission::GetMjcGainTypeAttr()
538+
/// Possible value for MjcPhysicsActuator::GetMjcBiasTypeAttr(), Possible
539+
/// value for MjcPhysicsActuator::GetMjcDynTypeAttr(), Possible value for
540+
/// MjcPhysicsActuator::GetMjcGainTypeAttr()
541541
const TfToken muscle;
542542
/// \brief "newton"
543543
///
@@ -546,8 +546,8 @@ struct MjcPhysicsTokensType {
546546
const TfToken newton;
547547
/// \brief "none"
548548
///
549-
/// Fallback value for MjcPhysicsTransmission::GetMjcBiasTypeAttr(), Fallback
550-
/// value for MjcPhysicsTransmission::GetMjcDynTypeAttr()
549+
/// Fallback value for MjcPhysicsActuator::GetMjcBiasTypeAttr(), Fallback
550+
/// value for MjcPhysicsActuator::GetMjcDynTypeAttr()
551551
const TfToken none;
552552
/// \brief "pgs"
553553
///
@@ -575,25 +575,25 @@ struct MjcPhysicsTokensType {
575575
const TfToken sparse;
576576
/// \brief "true"
577577
///
578-
/// Possible value for MjcPhysicsTransmission::GetMjcActLimitedAttr(),
579-
/// Possible value for MjcPhysicsTransmission::GetMjcCtrlLimitedAttr(),
580-
/// Possible value for MjcPhysicsTransmission::GetMjcForceLimitedAttr(),
581-
/// Possible value for MjcPhysicsJointAPI::GetMjcActuatorfrclimitedAttr()
578+
/// Possible value for MjcPhysicsActuator::GetMjcActLimitedAttr(), Possible
579+
/// value for MjcPhysicsActuator::GetMjcCtrlLimitedAttr(), Possible value for
580+
/// MjcPhysicsActuator::GetMjcForceLimitedAttr(), Possible value for
581+
/// MjcPhysicsJointAPI::GetMjcActuatorfrclimitedAttr()
582582
const TfToken true_;
583583
/// \brief "user"
584584
///
585-
/// Possible value for MjcPhysicsTransmission::GetMjcBiasTypeAttr(), Possible
586-
/// value for MjcPhysicsTransmission::GetMjcDynTypeAttr(), Possible value for
587-
/// MjcPhysicsTransmission::GetMjcGainTypeAttr()
585+
/// Possible value for MjcPhysicsActuator::GetMjcBiasTypeAttr(), Possible
586+
/// value for MjcPhysicsActuator::GetMjcDynTypeAttr(), Possible value for
587+
/// MjcPhysicsActuator::GetMjcGainTypeAttr()
588588
const TfToken user;
589+
/// \brief "MjcActuator"
590+
///
591+
/// Schema identifier and family for MjcPhysicsActuator
592+
const TfToken MjcActuator;
589593
/// \brief "MjcCollisionAPI"
590594
///
591595
/// Schema identifier and family for MjcPhysicsCollisionAPI
592596
const TfToken MjcCollisionAPI;
593-
/// \brief "MjcImageableAPI"
594-
///
595-
/// Schema identifier and family for MjcPhysicsImageableAPI
596-
const TfToken MjcImageableAPI;
597597
/// \brief "MjcJointAPI"
598598
///
599599
/// Schema identifier and family for MjcPhysicsJointAPI
@@ -614,10 +614,6 @@ struct MjcPhysicsTokensType {
614614
///
615615
/// Schema identifier and family for MjcPhysicsSiteAPI
616616
const TfToken MjcSiteAPI;
617-
/// \brief "MjcTransmission"
618-
///
619-
/// Schema identifier and family for MjcPhysicsTransmission
620-
const TfToken MjcTransmission;
621617
/// A vector of all of the tokens listed above.
622618
const std::vector<TfToken> allTokens;
623619
};

0 commit comments

Comments
 (0)