Remove contact pruning with box-box collisions in nativeccd and add benchmarks.
PiperOrigin-RevId: 744732382 Change-Id: I2e20b646c541ee99888f1e964302d1b4363b2dc4
This commit is contained in:
committed by
Copybara-Service
parent
d7027fb1c0
commit
606f00f802
@@ -16,7 +16,7 @@
|
||||
mujoco_test(
|
||||
ccd_benchmark_test
|
||||
MAIN_TARGET benchmark::benchmark_main
|
||||
ADDITIONAL_LINK_LIBRARIES benchmark::benchmark absl::core_headers
|
||||
ADDITIONAL_LINK_LIBRARIES benchmark::benchmark absl::core_headers ccd
|
||||
)
|
||||
|
||||
mujoco_test(
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
#include <mujoco/mujoco.h>
|
||||
#include "test/fixture.h"
|
||||
|
||||
#include "src/engine/engine_collision_convex.h"
|
||||
#include "src/engine/engine_collision_primitive.h"
|
||||
|
||||
namespace mujoco {
|
||||
namespace {
|
||||
|
||||
@@ -116,11 +119,19 @@ void ABSL_ATTRIBUTE_NO_TAIL_CALL
|
||||
BENCHMARK(BM_BoxMesh_LibCCD);
|
||||
|
||||
void ABSL_ATTRIBUTE_NO_TAIL_CALL BM_BoxBox(benchmark::State& state) {
|
||||
static TestHarness harness(kBoxBoxPath, "box.xml (BoxBox)");
|
||||
static TestHarness harness(kBoxBoxPath, "box.xml (BoxBox)", mjDSBL_NATIVECCD);
|
||||
harness.RunBenchmark(state);
|
||||
}
|
||||
BENCHMARK(BM_BoxBox);
|
||||
|
||||
void ABSL_ATTRIBUTE_NO_TAIL_CALL BM_BoxBox_NativeCCD(benchmark::State& state) {
|
||||
mjCOLLISIONFUNC[mjGEOM_BOX][mjGEOM_BOX] = mjc_Convex;
|
||||
static TestHarness harness(kBoxBoxPath, "box.xml (NativeCCD)");
|
||||
harness.RunBenchmark(state);
|
||||
mjCOLLISIONFUNC[mjGEOM_BOX][mjGEOM_BOX] = mjc_BoxBox;
|
||||
}
|
||||
BENCHMARK(BM_BoxBox_NativeCCD);
|
||||
|
||||
void ABSL_ATTRIBUTE_NO_TAIL_CALL
|
||||
BM_Ellipsoid_NativeCCD(benchmark::State& state) {
|
||||
static TestHarness harness(kEllipsoidPath, "ellipsoid.xml (nativeccd)");
|
||||
|
||||
Reference in New Issue
Block a user