Coder Social home page Coder Social logo

sphero_formation's Introduction

RL Sphero control

NOTICE: This is a work in progress.

This package directly adds onto: https://github.com/mkrizmancic/sphero_formation/tree/0ac14aad3dd1a0af26f191c017e213279eebd52e It additonaly uses:

  1. open_ai_ros: http://wiki.ros.org/openai_ros
  2. DDPG-tf2: https://github.com/samuelmat19/DDPG-tf2
  3. mantis_ddqn_navigation: https://github.com/bhctsntrk/mantis_ddqn_navigation

Dependencies

python 3.6
gym
tensorflow 2.x
xdotool
wmctrol

About

This package connects Stage simulator with RL algorithms. It contains the following scripts:

  1. stage_connection.py - class that contains pause, unpause and reset functions for Stage
  2. robot_stage_env.py - the most basic implementation of the RL environment
  3. sphero_env.py - ROS-Sphero connection, inherits class from robot_stage_env.py
  4. sphero_world.py - defines the task of the Sphero robot, inherits class from sphero_env.py
  5. sphero_qlearn.py, sphero_dqn.py, sphero_ddpg.py - RL algorithms

Run

First of all, go to the package directory:

cd catkin_ws/src/sphero_formation

and initialize the updated stage_ros:

git submodule update --init

Copy updated Stage to /src:

cp -r ~/catkin_ws/src/sphero_formation/stage_ros ~/catkin_ws/src

Everything else is the same as the sphero_formation package. To change the RL algorithm, change to the appropriate script in reynolds_sim.launch. Also, change to the appropriate directories in order to save training results.

Results

Simulation video for flocking using DDPG can be found here and real Sphero robot here.

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.