Code Monkey home page Code Monkey logo

gesture_driven_robot's Introduction

Gesture Driven Robot

Introduction

This project was made by me and Daniele Borgna.

Our goal was to implement a robot that can be moved with hand gestures. The robot can follow direct comands sort of like a drone or go to a specified location autonomously.

Gesture tracking

With the help of the Mediapipe library we can easily extract the user's hand "landmarks", after that with some simple math we can tell how many fingers are being held up or which way the user is pointing at.

Movement options

The robot can be moved either by:

  • Pointing with the index finger one of the available directions: forward, front-left, front-right left and right.
  • Providing an index of one of the marked locations by raising the appropriate number of fingers.

In manual mode the robot will dodge obstacles in it's path by scanning area in front of it with the provided sonar.

Odometry

Since movement is never perfect outside of a simulated environment, we needed some sort of odometry system to tell exactly where the robot was going when in automatic mode. We decided to use AprilTags to create fixed reference points for the robot to detect with it's camera.

Such tags are placed all over the surring area and can be used to calculate approximately the robot's heading and position with a small margin of error.

Hardware choice

We chose a Kobuki base for our project, a simple two-wheeled robot. The base recives comands from a Raspberry Pi, which is also responsable for capturing images from the camera, detecting tags and reading distance data from the sonar.

The sonar is made from three HC-SR04 ultrasonic distance sensors, each mounted on a servo motor. Both sensors and servos are controlled by an Arduino Nano which is hooked to the Raspberry Pi via USB for both power and to transfer sensor data.

Code stucture

Everything is written almost entierly in Python, except for the camera access and the raw movement code which had to necessarily be written in C++.

The code is structured in modules. Each module that doesn't require direct harware acces such as the controller is executed in a Docker container for better flexibility, dependecy management and error handling.

Modules use the MQTT protocol to comunicate with eachother, that is why we also use Docker to spin up a mosquitto broker.

Further reading

A much more in depth description of the entire project and it's implementation can be found in documento.pdf (in italian).

Relevant links

gesture_driven_robot's People

Contributors

luca-tracanna 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.