Skip to content

Commit

Permalink
fix submodules
Browse files Browse the repository at this point in the history
  • Loading branch information
renan028 committed Feb 11, 2020
1 parent 2a4e62a commit 820a533
Show file tree
Hide file tree
Showing 13 changed files with 81 additions and 54 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
cmake_minimum_required(VERSION 2.8)

project(MOOD2Be)

#############################################################

get_filename_component(MOOD2Be ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
set(EXECUTOR_PATH "${CMAKE_CURRENT_SOURCE_DIR}/Executor")
add_subdirectory(${EXECUTOR_PATH})
61 changes: 61 additions & 0 deletions Executor/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
cmake_minimum_required(VERSION 2.8)

project(Executor)

#############################################################

get_filename_component(MOOD2Be ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
set(BEHAVIOR_TREE_PATH "${MOOD2Be}/BehaviorTree.CPP")
set(BEHAVIOR_TREE_INCLUDE_PATH "${BEHAVIOR_TREE_PATH}/include")
set(BEHAVIOR_TREE_BUILD "${CMAKE_CURRENT_BINARY_DIR}/BehaviorTree.CPP")

find_package(Git QUIET)
if(GIT_FOUND AND EXISTS "${MOOD2Be}/.git")
option(GIT_SUBMODULE "Check submodules during build" ON)
if(GIT_SUBMODULE)
message(STATUS "Submodule update")
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
WORKING_DIRECTORY ${MOOD2Be}
RESULT_VARIABLE GIT_SUBMOD_RESULT)
if(NOT GIT_SUBMOD_RESULT EQUAL "0")
message(FATAL_ERROR "git submodule update --init failed with ${GIT_SUBMOD_RESULT}, please checkout submodules")
endif()
endif()
endif()

if(NOT EXISTS "${BEHAVIOR_TREE_INCLUDE_PATH}")
message(FATAL_ERROR "The submodules were not downloaded.")
endif()

add_subdirectory(${BEHAVIOR_TREE_PATH} ${BEHAVIOR_TREE_BUILD})
include_directories(${BEHAVIOR_TREE_PATH}/include)

include_directories( ./include )

if(NOT CMAKE_VERSION VERSION_LESS 3.1)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif()

set(CMAKE_POSITION_INDEPENDENT_CODE ON)

set(CMAKE_CONFIG_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/cmake")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CONFIG_PATH}")

find_package(ZMQ REQUIRED)

#############################################################


add_executable(${PROJECT_NAME}
src/skill_interface.cpp
src/skill_parser.cpp
src/executor.cpp
)

target_link_libraries(${PROJECT_NAME} behaviortree_cpp_v3 dl pthread zmq)

add_executable( zmq_dummy_server zmq_server.cpp )
target_link_libraries(zmq_dummy_server pthread zmq)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
40 changes: 0 additions & 40 deletions IntralogisticExecutor/CMakeLists.txt

This file was deleted.

9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

Temporary repository for MOOD2Be-related artifacts

# Compilation instructions (Ubuntu Linux)
`cd MOOD2Be`
`mkdir build`
`cmake ..`
`make`

Executable files are in: MOOD2Be/build/Executor


# Get started with Groot


Expand Down
16 changes: 2 additions & 14 deletions simplistic_test.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
<root main_tree_to_execute="BehaviorTree">

<BehaviorTree ID="BehaviorTree">
<SequenceStar>
<moverobot_approach_region_purepursuit location="1"/>
<moverobot_approach_region_purepursuit location="2"/>
</SequenceStar>
</BehaviorTree>

<TreeNodesModel>
<Action ID="moverobot_approach_region_purepursuit"/>
<Action ID="moverobot_approach_region_purepursuit_xy"/>
</TreeNodesModel>

<root>
<TreeNodesModel/>
</root>

0 comments on commit 820a533

Please sign in to comment.