Skip to content

Research Track 1 - First assignment - Control of a robot in a simulated environment

Notifications You must be signed in to change notification settings

simone-contorno/rt-assignment-1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

First Assignment of Research Track 1 - Robotics Engineering

Author: Simone Contorno


Control of a robot in a simulated environment.

Introduction

An overview of this program function.
Go to Introduction

How it works

A rapid description of how the program works (pseudo-code).
Go to How it works

Installation and Execution

How install and run this program in Linux.
Go to Installation and Execution

Improvements

How this program could be improved.
Go to Improvements

Introduction

This program uses the library sr.robot to get information about the robot and to control it.
In particular, the robot:

  1. Follows a path.
  2. Avoids the golden tokens which rappresent the borders.
  3. Grabs a silver token when it is near to it and move it behind itself.

At the begin it looks like:

map

How it works

Let's analyze each case:

  • If there is an angle too small between the robot and a golden token, the robot turns away to be almost parallel to the borders.
  • If there is a distance too small between the robot and a golden token, the robot starts a check to identify where the path is free; to do this, it checks the distance from the wall on the right and from the wall on the left (walls are represented by golden token) and go to the furthest one.
  • If there is not any golden token between the robot and a silver token and the distance between them is little enough (less than the distance between the robot and the closest golden token), the robot turns against the silver token and go on.
  • When the robot is close enough to the silver token, it grabs this one, move it behind itself and turns again to continue the path.
Look the pseudocode file for more details.

Installation and Execution

Download this repository typing:

git clone https://github.com/simone-contorno/rt-assignment-1

Go into the folder robot-sim and run 'assignment.py' type:

python2 run.py assignment.py

You can also change some parameters into the code to modify the robot performance (e.g. straight_on_speed and refresh_rate).
You will find all the information about functions and variables in the file thanks to the comments.

Improvements

Let's notice some possible and very well improvements:

  • The robot could turn better with a better check about the golden tokens around it.
  • The robot could identify better the silver token, for instance it could go to reach it only when there is not any golden token between them, without the second check about the distance between the robot and the closest golden token.
Thanks to have read this file, i hope it was clear and interesting.

About

Research Track 1 - First assignment - Control of a robot in a simulated environment

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages