Skip to content

Commit

Permalink
Targeted locomotion for robots (HW first)
Browse files Browse the repository at this point in the history
- Added AngleToTargetDetectorClass
- Added camera to HW controller
- added OpenCV dependency
- added raspicam dependency
  • Loading branch information
portaloffreedom committed Mar 10, 2020
1 parent d9571cb commit abdb362
Show file tree
Hide file tree
Showing 23 changed files with 1,423 additions and 168 deletions.
16 changes: 12 additions & 4 deletions cpprevolve/revolve/brains/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ set (CMAKE_CXX_STANDARD 14)

set(CONTROLLER_SRCS
controller/DifferentialCPG.cpp
controller/BrokenDifferentialCPG.cpp
controller/sensors/AngleToTargetDetector.cpp
)
set(LEARNER_SRCS
learner/Learner.cpp
Expand All @@ -17,9 +19,12 @@ find_package(Boost REQUIRED COMPONENTS system)

# Find Eigen3 - A lightweight C++ template library for vector and matrix math
find_package(Eigen3 REQUIRED)

find_package(MultiNEAT REQUIRED)

# These dependencies are required for the AngleToTargetDetector Sensor
find_package(OpenCV REQUIRED)
#find_package(raspicam REQUIRED) #only on the raspberry side

# Find NLOpt - Non Linear Optimization
pkg_check_modules(NLOpt REQUIRED nlopt>=2.4)

Expand All @@ -32,7 +37,8 @@ add_library(revolve-learners SHARED ${LEARNER_SRCS})

target_include_directories(revolve-controllers
PUBLIC ${EIGEN3_INCLUDE_DIR}
PUBLIC ${Boost_INCLUDE_DIRS})
PUBLIC ${Boost_INCLUDE_DIRS}
PUBLIC ${OpenCV_INCLUDE_DIRS})

target_include_directories(revolve-learners
PUBLIC ${EIGEN3_INCLUDE_DIR}
Expand All @@ -44,11 +50,13 @@ target_compile_definitions(revolve-learners
PUBLIC USE_NLOPT=1)

target_link_libraries(revolve-controllers
MultiNEAT::MultiNEAT)
MultiNEAT::MultiNEAT
${OpenCV_LIBS})

target_link_libraries(revolve-learners
revolve-controllers
MultiNEAT::MultiNEAT)

install(TARGETS revolve-controllers revolve-learners
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib)
LIBRARY DESTINATION lib)
Loading

0 comments on commit abdb362

Please sign in to comment.