Code Monkey home page Code Monkey logo

revolve2's Introduction

Revolve2

Revolve2 is a collection of Python packages used for researching evolutionary algorithms and modular robotics. Its primary features are a modular robot framework, an abstraction layer around physics simulators, and evolutionary algorithms.

Documentation: ci-group.github.io/revolve2

Installation: ci-group.github.io/revolve2/installation

Get help: github.com/ci-group/revolve2/discussions/categories/ask-for-help

DOI License: LGPL v3 CI

Sample

Here we create and simulate a modular robot, and then calculate how far it moved over the xy plane. This is a shortened version of examples/evaluate_single_robot.

# (...) Omitted preamble

# Create a modular robot.
body = modular_robots_v1.gecko_v1()
brain = BrainCpgNetworkNeighborRandom(body=body, rng=rng)
robot = ModularRobot(body, brain)

# Create a scene.
scene = ModularRobotScene(terrain=terrains.flat())
scene.add_robot(robot)

# Create a simulator.
simulator = LocalSimulator(headless=False)

# Simulate the scene and obtain states sampled during the simulation.
scene_states = simulate_scenes(
    simulator=simulator,
    batch_parameters=make_standard_batch_parameters(),
    scenes=scene,
)

# Get the state at the beginning and end of the simulation.
scene_state_begin = scene_states[0]
scene_state_end = scene_states[-1]

# Retrieve the states of the modular robot.
robot_state_begin = scene_state_begin.get_modular_robot_simulation_state(robot)
robot_state_end = scene_state_end.get_modular_robot_simulation_state(robot)

# Calculate the xy displacement of the robot.
xy_displacement = fitness_functions.xy_displacement(
    robot_state_begin, robot_state_end
)

revolve2's People

Contributors

daanz avatar dependabot[bot] avatar oliverweissl avatar surgura avatar tckarenchiang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

revolve2's Issues

0.0.0-alpha1 roadmap

The first step of working towards revolve2 1.0.0 is creating a simple evolutionary loop using CI's modular robots. This the goal of release 0.0.0-alpha1. This issue provides a list of requirements for this release.

See branch 0.0.0-alpha1.

  • Isaac Gym simulation environment. #6
  • Modular robot framework that can be used to create robots for the simulation environment. #7
  • An optimization framework for evolutionary processes. #8
  • A database system to store results and provide recovery in case of failure. #9 #28
  • Successfully run a basic experiment. Do analysis together with a researcher. Create and resolve issues accordingly.
  • Analysis tools. #21
  • Simulation log #22
  • Robot size querying #31

robot control script

Script that lets you control robot using rpi_controller over ssh.
return log, start time, end time.

Isaac memory leak

There appears to be a memory in Isaac Gym when shutting down a simulator. Reusing an isaac runner repeatedly uses an increasing amount of RAM and GPU memory.

Isaac optimizer torque limit incorrect

The torque limit(effort) in isaac gym does not behave correctly; it is a factor 100 off for the modular robots. Occurs on CPU; maybe does not occur on GPU, untested.

EA framework

An optimization framework for evolutionary processes.

Documentation

  • Documentation framework
  • CI
  • Installation
  • Tutorials
  • API reference

Cuda crash

Investigate Cuda crash. Hard to reproduce.

image

Analysis tools

  • Morphological traits for modular robots. Implement tool framework and width, height, number of modules, number of bricks, number of active hinges.
  • Phenotype visualization. Implement for isaac gym. See it in simulation doing their task.
  • Images of robots.

EA optimizer store individuals

EA optimizer now stores the genotype of each individual in a generation. If an individual moves to the next generation it is copied; the is no reference. Store individuals seperately from who is in a generation.

Robot size querying

Provide API to query features robot such as its height, so the user can do things like inserting the robot above the ground instead of with legs in the ground.

Continuous simulation (evosphere)

Provide an API to do continuous evaluation of a physics system.

  • Multiple actors
  • Adding removing objects
  • Keeping track of objects
  • Serializing intermediate state, checkpoints

Database system

A database system to store results and provide recovery in case of failure.

Add mypy tooling

  • Add easy scripts to perform mypy checks on the repository.
  • Update the repository to conform to mypy
  • Provide stubs for used libraries

Isaac robot friction

Figure out how to add friction to the floor, because the robots are currently sliding.

Add CI

  • Add continuous integration(suggestion: github actions)
  • Mypy
  • Style check

Improve database

Current files database is not good enough. It is too slow and the db interface can be improved.

  • Redesign API to allow setting of complete data object at once(json-like objects) isntead of every variable seperately.
  • Implement for files (no problem if slow or inefficient)
  • Implement fast database. E.g. sqlite or something else

Simulation history

Add simulation history. Sampling at a chosen frequency. Also pass the same history to the fitness function instead of the current hardcoded frequency.

Revisit database design

While the database works it is not easy to read from. Maybe introduce a form of type checking when reading from the database instead of the ugly dynamic cast system.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.