Support joint actuator authoring in Mjcf SdfFileFormat plugin.
PiperOrigin-RevId: 776202325 Change-Id: I8503dd98c1b64502550b879e70039ae568517508
This commit is contained in:
committed by
Copybara-Service
parent
21bae3a388
commit
1e319aebed
@@ -1503,6 +1503,31 @@ TEST_F(MjcfSdfFileFormatPluginTest, TestMjcPhysicsActuatorGeneral) {
|
||||
pxr::VtDoubleArray{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}});
|
||||
}
|
||||
|
||||
TEST_F(MjcfSdfFileFormatPluginTest, TestMjcPhysicsJointActuator) {
|
||||
static constexpr char xml[] = R"(
|
||||
<mujoco model="test">
|
||||
<worldbody>
|
||||
<body name="axle">
|
||||
<body name="rod">
|
||||
<joint name="rod_hinge" type="hinge"/>
|
||||
<geom name="box" type="box" size=".05 .05 .05" density="1234"/>
|
||||
</body>
|
||||
</body>
|
||||
</worldbody>
|
||||
<actuator>
|
||||
<general
|
||||
name="general"
|
||||
joint="rod_hinge"
|
||||
/>
|
||||
</actuator>
|
||||
</mujoco>
|
||||
)";
|
||||
auto stage = OpenStageWithPhysics(xml);
|
||||
|
||||
EXPECT_PRIM_API_APPLIED(stage, "/test/axle/rod/rod_hinge",
|
||||
pxr::MjcPhysicsActuatorAPI);
|
||||
}
|
||||
|
||||
TEST_F(MjcfSdfFileFormatPluginTest, TestMjcPhysicsBodyActuator) {
|
||||
static constexpr char xml[] = R"(
|
||||
<mujoco model="test">
|
||||
|
||||
Reference in New Issue
Block a user