Skip to content

Commit 907014c

Browse files
committed
Disable pruning by default
1 parent 93a3964 commit 907014c

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

core/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ find_package(catkin REQUIRED COMPONENTS
1818
)
1919

2020
option(MOVEIT_CI_WARNINGS "Enable all warnings used by CI" OFF) # We use our own set of warnings
21+
option(ENABLE_PRUNING "Enable pruning on failed solutions" OFF)
2122
moveit_build_options()
2223

2324
catkin_python_setup()
@@ -39,6 +40,9 @@ catkin_package(
3940
)
4041

4142
add_compile_options(-fvisibility-inlines-hidden)
43+
if(ENABLE_PRUNING)
44+
add_compile_definitions(ENABLE_PRUNING)
45+
endif()
4246

4347
set(PROJECT_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/include/moveit/task_constructor)
4448

core/src/container.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ inline void updateStatePrios(const InterfaceState& s, const InterfaceState::Prio
232232
}
233233

234234
void ContainerBasePrivate::onNewFailure(const Stage& child, const InterfaceState* from, const InterfaceState* to) {
235+
#ifdef ENABLE_PRUNING
235236
ROS_DEBUG_STREAM_NAMED("Pruning", fmt::format("'{}' generated a failure", child.name()));
236237
switch (child.pimpl()->interfaceFlags()) {
237238
case GENERATE:
@@ -251,6 +252,11 @@ void ContainerBasePrivate::onNewFailure(const Stage& child, const InterfaceState
251252
setStatus<Interface::FORWARD>(&child, from, to, InterfaceState::Status::ARMED);
252253
break;
253254
}
255+
#else
256+
(void)child;
257+
(void)from;
258+
(void)to;
259+
#endif
254260
// printChildrenInterfaces(*this, false, child);
255261
}
256262

core/test/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ if (CATKIN_ENABLE_TESTING)
3838
mtc_add_gtest(test_stage.cpp)
3939
mtc_add_gtest(test_container.cpp)
4040
mtc_add_gmock(test_serial.cpp)
41+
if(ENABLE_PRUNING)
4142
mtc_add_gmock(test_pruning.cpp)
43+
endif()
4244
mtc_add_gtest(test_properties.cpp)
4345
mtc_add_gtest(test_cost_terms.cpp)
4446

0 commit comments

Comments
 (0)