Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Vassilis Vassiliades committed Oct 10, 2016
0 parents commit 953018f
Show file tree
Hide file tree
Showing 29 changed files with 42,067 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[submodule "sferes2"]
path = sferes2
url = https://github.com/sferes2/sferes2.git
[submodule "dart"]
path = dart
url = https://github.com/dartsim/dart.git
[submodule "hexapod_common"]
path = hexapod_common
url = https://github.com/resibots/hexapod_common.git
[submodule "hexapod_simu"]
path = hexapod_simu
url = https://github.com/resibots/hexapod_simu.git
[submodule "algorithms/map_elites"]
path = algorithms/map_elites
url = https://github.com/sferes2/map_elites.git
[submodule "algorithms/cvt_map_elites"]
path = algorithms/cvt_map_elites
url = git@github.com:sferes2/cvt_map_elites.git
93 changes: 93 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Scaling Up MAP-Elites Using Centroidal Voronoi Tesselations

#### meta-repo for code for the CVT-MAP-Elites experiments

Full reference:


## How to use it

#### How to properly clone this repo

```
git clone --recursive https://github.com/resibots/vassiliades_2016_cvt_map_elites.git
```

#### Dependencies

- [Boost]: C++ Template Libraries
- [Eigen]: Linear Algebra C++ Library
- [realpath]: `sudo apt-get install realpath`

#### How to easily compile everything

**Important:** Make sure you have installed all the dependencies of each repo. Otherwise the build will fail.

From the root of this repo run:

```
sh compile_all.sh
```

#### How to run MAP-Elites experiments

##### 6D descriptor (duty factor)
```
cd sferes2/build/exp/map_elites_hexapod/
./hexa_duty
```

##### 12D descriptor (12D subset of controller parameters)
```
cd sferes2/build/exp/map_elites_hexapod/
./hexa_controller12
```

##### 24D descriptor (24D subset of controller parameters)
```
cd sferes2/build/exp/map_elites_hexapod/
./hexa_controller24
```

#### How to run CVT-MAP-Elites experiments

##### 6D descriptor (duty factor)
```
cd sferes2/build/exp/cvt_map_elites_hexapod/
./hexa_duty ../../../exp/cvt_map_elites_hexapod/generated_points/generated_points_10000_6.dat
```

##### 12D descriptor (12D subset of controller parameters)
```
cd sferes2/build/exp/cvt_map_elites_hexapod/
./hexa_controller12 ../../../exp/cvt_map_elites_hexapod/generated_points/generated_points_10000_12.dat
```

##### 24D descriptor (24D subset of controller parameters)
```
cd sferes2/build/exp/cvt_map_elites_hexapod/
./hexa_controller24 ../../../exp/cvt_map_elites_hexapod/generated_points/generated_points_10000_24.dat
```

##### 36D descriptor (controller parameters)
```
cd sferes2/build/exp/cvt_map_elites_hexapod/
./hexa_controller ../../../exp/cvt_map_elites_hexapod/generated_points/generated_points_10000_36.dat
```

#### How to easily clean everything

From the root of this repo run:

```
sh clear_all.sh
```

## LICENSE

[CeCILL]

[CeCILL]: http://www.cecill.info/index.en.html
[Boost]: http://www.boost.org
[Eigen]: http://eigen.tuxfamily.org/
[realpath]: http://manpages.ubuntu.com/manpages/jaunty/man1/realpath.1.html
1 change: 1 addition & 0 deletions algorithms/cvt_map_elites
Submodule cvt_map_elites added at f12f1f
1 change: 1 addition & 0 deletions algorithms/map_elites
Submodule map_elites added at f1b19b
48 changes: 48 additions & 0 deletions clear_all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/bash

cd dart/build
make clean
cd ..
rm -fr build/

cd ../sferes2/
./waf clean
cd exp/
rm cvt_map_elites_hexapod
rm map_elites_hexapod
cd ..
rm modules.conf
cd modules/
rm cvt_map_elites
rm map_elites
cd ..
git checkout -- .
git clean -df
cd ..

cd hexapod_common/hexapod_controller
./waf clean
cd ..
git checkout -- .
git clean -df
cd ..

cd hexapod_simu/hexapod_dart
./waf clean
cd ..
git checkout -- .
git clean -df
cd ..

cd algorithms/map_elites
git checkout -- .
git clean -df
cd ../..

cd algorithms/cvt_map_elites
git checkout -- .
git clean -df
cd ../..

git checkout -- .
git clean -df
59 changes: 59 additions & 0 deletions compile_all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/bin/bash
mkdir install
cd sferes2/exp
ln -s ../../experiments/map_elites_hexapod
ln -s ../../experiments/cvt_map_elites_hexapod

cd ../../sferes2/modules
ln -s ../../algorithms/map_elites
ln -s ../../algorithms/cvt_map_elites

cd ../../

echo "map_elites" >> sferes2/modules.conf
echo "cvt_map_elites" >> sferes2/modules.conf

INSTALL="$(realpath ./install)"
DART_PATH=$INSTALL/dart_path/
echo "Install directory: ${INSTALL}"
echo "Dart path: ${DART_PATH}"

# compile dart
cd dart
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=$DART_PATH ..
make -j8
make install

# compile hexapod_common
cd ../../hexapod_common/hexapod_controller
./waf configure --prefix=$INSTALL
./waf
./waf install

cd ../hexapod_models
./waf configure --prefix=$INSTALL
./waf
./waf install

# compile hexapod_simu
cd ../../hexapod_simu/hexapod_dart
LINKFLAGS="-L$DART_PATH/lib -ldart -ldart-utils -ldart-utils-urdf" ./waf configure --prefix=$INSTALL --dart=$DART_PATH
./waf
./waf install

# compile sferes
cd ../../sferes2/
./waf configure --cpp11=yes
./waf

# compile map_elites_hexapod
LINKFLAGS="-L$DART_PATH/lib -ldart -ldart-utils -ldart-utils-urdf" ./waf configure --cpp11=yes --dart=$DART_PATH --exp map_elites_hexapod
./waf --exp map_elites_hexapod

# compile cvt_map_elites_hexapod
LINKFLAGS="-L$DART_PATH/lib -ldart -ldart-utils -ldart-utils-urdf" ./waf configure --cpp11=yes --dart=$DART_PATH --exp cvt_map_elites_hexapod
./waf --exp cvt_map_elites_hexapod

cd ..
1 change: 1 addition & 0 deletions dart
Submodule dart added at 5397e5
Loading

0 comments on commit 953018f

Please sign in to comment.