Coder Social home page Coder Social logo

physical_robot_experiments's Introduction

Running Physical Robot Experiments in Dynamic Environments

The two physical robots used in these experiments are the best-performing models from the Lamarckian and Darwinian systems, as determined in the simulator. The results can be found at https://github.com/onerachel/Lamarckism_Environments

Parameters used in the experiments are:

ENVIRONMENT = "FLAT" or "RUGGED" # type of environment
ROBOT_TYPE = "Lamarckian_Evolved_Robot" or "Darwinian_Evolved_Robot"

Prerequisites

1. Raspberry Pi 3
2. Raspberry Pi HAT (for extending the camera sensor etc)
3. Raspberry Pi Camera
4. SSD Card
Limitations of the Hardware:
Reason for Using These Servo Motors: We use these particular servo motors, which lack feedback, because the Raspberry Pi HAT in our setup only has three pins per servo, instead of four. The additional pin would typically be used for feedback.
Reason for Using This Older Raspberry Pi HAT: We opted for this older model of the Raspberry Pi HAT because the newer version includes a security switch that causes an immediate shutdown when higher voltages are detected, which can occur with many active hinges.
Future Work: We plan to redesign the Raspberry Pi HAT to support higher voltage servos, include battery usage compatibility, and add extra pin lines for servo feedback.

Installation

Step 1

(You can skip this step and directly use the 'brains_pickle' file we have generated.)

1. git clone https://github.com/onerachel/Lamarckism_Environments.git
2. cd Lamarckism_Environments
3. virtualenv -p=python3.8 .venv
4. source .venv/bin/activate
5. ./dev_requirements.sh
6. python lamarckian_evolution/rerun_best_lamarckism.py
7. python darwinian_evolution/rerun_best_darwinism.py 
create and save lamarc_brain.pickle and darw_brain.pickle

Step 2

On a SSD card, install:

git clone https://github.com/onerachel/physical_robot_experiments.git

[note: This is not the default revolve2 version, make sure to install modular_robot and modular_robot_physical packages with the updated ( _brain_cpg_instance_environmental_control.py & _brain_cpg_network_static_environmental_control and _brain_cpg_network_static) under modular_robot/brain/cpg]

Step 3

Copy config.ipynb notebook to Raspberry Pi (all the pickle files used in this notebook are also there):

scp <config.ipynb> pi@<ip>:~/.

Step 4

For recording the experiments and calculate the fitness etc, additional recording camera is setup:

python run_recording_cameras.py

Run experiments

To run experiments

python run_experiment.py

physical_robot_experiments's People

Contributors

onerachel avatar

Watchers

 avatar

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.