Fix schema naming in mjcPhysics to avoid collisions.
PiperOrigin-RevId: 780537076 Change-Id: I4ea24162ba20d6aae10207491f9aae2250808576
This commit is contained in:
committed by
Copybara-Service
parent
d464165e30
commit
e507e31922
@@ -35,7 +35,7 @@ PXR_NAMESPACE_OPEN_SCOPE
|
||||
class SdfAssetPath;
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// PHYSICSACTUATORAPI //
|
||||
// MJCACTUATORAPI //
|
||||
// -------------------------------------------------------------------------- //
|
||||
|
||||
/// \class MjcPhysicsActuatorAPI
|
||||
@@ -111,7 +111,7 @@ class MjcPhysicsActuatorAPI : public UsdAPISchemaBase {
|
||||
static bool CanApply(const UsdPrim &prim, std::string *whyNot = nullptr);
|
||||
|
||||
/// Applies this <b>single-apply</b> API schema to the given \p prim.
|
||||
/// This information is stored by adding "PhysicsActuatorAPI" to the
|
||||
/// This information is stored by adding "MjcActuatorAPI" to the
|
||||
/// token-valued, listOp metadata \em apiSchemas on the prim.
|
||||
///
|
||||
/// \return A valid MjcPhysicsActuatorAPI object is returned upon success.
|
||||
|
||||
@@ -35,7 +35,7 @@ PXR_NAMESPACE_OPEN_SCOPE
|
||||
class SdfAssetPath;
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// COLLISIONAPI //
|
||||
// MJCCOLLISIONAPI //
|
||||
// -------------------------------------------------------------------------- //
|
||||
|
||||
/// \class MjcPhysicsCollisionAPI
|
||||
@@ -106,7 +106,7 @@ class MjcPhysicsCollisionAPI : public UsdAPISchemaBase {
|
||||
static bool CanApply(const UsdPrim &prim, std::string *whyNot = nullptr);
|
||||
|
||||
/// Applies this <b>single-apply</b> API schema to the given \p prim.
|
||||
/// This information is stored by adding "CollisionAPI" to the
|
||||
/// This information is stored by adding "MjcCollisionAPI" to the
|
||||
/// token-valued, listOp metadata \em apiSchemas on the prim.
|
||||
///
|
||||
/// \return A valid MjcPhysicsCollisionAPI object is returned upon success.
|
||||
|
||||
@@ -35,7 +35,7 @@ PXR_NAMESPACE_OPEN_SCOPE
|
||||
class SdfAssetPath;
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// PHYSICSJOINTSAPI //
|
||||
// MJCJOINTAPI //
|
||||
// -------------------------------------------------------------------------- //
|
||||
|
||||
/// \class MjcPhysicsJointAPI
|
||||
@@ -110,7 +110,7 @@ class MjcPhysicsJointAPI : public UsdAPISchemaBase {
|
||||
static bool CanApply(const UsdPrim &prim, std::string *whyNot = nullptr);
|
||||
|
||||
/// Applies this <b>single-apply</b> API schema to the given \p prim.
|
||||
/// This information is stored by adding "PhysicsJointsAPI" to the
|
||||
/// This information is stored by adding "MjcJointAPI" to the
|
||||
/// token-valued, listOp metadata \em apiSchemas on the prim.
|
||||
///
|
||||
/// \return A valid MjcPhysicsJointAPI object is returned upon success.
|
||||
|
||||
@@ -35,7 +35,7 @@ PXR_NAMESPACE_OPEN_SCOPE
|
||||
class SdfAssetPath;
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// KEYFRAME //
|
||||
// MJCKEYFRAME //
|
||||
// -------------------------------------------------------------------------- //
|
||||
|
||||
/// \class MjcPhysicsKeyframe
|
||||
|
||||
@@ -35,12 +35,12 @@ PXR_NAMESPACE_OPEN_SCOPE
|
||||
class SdfAssetPath;
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// MESHCOLLISIONAPI //
|
||||
// MJCMESHCOLLISIONAPI //
|
||||
// -------------------------------------------------------------------------- //
|
||||
|
||||
/// \class MjcPhysicsMeshCollisionAPI
|
||||
///
|
||||
/// API describing a Mujoco collider.
|
||||
/// API describing a Mujoco mesh collider.
|
||||
///
|
||||
/// 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
|
||||
@@ -111,7 +111,7 @@ class MjcPhysicsMeshCollisionAPI : public UsdAPISchemaBase {
|
||||
static bool CanApply(const UsdPrim &prim, std::string *whyNot = nullptr);
|
||||
|
||||
/// Applies this <b>single-apply</b> API schema to the given \p prim.
|
||||
/// This information is stored by adding "MeshCollisionAPI" to the
|
||||
/// This information is stored by adding "MjcMeshCollisionAPI" to the
|
||||
/// token-valued, listOp metadata \em apiSchemas on the prim.
|
||||
///
|
||||
/// \return A valid MjcPhysicsMeshCollisionAPI object is returned upon
|
||||
|
||||
@@ -35,7 +35,7 @@ PXR_NAMESPACE_OPEN_SCOPE
|
||||
class SdfAssetPath;
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// SCENEAPI //
|
||||
// MJCSCENEAPI //
|
||||
// -------------------------------------------------------------------------- //
|
||||
|
||||
/// \class MjcPhysicsSceneAPI
|
||||
@@ -110,7 +110,7 @@ class MjcPhysicsSceneAPI : public UsdAPISchemaBase {
|
||||
static bool CanApply(const UsdPrim &prim, std::string *whyNot = nullptr);
|
||||
|
||||
/// Applies this <b>single-apply</b> API schema to the given \p prim.
|
||||
/// This information is stored by adding "SceneAPI" to the
|
||||
/// This information is stored by adding "MjcSceneAPI" to the
|
||||
/// token-valued, listOp metadata \em apiSchemas on the prim.
|
||||
///
|
||||
/// \return A valid MjcPhysicsSceneAPI object is returned upon success.
|
||||
|
||||
@@ -34,7 +34,7 @@ PXR_NAMESPACE_OPEN_SCOPE
|
||||
class SdfAssetPath;
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// SITEAPI //
|
||||
// MJCSITEAPI //
|
||||
// -------------------------------------------------------------------------- //
|
||||
|
||||
/// \class MjcPhysicsSiteAPI
|
||||
@@ -104,7 +104,7 @@ class MjcPhysicsSiteAPI : public UsdAPISchemaBase {
|
||||
static bool CanApply(const UsdPrim &prim, std::string *whyNot = nullptr);
|
||||
|
||||
/// Applies this <b>single-apply</b> API schema to the given \p prim.
|
||||
/// This information is stored by adding "SiteAPI" to the
|
||||
/// This information is stored by adding "MjcSiteAPI" to the
|
||||
/// token-valued, listOp metadata \em apiSchemas on the prim.
|
||||
///
|
||||
/// \return A valid MjcPhysicsSiteAPI object is returned upon success.
|
||||
|
||||
@@ -573,34 +573,34 @@ struct MjcPhysicsTokensType {
|
||||
/// value for MjcPhysicsActuatorAPI::GetMjcDynTypeAttr(), Possible value for
|
||||
/// MjcPhysicsActuatorAPI::GetMjcGainTypeAttr()
|
||||
const TfToken user;
|
||||
/// \brief "CollisionAPI"
|
||||
///
|
||||
/// Schema identifier and family for MjcPhysicsCollisionAPI
|
||||
const TfToken CollisionAPI;
|
||||
/// \brief "Keyframe"
|
||||
///
|
||||
/// Schema identifier and family for MjcPhysicsKeyframe
|
||||
const TfToken Keyframe;
|
||||
/// \brief "MeshCollisionAPI"
|
||||
///
|
||||
/// Schema identifier and family for MjcPhysicsMeshCollisionAPI
|
||||
const TfToken MeshCollisionAPI;
|
||||
/// \brief "PhysicsActuatorAPI"
|
||||
/// \brief "MjcActuatorAPI"
|
||||
///
|
||||
/// Schema identifier and family for MjcPhysicsActuatorAPI
|
||||
const TfToken PhysicsActuatorAPI;
|
||||
/// \brief "PhysicsJointsAPI"
|
||||
const TfToken MjcActuatorAPI;
|
||||
/// \brief "MjcCollisionAPI"
|
||||
///
|
||||
/// Schema identifier and family for MjcPhysicsCollisionAPI
|
||||
const TfToken MjcCollisionAPI;
|
||||
/// \brief "MjcJointAPI"
|
||||
///
|
||||
/// Schema identifier and family for MjcPhysicsJointAPI
|
||||
const TfToken PhysicsJointsAPI;
|
||||
/// \brief "SceneAPI"
|
||||
const TfToken MjcJointAPI;
|
||||
/// \brief "MjcKeyframe"
|
||||
///
|
||||
/// Schema identifier and family for MjcPhysicsKeyframe
|
||||
const TfToken MjcKeyframe;
|
||||
/// \brief "MjcMeshCollisionAPI"
|
||||
///
|
||||
/// Schema identifier and family for MjcPhysicsMeshCollisionAPI
|
||||
const TfToken MjcMeshCollisionAPI;
|
||||
/// \brief "MjcSceneAPI"
|
||||
///
|
||||
/// Schema identifier and family for MjcPhysicsSceneAPI
|
||||
const TfToken SceneAPI;
|
||||
/// \brief "SiteAPI"
|
||||
const TfToken MjcSceneAPI;
|
||||
/// \brief "MjcSiteAPI"
|
||||
///
|
||||
/// Schema identifier and family for MjcPhysicsSiteAPI
|
||||
const TfToken SiteAPI;
|
||||
const TfToken MjcSiteAPI;
|
||||
/// A vector of all of the tokens listed above.
|
||||
const std::vector<TfToken> allTokens;
|
||||
};
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"WARNING: THIS FILE IS GENERATED BY usdGenSchema. DO NOT EDIT."
|
||||
)
|
||||
|
||||
class "SceneAPI" (
|
||||
class "MjcSceneAPI" (
|
||||
doc = "API providing global simulation options for Mujoco."
|
||||
)
|
||||
{
|
||||
@@ -220,13 +220,13 @@ class "SceneAPI" (
|
||||
)
|
||||
}
|
||||
|
||||
class "SiteAPI" (
|
||||
class "MjcSiteAPI" (
|
||||
doc = "API describing a Mujoco site."
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
class "CollisionAPI" (
|
||||
class "MjcCollisionAPI" (
|
||||
doc = "API describing a Mujoco collider."
|
||||
)
|
||||
{
|
||||
@@ -236,8 +236,8 @@ class "CollisionAPI" (
|
||||
)
|
||||
}
|
||||
|
||||
class "MeshCollisionAPI" (
|
||||
doc = "API describing a Mujoco collider."
|
||||
class "MjcMeshCollisionAPI" (
|
||||
doc = "API describing a Mujoco mesh collider."
|
||||
)
|
||||
{
|
||||
uniform token mjc:inertia = "legacy" (
|
||||
@@ -247,7 +247,7 @@ class "MeshCollisionAPI" (
|
||||
)
|
||||
}
|
||||
|
||||
class "PhysicsActuatorAPI" (
|
||||
class "MjcActuatorAPI" (
|
||||
doc = "API describing a Mujoco actuator."
|
||||
)
|
||||
{
|
||||
@@ -331,7 +331,7 @@ class "PhysicsActuatorAPI" (
|
||||
)
|
||||
}
|
||||
|
||||
class Keyframe "Keyframe" (
|
||||
class MjcKeyframe "MjcKeyframe" (
|
||||
doc = "Represents time independent keyframe values."
|
||||
)
|
||||
{
|
||||
@@ -355,7 +355,7 @@ class Keyframe "Keyframe" (
|
||||
)
|
||||
}
|
||||
|
||||
class "PhysicsJointsAPI" (
|
||||
class "MjcJointAPI" (
|
||||
doc = "API describing a Mujoco joint."
|
||||
)
|
||||
{
|
||||
|
||||
@@ -27,10 +27,10 @@ TF_REGISTRY_FUNCTION(TfType) {
|
||||
|
||||
// Register the usd prim typename as an alias under UsdSchemaBase. This
|
||||
// enables one to call
|
||||
// TfType::Find<UsdSchemaBase>().FindDerivedByName("Keyframe")
|
||||
// TfType::Find<UsdSchemaBase>().FindDerivedByName("MjcKeyframe")
|
||||
// to find TfType<MjcPhysicsKeyframe>, which is how IsA queries are
|
||||
// answered.
|
||||
TfType::AddAlias<UsdSchemaBase, MjcPhysicsKeyframe>("Keyframe");
|
||||
TfType::AddAlias<UsdSchemaBase, MjcPhysicsKeyframe>("MjcKeyframe");
|
||||
}
|
||||
|
||||
/* virtual */
|
||||
@@ -49,7 +49,7 @@ MjcPhysicsKeyframe MjcPhysicsKeyframe::Get(const UsdStagePtr &stage,
|
||||
/* static */
|
||||
MjcPhysicsKeyframe MjcPhysicsKeyframe::Define(const UsdStagePtr &stage,
|
||||
const SdfPath &path) {
|
||||
static TfToken usdPrimTypeName("Keyframe");
|
||||
static TfToken usdPrimTypeName("MjcKeyframe");
|
||||
if (!stage) {
|
||||
TF_CODING_ERROR("Invalid stage");
|
||||
return MjcPhysicsKeyframe();
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"Types": {
|
||||
"MjcPhysicsActuatorAPI": {
|
||||
"alias": {
|
||||
"UsdSchemaBase": "PhysicsActuatorAPI"
|
||||
"UsdSchemaBase": "MjcActuatorAPI"
|
||||
},
|
||||
"autoGenerated": true,
|
||||
"bases": [
|
||||
@@ -15,7 +15,7 @@
|
||||
},
|
||||
"MjcPhysicsCollisionAPI": {
|
||||
"alias": {
|
||||
"UsdSchemaBase": "CollisionAPI"
|
||||
"UsdSchemaBase": "MjcCollisionAPI"
|
||||
},
|
||||
"autoGenerated": true,
|
||||
"bases": [
|
||||
@@ -25,7 +25,7 @@
|
||||
},
|
||||
"MjcPhysicsJointAPI": {
|
||||
"alias": {
|
||||
"UsdSchemaBase": "PhysicsJointsAPI"
|
||||
"UsdSchemaBase": "MjcJointAPI"
|
||||
},
|
||||
"autoGenerated": true,
|
||||
"bases": [
|
||||
@@ -35,7 +35,7 @@
|
||||
},
|
||||
"MjcPhysicsKeyframe": {
|
||||
"alias": {
|
||||
"UsdSchemaBase": "Keyframe"
|
||||
"UsdSchemaBase": "MjcKeyframe"
|
||||
},
|
||||
"autoGenerated": true,
|
||||
"bases": [
|
||||
@@ -45,7 +45,7 @@
|
||||
},
|
||||
"MjcPhysicsMeshCollisionAPI": {
|
||||
"alias": {
|
||||
"UsdSchemaBase": "MeshCollisionAPI"
|
||||
"UsdSchemaBase": "MjcMeshCollisionAPI"
|
||||
},
|
||||
"autoGenerated": true,
|
||||
"bases": [
|
||||
@@ -55,7 +55,7 @@
|
||||
},
|
||||
"MjcPhysicsSceneAPI": {
|
||||
"alias": {
|
||||
"UsdSchemaBase": "SceneAPI"
|
||||
"UsdSchemaBase": "MjcSceneAPI"
|
||||
},
|
||||
"autoGenerated": true,
|
||||
"bases": [
|
||||
@@ -65,7 +65,7 @@
|
||||
},
|
||||
"MjcPhysicsSiteAPI": {
|
||||
"alias": {
|
||||
"UsdSchemaBase": "SiteAPI"
|
||||
"UsdSchemaBase": "MjcSiteAPI"
|
||||
},
|
||||
"autoGenerated": true,
|
||||
"bases": [
|
||||
|
||||
@@ -9,6 +9,7 @@ over "GLOBAL" (
|
||||
customData = {
|
||||
string libraryName = "mjcPhysics"
|
||||
string libraryPath = "."
|
||||
string libraryPrefix = "MjcPhysics"
|
||||
bool useLiteralIdentifier = 0
|
||||
dictionary libraryTokens = {
|
||||
dictionary euler = {
|
||||
@@ -92,8 +93,11 @@ over "GLOBAL" (
|
||||
|
||||
}
|
||||
|
||||
class "SceneAPI"
|
||||
class "MjcSceneAPI"
|
||||
(
|
||||
customData = {
|
||||
string className = "SceneAPI"
|
||||
}
|
||||
doc = """API providing global simulation options for Mujoco."""
|
||||
|
||||
inherits = </APISchemaBase>
|
||||
@@ -507,16 +511,22 @@ class "SceneAPI"
|
||||
)
|
||||
}
|
||||
|
||||
class "SiteAPI"
|
||||
class "MjcSiteAPI"
|
||||
(
|
||||
customData = {
|
||||
string className = "SiteAPI"
|
||||
}
|
||||
doc = """API describing a Mujoco site."""
|
||||
|
||||
inherits = </APISchemaBase>
|
||||
)
|
||||
{}
|
||||
|
||||
class "CollisionAPI"
|
||||
class "MjcCollisionAPI"
|
||||
(
|
||||
customData = {
|
||||
string className = "CollisionAPI"
|
||||
}
|
||||
doc = """API describing a Mujoco collider."""
|
||||
|
||||
inherits = </APISchemaBase>
|
||||
@@ -531,9 +541,12 @@ class "CollisionAPI"
|
||||
)
|
||||
}
|
||||
|
||||
class "MeshCollisionAPI"
|
||||
class "MjcMeshCollisionAPI"
|
||||
(
|
||||
doc = """API describing a Mujoco collider."""
|
||||
customData = {
|
||||
string className = "MeshCollisionAPI"
|
||||
}
|
||||
doc = """API describing a Mujoco mesh collider."""
|
||||
|
||||
inherits = </APISchemaBase>
|
||||
)
|
||||
@@ -548,7 +561,7 @@ class "MeshCollisionAPI"
|
||||
)
|
||||
}
|
||||
|
||||
class "PhysicsActuatorAPI"
|
||||
class "MjcActuatorAPI"
|
||||
(
|
||||
customData = {
|
||||
string className = "ActuatorAPI"
|
||||
@@ -663,8 +676,11 @@ class "PhysicsActuatorAPI"
|
||||
}
|
||||
|
||||
|
||||
class Keyframe "Keyframe"
|
||||
class MjcKeyframe "MjcKeyframe"
|
||||
(
|
||||
customData = {
|
||||
string className = "Keyframe"
|
||||
}
|
||||
doc = """Represents time independent keyframe values."""
|
||||
|
||||
inherits = </Typed>
|
||||
@@ -695,7 +711,7 @@ class Keyframe "Keyframe"
|
||||
)
|
||||
}
|
||||
|
||||
class "PhysicsJointsAPI"
|
||||
class "MjcJointAPI"
|
||||
(
|
||||
customData = {
|
||||
string className = "JointAPI"
|
||||
|
||||
@@ -143,13 +143,13 @@ MjcPhysicsTokensType::MjcPhysicsTokensType()
|
||||
sparse("sparse", TfToken::Immortal),
|
||||
true_("true", TfToken::Immortal),
|
||||
user("user", TfToken::Immortal),
|
||||
CollisionAPI("CollisionAPI", TfToken::Immortal),
|
||||
Keyframe("Keyframe", TfToken::Immortal),
|
||||
MeshCollisionAPI("MeshCollisionAPI", TfToken::Immortal),
|
||||
PhysicsActuatorAPI("PhysicsActuatorAPI", TfToken::Immortal),
|
||||
PhysicsJointsAPI("PhysicsJointsAPI", TfToken::Immortal),
|
||||
SceneAPI("SceneAPI", TfToken::Immortal),
|
||||
SiteAPI("SiteAPI", TfToken::Immortal),
|
||||
MjcActuatorAPI("MjcActuatorAPI", TfToken::Immortal),
|
||||
MjcCollisionAPI("MjcCollisionAPI", TfToken::Immortal),
|
||||
MjcJointAPI("MjcJointAPI", TfToken::Immortal),
|
||||
MjcKeyframe("MjcKeyframe", TfToken::Immortal),
|
||||
MjcMeshCollisionAPI("MjcMeshCollisionAPI", TfToken::Immortal),
|
||||
MjcSceneAPI("MjcSceneAPI", TfToken::Immortal),
|
||||
MjcSiteAPI("MjcSiteAPI", TfToken::Immortal),
|
||||
allTokens({affine,
|
||||
auto_,
|
||||
cg,
|
||||
@@ -273,13 +273,13 @@ MjcPhysicsTokensType::MjcPhysicsTokensType()
|
||||
sparse,
|
||||
true_,
|
||||
user,
|
||||
CollisionAPI,
|
||||
Keyframe,
|
||||
MeshCollisionAPI,
|
||||
PhysicsActuatorAPI,
|
||||
PhysicsJointsAPI,
|
||||
SceneAPI,
|
||||
SiteAPI}) {}
|
||||
MjcActuatorAPI,
|
||||
MjcCollisionAPI,
|
||||
MjcJointAPI,
|
||||
MjcKeyframe,
|
||||
MjcMeshCollisionAPI,
|
||||
MjcSceneAPI,
|
||||
MjcSiteAPI}) {}
|
||||
|
||||
TfStaticData<MjcPhysicsTokensType> MjcPhysicsTokens;
|
||||
|
||||
|
||||
@@ -347,7 +347,7 @@ class ModelWriter {
|
||||
mesh_paths_[*mjs_getName(mesh->element)] = subcomponent_path;
|
||||
|
||||
if (write_physics_) {
|
||||
ApplyApiSchema(data_, mesh_path, MjcPhysicsTokens->MeshCollisionAPI);
|
||||
ApplyApiSchema(data_, mesh_path, MjcPhysicsTokens->MjcMeshCollisionAPI);
|
||||
|
||||
pxr::TfToken inertia = MjcPhysicsTokens->legacy;
|
||||
if (mesh->inertia == mjtMeshInertia::mjMESH_INERTIA_EXACT) {
|
||||
@@ -464,7 +464,7 @@ class ModelWriter {
|
||||
data_, body_paths_[kWorldIndex], pxr::UsdPhysicsTokens->PhysicsScene,
|
||||
pxr::UsdPhysicsTokens->PhysicsScene);
|
||||
|
||||
ApplyApiSchema(data_, physics_scene_path, MjcPhysicsTokens->SceneAPI);
|
||||
ApplyApiSchema(data_, physics_scene_path, MjcPhysicsTokens->MjcSceneAPI);
|
||||
|
||||
const std::vector<std::pair<pxr::TfToken, double>>
|
||||
option_double_attributes = {
|
||||
@@ -955,11 +955,11 @@ class ModelWriter {
|
||||
return;
|
||||
}
|
||||
const auto keyframe_name = pxr::TfToken(pxr::TfMakeValidIdentifier(
|
||||
name.empty() ? MjcPhysicsTokens->Keyframe : name));
|
||||
name.empty() ? MjcPhysicsTokens->MjcKeyframe : name));
|
||||
pxr::SdfPath keyframe_path = parent_path.AppendChild(keyframe_name);
|
||||
if (!data_->HasSpec(keyframe_path)) {
|
||||
CreatePrimSpec(data_, parent_path, keyframe_name,
|
||||
pxr::MjcPhysicsTokens->Keyframe);
|
||||
pxr::MjcPhysicsTokens->MjcKeyframe);
|
||||
}
|
||||
auto set_attribute_data = [&](const pxr::SdfPath &attr_path,
|
||||
const pxr::VtDoubleArray &value,
|
||||
@@ -1029,7 +1029,7 @@ class ModelWriter {
|
||||
mjsKey *keyframe = mjs_asKey(mjs_firstElement(spec_, mjOBJ_KEY));
|
||||
while (keyframe) {
|
||||
std::string keyframe_name = mjs_getName(keyframe->element)->empty()
|
||||
? MjcPhysicsTokens->Keyframe
|
||||
? kTokens->keyframe
|
||||
: *mjs_getName(keyframe->element);
|
||||
keyframes_map[keyframe_name].push_back(keyframe);
|
||||
keyframe = mjs_asKey(mjs_nextElement(spec_, keyframe->element));
|
||||
@@ -1063,7 +1063,7 @@ class ModelWriter {
|
||||
}
|
||||
|
||||
ApplyApiSchema(data_, transmission_path,
|
||||
MjcPhysicsTokens->PhysicsActuatorAPI);
|
||||
MjcPhysicsTokens->MjcActuatorAPI);
|
||||
|
||||
if (!actuator->refsite->empty()) {
|
||||
int refsite_id =
|
||||
@@ -1438,7 +1438,7 @@ class ModelWriter {
|
||||
pxr::SdfPath site_path = WriteSiteGeom(site, body_path);
|
||||
SetPrimPurpose(data_, site_path, pxr::UsdGeomTokens->guide);
|
||||
|
||||
ApplyApiSchema(data_, site_path, MjcPhysicsTokens->SiteAPI);
|
||||
ApplyApiSchema(data_, site_path, MjcPhysicsTokens->MjcSiteAPI);
|
||||
|
||||
int site_id = mjs_getId(site->element);
|
||||
auto transform = MujocoPosQuatToTransform(&model_->site_pos[3 * site_id],
|
||||
@@ -1491,7 +1491,7 @@ class ModelWriter {
|
||||
model_->geom_conaffinity[geom_id] != 0)) {
|
||||
ApplyApiSchema(data_, geom_path,
|
||||
pxr::UsdPhysicsTokens->PhysicsCollisionAPI);
|
||||
ApplyApiSchema(data_, geom_path, MjcPhysicsTokens->CollisionAPI);
|
||||
ApplyApiSchema(data_, geom_path, MjcPhysicsTokens->MjcCollisionAPI);
|
||||
|
||||
WriteUniformAttribute(
|
||||
geom_path, pxr::SdfValueTypeNames->Bool,
|
||||
@@ -1834,7 +1834,7 @@ class ModelWriter {
|
||||
}
|
||||
|
||||
// Finally write the mjcPhysicsJointAPI attributes.
|
||||
ApplyApiSchema(data_, joint_path, MjcPhysicsTokens->PhysicsJointsAPI);
|
||||
ApplyApiSchema(data_, joint_path, MjcPhysicsTokens->MjcJointAPI);
|
||||
|
||||
WriteUniformAttribute(
|
||||
joint_path, pxr::SdfValueTypeNames->DoubleArray,
|
||||
|
||||
Reference in New Issue
Block a user