Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aart/heritability cleanup #112

Open
wants to merge 32 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
5ddea57
Squash of complete experiment/heritability branch into one superheavy…
Aug 9, 2021
f988cb3
Revert .circleci
Aug 9, 2021
3f4f41b
Remove check_running_experiments.sh
Aug 9, 2021
00af7e3
Remove camera plugin
Aug 9, 2021
71cec18
Restore original formatting
Aug 9, 2021
83df914
removed direct_tree_test.py
Aug 9, 2021
1cd2601
Remove brain-speciation experiments
Aug 9, 2021
777e82e
Removed heritability & lsysytem-cppn-cpg experiments
Aug 9, 2021
efc232b
Removed more experiments
Aug 9, 2021
8c0a65a
Remove more
Aug 9, 2021
7b48846
remove revolve.sh
Aug 9, 2021
f949242
Remove start_experiment.sh
Aug 9, 2021
3fce2b0
Format
Aug 10, 2021
68f6cf7
Repair examples/manager_pop.py
Aug 10, 2021
e4fabd7
Always add robot_ in sdf builder
Aug 11, 2021
9183814
multi_development is now the default everywhere
Aug 11, 2021
3bf6c5f
Remove limbo and nlopt dependencies. Disabled BO.
Aug 13, 2021
0a947e9
Fix some wrong function names in examples/manager_pop
Aug 13, 2021
80f2044
Up Cpp version to 17
Aug 13, 2021
fb6853e
WIP direct tree in manager_pop. Also check previous commit
Aug 15, 2021
b1e9c00
Fix crash in manager_pop
Aug 16, 2021
adf9179
Add getSdfAttrSafe function util that performs checks before reading …
Aug 16, 2021
fb50706
Begone, tabs
Aug 16, 2021
35ed754
Removed ActuatorWrapper
Aug 16, 2021
89d0249
Removed dead code
Aug 16, 2021
b3bcc00
fixed typo
Aug 16, 2021
6575593
Removed old world
Aug 16, 2021
da2a2eb
Added generic body/brain composition. Added CPPN body & brain.
Sep 3, 2021
1662218
Rewrote differnetial cpg controller
Sep 9, 2021
0470004
Remove unused brain
Sep 9, 2021
629b081
I think cppn with targeted brain works?
Sep 13, 2021
9eadb62
fixed cppnneat genotype deserialization function typing to match actu…
Sep 13, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.git/
/.hgignore
/.hgreview

/build/
/cmake-build-*/
/.venv/

__pycache__/

.idea/
.vscode/
/experiments/*/data/
10 changes: 8 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ __pycache__/
.Python
env/
/build/
/cmake-build-*/
cmake-build-*/
cmake-multineat-*/
/output*/
develop-eggs/
dist/
Expand Down Expand Up @@ -75,4 +76,9 @@ Pipfile.lock

# Revolve related
*.sdf
*.urdf
*.urdf
src/

# OS crap
.DS_Store
.directory
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "thirdparty/limbo"]
path = thirdparty/limbo
url = https://github.com/resibots/limbo.git
[submodule "thirdparty/MultiNEAT"]
path = thirdparty/MultiNEAT
url = https://github.com/ci-group/MultiNEAT.git
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ RUN apt-get update && apt-get upgrade -y && apt-get install -y \
libcairo2-dev \
graphviz \
libeigen3-dev \
libnlopt-dev && \
libnlopt-dev \
libboost-python-dev \
libboost-numpy-dev &&\
apt-get clean && \
rm -rf /var/lib/apt/lists/*

ADD . /revolve
RUN /revolve/docker/build_install_multineat.sh
RUN /revolve/docker/build_revolve.sh
2 changes: 1 addition & 1 deletion cpprevolve/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_minimum_required (VERSION 3.7.0)

# Project name
project (Revolve)
set (CMAKE_CXX_STANDARD 11)
set (CMAKE_CXX_STANDARD 17)

# Include cmake subdirectories
add_subdirectory(revolve/brains)
Expand Down
44 changes: 32 additions & 12 deletions cpprevolve/revolve/brains/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
file(GLOB_RECURSE
CONTROLLER_SRCS
controller/*.cpp
controller/actuators/*.cpp
controller/sensors/*.cpp
set (CMAKE_CXX_STANDARD 14)

set(CONTROLLER_SRCS
controller/sensors/AngleToTargetDetector.cpp
controller/DifferentialCPG.cpp
)
file(GLOB_RECURSE
LEARNER_SRCS
learner/*.cpp

set(LEARNER_SRCS
learner/BayesianOptimizer.cpp
)

# PKG-CONFIG
Expand All @@ -17,6 +17,13 @@ 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_package(MultiNEAT REQUIRED)

# Find NLOpt - Non Linear Optimization
pkg_check_modules(NLOpt REQUIRED nlopt>=2.4)
Expand All @@ -30,16 +37,29 @@ 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}
PUBLIC ${Boost_INCLUDE_DIRS}
PUBLIC ${LIMBO_DIR}/src
PUBLIC ${NLOpt_INCLUDE_DIRS})

target_include_directories(revolve-learners
PUBLIC ${NLOpt_LIBRARY_DIRS})
target_compile_definitions(revolve-learners
PUBLIC USE_NLOPT=1
)

target_link_libraries(revolve-controllers
PUBLIC 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)
20 changes: 17 additions & 3 deletions cpprevolve/revolve/brains/controller/Controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,36 @@

namespace revolve
{
class DifferentialCPG;

class Controller
{
public:
enum ControllerType {
NONE = 0,
NEURAL_NETWORK,
SPLINES,
DIFFERENTIAL_CPG,
RANDOM,
// add new controller types here
} const controller_type;

/// \brief Constructor
explicit Controller() {}
explicit Controller(ControllerType controller_type)
: controller_type(controller_type)
{}

/// \brief Deconstructor
virtual ~Controller() {}

virtual void update(
const std::vector< std::unique_ptr< Actuator > > &_actuators,
const std::vector< std::unique_ptr< Sensor > > &_sensors,
const std::vector<std::shared_ptr<Actuator>> &_actuators,
const std::vector<std::shared_ptr<Sensor>> &_sensors,
const double _time,
const double _step
) = 0;

virtual DifferentialCPG* into_DifferentialCPG() { return nullptr; }
};

}
Expand Down
Loading