Skip to content

Commit acddc26

Browse files
committed
compatibility to MoveIt master branch
1 parent 47a9929 commit acddc26

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

core/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ else ()
3333
set(CMAKE_CXX_STANDARD 14)
3434
endif ()
3535

36+
# check for MOVEIT_MASTER
37+
include(CheckIncludeFileCXX)
38+
set(CMAKE_REQUIRED_INCLUDES ${moveit_core_INCLUDE_DIRS})
39+
CHECK_INCLUDE_FILE_CXX(moveit/collision_detection/collision_env.h MOVEIT_MASTER)
40+
if(NOT MOVEIT_MASTER)
41+
set(MOVEIT_MASTER 0)
42+
endif()
43+
add_definitions(-DMOVEIT_MASTER=${MOVEIT_MASTER})
44+
3645
set(PROJECT_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/include/moveit/task_constructor)
3746

3847
add_subdirectory(src)

core/src/stages/fix_collision_objects.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,13 @@ SubTrajectory FixCollisionObjects::fixCollisions(planning_scene::PlanningScene&
110110
bool failure = false;
111111
while (!failure) {
112112
res.clear();
113+
#if MOVEIT_MASTER
114+
scene.getCollisionEnv()->checkRobotCollision(req, res, scene.getCurrentState(),
115+
scene.getAllowedCollisionMatrix());
116+
#else
113117
scene.getCollisionWorld()->checkRobotCollision(req, res, *scene.getCollisionRobotUnpadded(),
114118
scene.getCurrentState(), scene.getAllowedCollisionMatrix());
119+
#endif
115120
if (!res.collision)
116121
return result;
117122

0 commit comments

Comments
 (0)