Skip to content

Instantly share code, notes, and snippets.

Avatar
🐘
Working on Revolve, mostly...

Milan Jelisavcic milanjelisavcic

🐘
Working on Revolve, mostly...
View GitHub Profile
@milanjelisavcic
milanjelisavcic / differential_oscillator.R
Last active Sep 10, 2019
The basic differential oscillator used for robots' CPGs in the Revolve project
View differential_oscillator.R
library(deSolve)
differential_oscilator <- function(t, y, parms) {
with(as.list(c(y, params)), expr = {
dx <- w_yx * y + bias_x
dy <- w_xy * x + bias_y
list(c(dx, dy))
})
}
times <- seq(from = 0, to = 20, by = 0.01)
View gen_population_w_5hinges.py
@trollius.coroutine
def generate_population(self, n):
"""
Generates population of `n` valid robots robots.
:param n: Number of robots
:return: Future with a list of valid robot trees and corresponding
bounding boxes.
"""
logger.debug("Generating population of size %d..." % n)
View lamarckian.conf
restore_directory=restore
output_directory=milan-output3
robot_id_base=55
num_repetitions=1
birth_limit=40
population_limit=20
population_size=20
View generate_population.py
@trollius.coroutine
def generate_population(self, n):
"""
Generates population of `n` valid robots robots.
:param n: Number of robots
:return: Future with a list of valid robot trees and corresponding
bounding boxes.
"""
yaml_robots = ['75', '76', '77', '78', '79',
View pb_to_yaml.py
from revolve.angle.robogen.spec import get_body_spec
from tol.config.config import parser
from revolve.generate import FixedOrientationBodyGenerator
from revolve.spec import BodyImplementation, PartSpec, ParamSpec
from revolve.angle.robogen.body_parts import *
channel_func = lambda channel: ParamSpec(channel, min_value=0, max_value=1, default=0.5, epsilon=0)
color_params = [channel_func("red"), channel_func("green"), channel_func("blue")]