Code Monkey home page Code Monkey logo

trashaway_robot's Introduction

TrashAway Robot

This repository contains all the necessary material to train a PiCar-X to perform the task of "cleaning" a squared environment from cubes. The training of the agent is performed using Deep Reinforcement Learning on a simulated CoppeliaSim environment.

Authors

Jonathan Collu*, Riccardo Majellaro*, Irina Mona Epure, Diego Barreiro and Ayodele Adetunji

Requirements

To run these scripts, a Python 3 environment is required, together with the necessary packages specified in the requirements.txt file. In order to install the requirements, run the following command from the main directory:

pip install -r requirements.txt

How to upload files on the PiCar-X robot

Run the following command from the main directory

./upload_file.sh <IP address of the picar> <local filepath>

How to train an agent

For the training on the simulation it is necessary to copy the following files in the CoppeliaSim src directory: Model.py, Reinforce.py, agent.py, color_detection.py and env.py. The files start.py and run.py must be copied in the CoppeliaSim main folder. Run the command below from the main directory

python run.py -run_name <run_name> -cp_name <checkpoint_name> -epochs <epochs_num> -M <traces_per_epoch> -T <trace_len> -gamma <discount>

An example is shown in train.sh.

How to evaluate a trained agent

Run the command below from the main directory

python evaluate.py -w <your_weights.pt>

How to run the task in the real world

From the main directory run the command:

python server.py -parameters <your_weights.pt>`

then connect to the robot via ssh and run on it the following command:

python client.py -host_address <server_IP_address>`

Short demo on the simulated environment

trashaway_robot's People

Contributors

riccardomajellaro avatar jonathancollu avatar irinamonaepure avatar diegobc11 avatar jorgie007 avatar

Stargazers

 avatar Luca Lumetti 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.