Skip to content

Commit

Permalink
Disable pruning by default
Browse files Browse the repository at this point in the history
  • Loading branch information
rhaschke committed Jul 4, 2024
1 parent 93a3964 commit 907014c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ find_package(catkin REQUIRED COMPONENTS
)

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

catkin_python_setup()
Expand All @@ -39,6 +40,9 @@ catkin_package(
)

add_compile_options(-fvisibility-inlines-hidden)
if(ENABLE_PRUNING)
add_compile_definitions(ENABLE_PRUNING)
endif()

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

Expand Down
6 changes: 6 additions & 0 deletions core/src/container.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ inline void updateStatePrios(const InterfaceState& s, const InterfaceState::Prio
}

void ContainerBasePrivate::onNewFailure(const Stage& child, const InterfaceState* from, const InterfaceState* to) {
#ifdef ENABLE_PRUNING
ROS_DEBUG_STREAM_NAMED("Pruning", fmt::format("'{}' generated a failure", child.name()));
switch (child.pimpl()->interfaceFlags()) {
case GENERATE:
Expand All @@ -251,6 +252,11 @@ void ContainerBasePrivate::onNewFailure(const Stage& child, const InterfaceState
setStatus<Interface::FORWARD>(&child, from, to, InterfaceState::Status::ARMED);
break;
}
#else
(void)child;
(void)from;
(void)to;
#endif
// printChildrenInterfaces(*this, false, child);
}

Expand Down
2 changes: 2 additions & 0 deletions core/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ if (CATKIN_ENABLE_TESTING)
mtc_add_gtest(test_stage.cpp)
mtc_add_gtest(test_container.cpp)
mtc_add_gmock(test_serial.cpp)
if(ENABLE_PRUNING)
mtc_add_gmock(test_pruning.cpp)
endif()
mtc_add_gtest(test_properties.cpp)
mtc_add_gtest(test_cost_terms.cpp)

Expand Down

0 comments on commit 907014c

Please sign in to comment.