Skip to content

JonathanCollu/Robotics_project

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published