Create mjcPhysics ImageableAPI for visual, non physical visual entities.
PiperOrigin-RevId: 786366034 Change-Id: Ifb72d2daf8f5963bb7007dda1685da94b456ff41
This commit is contained in:
committed by
Copybara-Service
parent
7da32d186f
commit
541c56b46f
@@ -20,6 +20,7 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <mujoco/experimental/usd/mjcPhysics/actuator.h>
|
||||
#include <mujoco/experimental/usd/mjcPhysics/collisionAPI.h>
|
||||
#include <mujoco/experimental/usd/mjcPhysics/imageableAPI.h>
|
||||
#include <mujoco/experimental/usd/mjcPhysics/jointAPI.h>
|
||||
#include <mujoco/experimental/usd/mjcPhysics/meshCollisionAPI.h>
|
||||
#include <mujoco/experimental/usd/mjcPhysics/sceneAPI.h>
|
||||
@@ -1453,6 +1454,32 @@ TEST_F(MjcfSdfFileFormatPluginTest, TestPhysicsColliders) {
|
||||
pxr::UsdPhysicsTokens->convexHull);
|
||||
}
|
||||
|
||||
TEST_F(MjcfSdfFileFormatPluginTest, TestMjcPhysicsImageableAPI) {
|
||||
static constexpr char xml[] = R"(
|
||||
<mujoco model="test">
|
||||
<asset>
|
||||
<mesh name="tetrahedron" vertex="0 0 0 1 0 0 0 1 0 0 0 1"/>
|
||||
</asset>
|
||||
<worldbody>
|
||||
<body name="body">
|
||||
<geom
|
||||
name="mesh"
|
||||
type="mesh"
|
||||
mesh="tetrahedron"
|
||||
group="4"
|
||||
contype="0"
|
||||
conaffinity="0"/>
|
||||
</body>
|
||||
</worldbody>
|
||||
</mujoco>
|
||||
)";
|
||||
auto stage = OpenStageWithPhysics(xml);
|
||||
|
||||
EXPECT_PRIM_API_APPLIED(stage, "/test/body/mesh/Mesh",
|
||||
pxr::MjcPhysicsImageableAPI);
|
||||
ExpectAttributeEqual(stage, "/test/body/mesh/Mesh.mjc:group", 4);
|
||||
}
|
||||
|
||||
TEST_F(MjcfSdfFileFormatPluginTest, TestMjcPhysicsCollisionAPI) {
|
||||
static constexpr char xml[] = R"(
|
||||
<mujoco model="test">
|
||||
|
||||
Reference in New Issue
Block a user