Remove plugin support from Composite particles.

This functionality is replaced by FlexComp.

PiperOrigin-RevId: 672503965
Change-Id: I58953267de285f82e416f9f60576a336b7d0da4c
This commit is contained in:
Alessio Quaglino
2024-09-09 04:57:34 -07:00
committed by Copybara-Service
parent 44145742a7
commit 4862b9e765
18 changed files with 39 additions and 1963 deletions
@@ -348,7 +348,7 @@ void ABSL_ATTRIBUTE_NOINLINE mulMatVecSparse_8(mjtNum* res,
// ----------------------------- benchmark ------------------------------------
static void BM_MatVecSparse(benchmark::State& state, int unroll) {
static mjModel* m = LoadModelFromPath("plugin/elasticity/flag.xml");
static mjModel* m = LoadModelFromPath("plugin/elasticity/flag_flex.xml");
mjData* d = mj_makeData(m);
// warm-up rollout to get a typical state
+1 -1
View File
@@ -70,7 +70,7 @@ static void run_parse_benchmark(const std::string xml_path,
// run_parse_benchmark).
void ABSL_ATTRIBUTE_NO_TAIL_CALL BM_ParseFlagPlugin(benchmark::State& state) {
run_parse_benchmark(GetModelPath("plugin/elasticity/flag.xml"), state);
run_parse_benchmark(GetModelPath("plugin/elasticity/flag_flex.xml"), state);
}
BENCHMARK(BM_ParseFlagPlugin);
+1 -1
View File
@@ -74,7 +74,7 @@ static void run_step_benchmark(const mjModel* model, benchmark::State& state) {
void ABSL_ATTRIBUTE_NO_TAIL_CALL BM_StepFlagPlugin(benchmark::State& state) {
MujocoErrorTestGuard guard;
static mjModel* model = LoadModelFromPath("plugin/elasticity/flag.xml");
static mjModel* model = LoadModelFromPath("plugin/elasticity/flag_flex.xml");
run_step_benchmark(model, state);
}
BENCHMARK(BM_StepFlagPlugin);
+5 -3
View File
@@ -184,12 +184,13 @@ TEST_F(ElasticityTest, InvalidThickness) {
</extension>
<worldbody>
<composite type="particle" count="2 2 1" spacing="1">
<geom size=".025"/>
<flexcomp type="grid" count="2 2 1" spacing="1 1 1"
radius=".025" name="test" dim="2">
<plugin plugin="mujoco.elasticity.shell">
<config key="thickness" value="hello"/>
</plugin>
</composite>
<edge equality="false"/>
</flexcomp>
</worldbody>
</mujoco>
)";
@@ -197,6 +198,7 @@ TEST_F(ElasticityTest, InvalidThickness) {
char error[1024] = {0};
mjModel* m = LoadModelFromString(xml, error, sizeof(error));
ASSERT_THAT(m, testing::IsNull());
EXPECT_THAT(error, ::testing::HasSubstr("Invalid parameter"));
}
// -------------------------------- solid -----------------------------------