Git Product home page Git Product logo

connected-cars's Introduction

Connected Cars

School project of assembling 2 cars with a Raspberry in each of them, controlled by a computer.

SCP from PC to raspberry without password

[PC]# ssh-keygen -t rsa -b 2048 Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): # Hit Enter
Enter passphrase (empty for no passphrase): # Hit Enter
Enter same passphrase again: # Hit Enter
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.

Now copy your public key to the raspberry:
ssh-copy-id pi@RASPI_IP
[OR]
cat ~/.ssh/id_rsa.pub | ssh pi@RASPI_IP "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"

#Protocol de communication ##3 types d'objets

Une machine qui lance le programme principal

Ce sera un ordi qui devra lancer le programme principal et attendre qu'une car "Server" se connecte à lui

Un car Server

Il doit recevoir des ordres à partir de la machine principale en se connectant sur son interface1 C'est celui qui va se charger de traiter les images et prendre les décisions qui s'imposent. Ensuite, il devra informer la voiture qui lui est connecté(sur l'interface2) en lui envoyant un ordre précis

###les cars master-slave Ces voitures, ont également deux interfaces:

  • une première pour se connecter au car qui est devant lui, et qui devient ainsi son maitre
  • Il attend une connection sur son deuxième port et devient ainsi maitre de celui qui se connecte à lui

##Differents types de messages gérés par le controller

Chaque message aura des "etiquettes" (pour un routage interne):
- emmetteur (caméra, master, slave) - recepteur ??
- priorité (type de message)

Un dispatcher afin de récupérer chaque message et de les router vers un traitement spécifique, en fonction de l'emmetteur.

Ex:

caméra -> image_rec -> danger -> controller::dispatcher -> controller::image_camera -> CCP::broadcast to master and slave AND motor::stop

start script on boot

sudo su && crontab -l > mycron &&
echo "@reboot ./home/pi/Connected-Cars/connection.sh" >> mycron &&
crontab mycron && rm mycron

connected-cars's People

Contributors

gallexis avatar ignacecool avatar kmakhlouf 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.