Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ jobs:
- image: circleci/python:3-stretch-node
steps:
- checkout
- run: git submodule sync
- run: git submodule update --init

- setup_remote_docker:
docker_layer_caching: true
Expand Down
20 changes: 6 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,17 @@
FROM ubuntu:bionic
FROM cigroup/gazebo:gazebo10-revolve

# Dependencies
RUN apt-get update && \
apt-get install -y build-essential \
libboost-all-dev \
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
build-essential \
cmake \
curl \
cppcheck \
doxygen \
git \
gsl-bin libgsl0-dev \
mercurial \
pkg-config \
python \
libgsl0-dev \
python3-pip \
libyaml-cpp-dev \
xsltproc \
libcairo2-dev \
graphviz \
libgazebo9-dev \
gazebo9 && \
libeigen3-dev \
libnlopt-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

Expand Down
4 changes: 4 additions & 0 deletions docker/build_revolve.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ set -e

# Build Revolve
cd /revolve

# use version 10
sed -i 's/ find_package(gazebo 9 REQUIRED)/ find_package(gazebo 10 REQUIRED)/g' cpprevolve/revolve/gazebo/CMakeLists.txt

mkdir -p build && cd build
cmake .. -DCMAKE_BUILD_TYPE="Release"
make -j4
Expand Down
11 changes: 5 additions & 6 deletions test_py/plasticonding/test_development.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class TestPlastiCoding(unittest.TestCase):
def setUp(self):
self.conf = pyrevolve.genotype.plasticoding.plasticoding.PlasticodingConfig()
self.genotype = pyrevolve.genotype.plasticoding.plasticoding.initialization.random_initialization(self.conf)
self.genotype = pyrevolve.genotype.plasticoding.plasticoding.initialization.random_initialization(self.conf, 176)

def test_development(self):
robot = self.genotype.develop()
Expand All @@ -33,7 +33,7 @@ def test_read_write_file(self):

self.genotype.export_genotype(file1)

genotype2 = pyrevolve.genotype.plasticoding.plasticoding.Plasticoding(self.conf)
genotype2 = pyrevolve.genotype.plasticoding.plasticoding.Plasticoding(self.conf, self.genotype.id)
genotype2.id = self.genotype.id
genotype2.load_genotype(file1)
genotype2.export_genotype(file2)
Expand All @@ -47,8 +47,7 @@ def test_read_write_file(self):
file2_txt.close()

def test_collision(self):
genotype_180 = pyrevolve.genotype.plasticoding.plasticoding.Plasticoding(self.conf)
genotype_180.id = "genotype{}".format(180)
genotype_180 = pyrevolve.genotype.plasticoding.plasticoding.Plasticoding(self.conf, 180)
genotype_180.load_genotype(os.path.join(LOCAL_FOLDER, 'genotype_180.txt'))
robot = genotype_180.develop()
robot.update_substrate(raise_for_intersections=True)
Expand All @@ -58,8 +57,8 @@ class Test176(unittest.TestCase):
def setUp(self):
self.conf = pyrevolve.genotype.plasticoding.plasticoding.PlasticodingConfig()

self.genotype = pyrevolve.genotype.plasticoding.plasticoding.Plasticoding(self.conf)
self.genotype.id = "genotype{}".format(176)
_id = 176
self.genotype = pyrevolve.genotype.plasticoding.plasticoding.Plasticoding(self.conf, _id)
self.genotype.load_genotype(os.path.join(LOCAL_FOLDER, 'genotype_176.txt'))

self.robot = self.genotype.develop()
Expand Down