SlideShare une entreprise Scribd logo
1  sur  23
Télécharger pour lire hors ligne
Comment programmer un robot en 30 minutes?
Sciences Informatiques
Faculté des Sciences
Université de Mons
24-25 mars 2022
Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions
Contact
Courriel
secretariat.FS@umons.ac.be
informatique@umons.ac.be
Sites web
Université de Mons
https://web.umons.ac.be/fr/
Département d’informatique
http://informatique.umons.ac.be
Enseignement en sciences informatiques
http://informatique.umons.ac.be/index.php?p=teaching
https://web.umons.ac.be/fr/formations/
Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 2 / 24
Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions
Objectif
Dans cet atelier nous allons :
apprendre un robot à sortir d’un labyrinthe de manière autonome
https://youtu.be/_tKUm0VoYI4
Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 3 / 24
Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions
Objectif
Dans cet atelier nous allons :
Apprendre un robot à sortir d’un labyrinthe de manière autonome
à l’aide du langage de programmation Blockly
https://blockly.games
sur base d’un algorithme (une sorte de recette) permettant de
trouver son chemin dans un labyrinthe
Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 4 / 24
Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions
Blockly est un langage de programmation visuel :
plus simple à comprendre
composé de briques représentant les éléments principaux
permettant de construire un programme exécutable
un alternatif visuel à des langages de programmation
textuels (par exemple, Java, Python, JavaScript, . . . )
Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 5 / 24
Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions
Le langage de programmation Blockly
Un programme est composé de blocs rattachés comme un puzzle.
Cet ensemble de blocs correspond aux instructions que le programme
va exécuter.
Les instructions seront interprétées et exécutées par le programme
de haut en bas.
Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 6 / 24
Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions
Exemple
Un astronaute doit trouver son chemin dans une station spatiale
vers le sas où se trouve ses outils
Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 7 / 24
Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions
Exemple
Pour ce faire, l’astronaute peut e↵ectuer les actions suivantes :
avancer
tourner à gauche (sur lui-même à 90 )
tourner à droite (sur lui-même à 90 )
Ces actions seront exécutées par l’astronaute
grâce aux blocs d’instructions suivants :
Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 8 / 24
Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions
Comment peut-on éviter de devoir écrire plusieurs fois la même
instruction ?
Grâce aux boucles !
Une boucle répétera une ou plusieurs actions tant que la condition de la
boucle est respectée
Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 9 / 24
Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions
On peut utiliser des conditions pour que le programme
prenne une décision selon la situation rencontrée.
Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 10 / 24
Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions
Le programme exécutera les instructions (les blocs) de haut en bas.
S’il tombe sur une condition, il évaluera la réponse :
Si la condition est vérifiée, une certaine suite d’instructions sera
exécutée
Sinon, une autre suite d’instructions sera exécutée
Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 11 / 24
Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions
Considérez le plan d’une station spatiale comme un labyrinthe.
Quel algorithme peut être utilisé par l’astronaute pour trouver son
chemin, s’il ne connaı̂t pas le plan de la station ?
Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 12 / 24
Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions
L’algorithme de la main droite
Il suffit de garder sa main droite sur le mur situé à sa droite et le suivre.
Il faut tourner à droite si on ne touche plus le mur.
Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 13 / 24
Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions
Solution alternative
La technique peut aussi être utilisée avec la main gauche.
Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 14 / 24
Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions
Demo time !
https://blockly.games/maze?lang=fr&level=10&skin=1
Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 15 / 24
Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions
Qu’est-ce qu’un robot ?
Un robot c’est tout d’abord une base
Ensuite vient le processeur qui exécutera les instructions.
Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 16 / 24
Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions
De quoi un robot a besoin pour évoluer dans son environnement ?
Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 17 / 24
Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions
De quoi un robot a besoin pour évoluer dans son environnement ?
Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 18 / 24
Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions
Un robot peut apercevoir son environnement et l’état de ses composants
grâce aux capteurs. Ceux-ci comprennent :
Les caméras
Les capteurs de proximité
Les capteurs de contact
Les capteurs de température
...
Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 19 / 24
Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions
Un robot peut interagir avec son environnement grâce aux actuateurs.
Ceux-ci comprennent :
Les moteurs
Les bras robotiques
Les divers outils d’un robot
...
Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 20 / 24
Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions
Quels capteurs et actuateurs doit-on donner à un robot
pour qu’il puisse trouver son chemin dans le labyrinthe
grâce à l’algorithme de la main droite ?
Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 21 / 24
Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions
Demo time !
https://www.robotmesh.com/studio
Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 22 / 24
Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions
Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 23 / 24

Contenu connexe

Plus de Tom Mens

Lost in Zero Space
Lost in Zero SpaceLost in Zero Space
Lost in Zero SpaceTom Mens
 
Evaluating a bot detection model on git commit messages
Evaluating a bot detection model on git commit messagesEvaluating a bot detection model on git commit messages
Evaluating a bot detection model on git commit messagesTom Mens
 
Is my software ecosystem healthy? It depends!
Is my software ecosystem healthy? It depends!Is my software ecosystem healthy? It depends!
Is my software ecosystem healthy? It depends!Tom Mens
 
Bot or not? Detecting bots in GitHub pull request activity based on comment s...
Bot or not? Detecting bots in GitHub pull request activity based on comment s...Bot or not? Detecting bots in GitHub pull request activity based on comment s...
Bot or not? Detecting bots in GitHub pull request activity based on comment s...Tom Mens
 
On the fragility of open source software packaging ecosystems
On the fragility of open source software packaging ecosystemsOn the fragility of open source software packaging ecosystems
On the fragility of open source software packaging ecosystemsTom Mens
 
How magic is zero? An Empirical Analysis of Initial Development Releases in S...
How magic is zero? An Empirical Analysis of Initial Development Releases in S...How magic is zero? An Empirical Analysis of Initial Development Releases in S...
How magic is zero? An Empirical Analysis of Initial Development Releases in S...Tom Mens
 
Comparing dependency issues across software package distributions (FOSDEM 2020)
Comparing dependency issues across software package distributions (FOSDEM 2020)Comparing dependency issues across software package distributions (FOSDEM 2020)
Comparing dependency issues across software package distributions (FOSDEM 2020)Tom Mens
 
Measuring Technical Lag in Software Deployments (CHAOSScon 2020)
Measuring Technical Lag in Software Deployments (CHAOSScon 2020)Measuring Technical Lag in Software Deployments (CHAOSScon 2020)
Measuring Technical Lag in Software Deployments (CHAOSScon 2020)Tom Mens
 
SecoHealth 2019 Research Achievements
SecoHealth 2019 Research AchievementsSecoHealth 2019 Research Achievements
SecoHealth 2019 Research AchievementsTom Mens
 
SECO-Assist 2019 research seminar
SECO-Assist 2019 research seminarSECO-Assist 2019 research seminar
SECO-Assist 2019 research seminarTom Mens
 
Empirically Analysing the Socio-Technical Health of Software Package Managers
Empirically Analysing the Socio-Technical Health of Software Package ManagersEmpirically Analysing the Socio-Technical Health of Software Package Managers
Empirically Analysing the Socio-Technical Health of Software Package ManagersTom Mens
 
ConPan: Analysing Packages Installed in Docker Containers
ConPan: Analysing Packages Installed in Docker ContainersConPan: Analysing Packages Installed in Docker Containers
ConPan: Analysing Packages Installed in Docker ContainersTom Mens
 
On the Relation between Outdated Docker Containers, Severity Vulnerabilities,...
On the Relation between Outdated Docker Containers, Severity Vulnerabilities,...On the Relation between Outdated Docker Containers, Severity Vulnerabilities,...
On the Relation between Outdated Docker Containers, Severity Vulnerabilities,...Tom Mens
 
On the diversity of software popularity metrics: An empirical study of npm
On the diversity of software popularity metrics: An empirical study of npmOn the diversity of software popularity metrics: An empirical study of npm
On the diversity of software popularity metrics: An empirical study of npmTom Mens
 
How to increase the technical health of your software?
How to increase the technical health of your software?How to increase the technical health of your software?
How to increase the technical health of your software?Tom Mens
 
"Software Ecosystem Health" lightning talk
"Software Ecosystem Health" lightning talk"Software Ecosystem Health" lightning talk
"Software Ecosystem Health" lightning talkTom Mens
 
On the health of the npm packaging ecosystem
On the health of the npm packaging ecosystemOn the health of the npm packaging ecosystem
On the health of the npm packaging ecosystemTom Mens
 
On the evolution of technical lag in the npm package dependency network
On the evolution of technical lag in the npm package dependency networkOn the evolution of technical lag in the npm package dependency network
On the evolution of technical lag in the npm package dependency networkTom Mens
 
On the impact of security vulnerabilities in the npm package dependency network
On the impact of security vulnerabilities in the npm package dependency networkOn the impact of security vulnerabilities in the npm package dependency network
On the impact of security vulnerabilities in the npm package dependency networkTom Mens
 
SoHeal 2018 Welcome Slides: First International Workshop on Software Health
SoHeal 2018 Welcome Slides: First International Workshop on Software HealthSoHeal 2018 Welcome Slides: First International Workshop on Software Health
SoHeal 2018 Welcome Slides: First International Workshop on Software HealthTom Mens
 

Plus de Tom Mens (20)

Lost in Zero Space
Lost in Zero SpaceLost in Zero Space
Lost in Zero Space
 
Evaluating a bot detection model on git commit messages
Evaluating a bot detection model on git commit messagesEvaluating a bot detection model on git commit messages
Evaluating a bot detection model on git commit messages
 
Is my software ecosystem healthy? It depends!
Is my software ecosystem healthy? It depends!Is my software ecosystem healthy? It depends!
Is my software ecosystem healthy? It depends!
 
Bot or not? Detecting bots in GitHub pull request activity based on comment s...
Bot or not? Detecting bots in GitHub pull request activity based on comment s...Bot or not? Detecting bots in GitHub pull request activity based on comment s...
Bot or not? Detecting bots in GitHub pull request activity based on comment s...
 
On the fragility of open source software packaging ecosystems
On the fragility of open source software packaging ecosystemsOn the fragility of open source software packaging ecosystems
On the fragility of open source software packaging ecosystems
 
How magic is zero? An Empirical Analysis of Initial Development Releases in S...
How magic is zero? An Empirical Analysis of Initial Development Releases in S...How magic is zero? An Empirical Analysis of Initial Development Releases in S...
How magic is zero? An Empirical Analysis of Initial Development Releases in S...
 
Comparing dependency issues across software package distributions (FOSDEM 2020)
Comparing dependency issues across software package distributions (FOSDEM 2020)Comparing dependency issues across software package distributions (FOSDEM 2020)
Comparing dependency issues across software package distributions (FOSDEM 2020)
 
Measuring Technical Lag in Software Deployments (CHAOSScon 2020)
Measuring Technical Lag in Software Deployments (CHAOSScon 2020)Measuring Technical Lag in Software Deployments (CHAOSScon 2020)
Measuring Technical Lag in Software Deployments (CHAOSScon 2020)
 
SecoHealth 2019 Research Achievements
SecoHealth 2019 Research AchievementsSecoHealth 2019 Research Achievements
SecoHealth 2019 Research Achievements
 
SECO-Assist 2019 research seminar
SECO-Assist 2019 research seminarSECO-Assist 2019 research seminar
SECO-Assist 2019 research seminar
 
Empirically Analysing the Socio-Technical Health of Software Package Managers
Empirically Analysing the Socio-Technical Health of Software Package ManagersEmpirically Analysing the Socio-Technical Health of Software Package Managers
Empirically Analysing the Socio-Technical Health of Software Package Managers
 
ConPan: Analysing Packages Installed in Docker Containers
ConPan: Analysing Packages Installed in Docker ContainersConPan: Analysing Packages Installed in Docker Containers
ConPan: Analysing Packages Installed in Docker Containers
 
On the Relation between Outdated Docker Containers, Severity Vulnerabilities,...
On the Relation between Outdated Docker Containers, Severity Vulnerabilities,...On the Relation between Outdated Docker Containers, Severity Vulnerabilities,...
On the Relation between Outdated Docker Containers, Severity Vulnerabilities,...
 
On the diversity of software popularity metrics: An empirical study of npm
On the diversity of software popularity metrics: An empirical study of npmOn the diversity of software popularity metrics: An empirical study of npm
On the diversity of software popularity metrics: An empirical study of npm
 
How to increase the technical health of your software?
How to increase the technical health of your software?How to increase the technical health of your software?
How to increase the technical health of your software?
 
"Software Ecosystem Health" lightning talk
"Software Ecosystem Health" lightning talk"Software Ecosystem Health" lightning talk
"Software Ecosystem Health" lightning talk
 
On the health of the npm packaging ecosystem
On the health of the npm packaging ecosystemOn the health of the npm packaging ecosystem
On the health of the npm packaging ecosystem
 
On the evolution of technical lag in the npm package dependency network
On the evolution of technical lag in the npm package dependency networkOn the evolution of technical lag in the npm package dependency network
On the evolution of technical lag in the npm package dependency network
 
On the impact of security vulnerabilities in the npm package dependency network
On the impact of security vulnerabilities in the npm package dependency networkOn the impact of security vulnerabilities in the npm package dependency network
On the impact of security vulnerabilities in the npm package dependency network
 
SoHeal 2018 Welcome Slides: First International Workshop on Software Health
SoHeal 2018 Welcome Slides: First International Workshop on Software HealthSoHeal 2018 Welcome Slides: First International Workshop on Software Health
SoHeal 2018 Welcome Slides: First International Workshop on Software Health
 

Dernier

presentation l'interactionnisme symbolique finale.pptx
presentation l'interactionnisme symbolique  finale.pptxpresentation l'interactionnisme symbolique  finale.pptx
presentation l'interactionnisme symbolique finale.pptxMalikaIdseaid1
 
Approche-des-risques-par-l’analyse-des-accidents-1.pptx
Approche-des-risques-par-l’analyse-des-accidents-1.pptxApproche-des-risques-par-l’analyse-des-accidents-1.pptx
Approche-des-risques-par-l’analyse-des-accidents-1.pptxssusercbaa22
 
A3iFormations, organisme de formations certifié qualiopi.
A3iFormations, organisme de formations certifié qualiopi.A3iFormations, organisme de formations certifié qualiopi.
A3iFormations, organisme de formations certifié qualiopi.Franck Apolis
 
666148532-Formation-Habilitation-ELECTRIQUE-ENTREPRISE-MARS-2017.pptx
666148532-Formation-Habilitation-ELECTRIQUE-ENTREPRISE-MARS-2017.pptx666148532-Formation-Habilitation-ELECTRIQUE-ENTREPRISE-MARS-2017.pptx
666148532-Formation-Habilitation-ELECTRIQUE-ENTREPRISE-MARS-2017.pptxSAID MASHATE
 
Bolero. pptx . Film de A nnne Fontaine
Bolero. pptx . Film   de  A nnne FontaineBolero. pptx . Film   de  A nnne Fontaine
Bolero. pptx . Film de A nnne FontaineTxaruka
 
LA MONTÉE DE L'ÉDUCATION DANS LE MONDE DE LA PRÉHISTOIRE À L'ÈRE CONTEMPORAIN...
LA MONTÉE DE L'ÉDUCATION DANS LE MONDE DE LA PRÉHISTOIRE À L'ÈRE CONTEMPORAIN...LA MONTÉE DE L'ÉDUCATION DANS LE MONDE DE LA PRÉHISTOIRE À L'ÈRE CONTEMPORAIN...
LA MONTÉE DE L'ÉDUCATION DANS LE MONDE DE LA PRÉHISTOIRE À L'ÈRE CONTEMPORAIN...Faga1939
 
systeme expert_systeme expert_systeme expert
systeme expert_systeme expert_systeme expertsysteme expert_systeme expert_systeme expert
systeme expert_systeme expert_systeme expertChristianMbip
 
MaintenanceLa Maintenance Corrective.ppt
MaintenanceLa Maintenance Corrective.pptMaintenanceLa Maintenance Corrective.ppt
MaintenanceLa Maintenance Corrective.pptssusercbaa22
 
Guide Final de rédaction de mémoire de fin d'étude
Guide Final de rédaction de mémoire de fin d'étudeGuide Final de rédaction de mémoire de fin d'étude
Guide Final de rédaction de mémoire de fin d'étudeBenamraneMarwa
 
Présentation de cartes d'extension zhr..pptx
Présentation de cartes d'extension zhr..pptxPrésentation de cartes d'extension zhr..pptx
Présentation de cartes d'extension zhr..pptxpopzair
 
Cours-irrigation_et_drainage_cours1.pptx
Cours-irrigation_et_drainage_cours1.pptxCours-irrigation_et_drainage_cours1.pptx
Cours-irrigation_et_drainage_cours1.pptxlamourfrantz
 
Fondation Louis Vuitton. pptx
Fondation      Louis      Vuitton.   pptxFondation      Louis      Vuitton.   pptx
Fondation Louis Vuitton. pptxTxaruka
 
Formation M2i - Comprendre les neurosciences pour développer son leadership
Formation M2i - Comprendre les neurosciences pour développer son leadershipFormation M2i - Comprendre les neurosciences pour développer son leadership
Formation M2i - Comprendre les neurosciences pour développer son leadershipM2i Formation
 

Dernier (15)

Pâques de Sainte Marie-Euphrasie Pelletier
Pâques de Sainte Marie-Euphrasie PelletierPâques de Sainte Marie-Euphrasie Pelletier
Pâques de Sainte Marie-Euphrasie Pelletier
 
presentation l'interactionnisme symbolique finale.pptx
presentation l'interactionnisme symbolique  finale.pptxpresentation l'interactionnisme symbolique  finale.pptx
presentation l'interactionnisme symbolique finale.pptx
 
Approche-des-risques-par-l’analyse-des-accidents-1.pptx
Approche-des-risques-par-l’analyse-des-accidents-1.pptxApproche-des-risques-par-l’analyse-des-accidents-1.pptx
Approche-des-risques-par-l’analyse-des-accidents-1.pptx
 
A3iFormations, organisme de formations certifié qualiopi.
A3iFormations, organisme de formations certifié qualiopi.A3iFormations, organisme de formations certifié qualiopi.
A3iFormations, organisme de formations certifié qualiopi.
 
666148532-Formation-Habilitation-ELECTRIQUE-ENTREPRISE-MARS-2017.pptx
666148532-Formation-Habilitation-ELECTRIQUE-ENTREPRISE-MARS-2017.pptx666148532-Formation-Habilitation-ELECTRIQUE-ENTREPRISE-MARS-2017.pptx
666148532-Formation-Habilitation-ELECTRIQUE-ENTREPRISE-MARS-2017.pptx
 
Bolero. pptx . Film de A nnne Fontaine
Bolero. pptx . Film   de  A nnne FontaineBolero. pptx . Film   de  A nnne Fontaine
Bolero. pptx . Film de A nnne Fontaine
 
LA MONTÉE DE L'ÉDUCATION DANS LE MONDE DE LA PRÉHISTOIRE À L'ÈRE CONTEMPORAIN...
LA MONTÉE DE L'ÉDUCATION DANS LE MONDE DE LA PRÉHISTOIRE À L'ÈRE CONTEMPORAIN...LA MONTÉE DE L'ÉDUCATION DANS LE MONDE DE LA PRÉHISTOIRE À L'ÈRE CONTEMPORAIN...
LA MONTÉE DE L'ÉDUCATION DANS LE MONDE DE LA PRÉHISTOIRE À L'ÈRE CONTEMPORAIN...
 
systeme expert_systeme expert_systeme expert
systeme expert_systeme expert_systeme expertsysteme expert_systeme expert_systeme expert
systeme expert_systeme expert_systeme expert
 
Evaluación Alumnos de Ecole Victor Hugo
Evaluación Alumnos de Ecole  Victor HugoEvaluación Alumnos de Ecole  Victor Hugo
Evaluación Alumnos de Ecole Victor Hugo
 
MaintenanceLa Maintenance Corrective.ppt
MaintenanceLa Maintenance Corrective.pptMaintenanceLa Maintenance Corrective.ppt
MaintenanceLa Maintenance Corrective.ppt
 
Guide Final de rédaction de mémoire de fin d'étude
Guide Final de rédaction de mémoire de fin d'étudeGuide Final de rédaction de mémoire de fin d'étude
Guide Final de rédaction de mémoire de fin d'étude
 
Présentation de cartes d'extension zhr..pptx
Présentation de cartes d'extension zhr..pptxPrésentation de cartes d'extension zhr..pptx
Présentation de cartes d'extension zhr..pptx
 
Cours-irrigation_et_drainage_cours1.pptx
Cours-irrigation_et_drainage_cours1.pptxCours-irrigation_et_drainage_cours1.pptx
Cours-irrigation_et_drainage_cours1.pptx
 
Fondation Louis Vuitton. pptx
Fondation      Louis      Vuitton.   pptxFondation      Louis      Vuitton.   pptx
Fondation Louis Vuitton. pptx
 
Formation M2i - Comprendre les neurosciences pour développer son leadership
Formation M2i - Comprendre les neurosciences pour développer son leadershipFormation M2i - Comprendre les neurosciences pour développer son leadership
Formation M2i - Comprendre les neurosciences pour développer son leadership
 

Comment programmer un robot en 30 minutes?

  • 1. Comment programmer un robot en 30 minutes? Sciences Informatiques Faculté des Sciences Université de Mons 24-25 mars 2022
  • 2. Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions Contact Courriel secretariat.FS@umons.ac.be informatique@umons.ac.be Sites web Université de Mons https://web.umons.ac.be/fr/ Département d’informatique http://informatique.umons.ac.be Enseignement en sciences informatiques http://informatique.umons.ac.be/index.php?p=teaching https://web.umons.ac.be/fr/formations/ Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 2 / 24
  • 3. Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions Objectif Dans cet atelier nous allons : apprendre un robot à sortir d’un labyrinthe de manière autonome https://youtu.be/_tKUm0VoYI4 Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 3 / 24
  • 4. Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions Objectif Dans cet atelier nous allons : Apprendre un robot à sortir d’un labyrinthe de manière autonome à l’aide du langage de programmation Blockly https://blockly.games sur base d’un algorithme (une sorte de recette) permettant de trouver son chemin dans un labyrinthe Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 4 / 24
  • 5. Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions Blockly est un langage de programmation visuel : plus simple à comprendre composé de briques représentant les éléments principaux permettant de construire un programme exécutable un alternatif visuel à des langages de programmation textuels (par exemple, Java, Python, JavaScript, . . . ) Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 5 / 24
  • 6. Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions Le langage de programmation Blockly Un programme est composé de blocs rattachés comme un puzzle. Cet ensemble de blocs correspond aux instructions que le programme va exécuter. Les instructions seront interprétées et exécutées par le programme de haut en bas. Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 6 / 24
  • 7. Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions Exemple Un astronaute doit trouver son chemin dans une station spatiale vers le sas où se trouve ses outils Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 7 / 24
  • 8. Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions Exemple Pour ce faire, l’astronaute peut e↵ectuer les actions suivantes : avancer tourner à gauche (sur lui-même à 90 ) tourner à droite (sur lui-même à 90 ) Ces actions seront exécutées par l’astronaute grâce aux blocs d’instructions suivants : Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 8 / 24
  • 9. Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions Comment peut-on éviter de devoir écrire plusieurs fois la même instruction ? Grâce aux boucles ! Une boucle répétera une ou plusieurs actions tant que la condition de la boucle est respectée Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 9 / 24
  • 10. Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions On peut utiliser des conditions pour que le programme prenne une décision selon la situation rencontrée. Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 10 / 24
  • 11. Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions Le programme exécutera les instructions (les blocs) de haut en bas. S’il tombe sur une condition, il évaluera la réponse : Si la condition est vérifiée, une certaine suite d’instructions sera exécutée Sinon, une autre suite d’instructions sera exécutée Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 11 / 24
  • 12. Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions Considérez le plan d’une station spatiale comme un labyrinthe. Quel algorithme peut être utilisé par l’astronaute pour trouver son chemin, s’il ne connaı̂t pas le plan de la station ? Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 12 / 24
  • 13. Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions L’algorithme de la main droite Il suffit de garder sa main droite sur le mur situé à sa droite et le suivre. Il faut tourner à droite si on ne touche plus le mur. Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 13 / 24
  • 14. Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions Solution alternative La technique peut aussi être utilisée avec la main gauche. Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 14 / 24
  • 15. Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions Demo time ! https://blockly.games/maze?lang=fr&level=10&skin=1 Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 15 / 24
  • 16. Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions Qu’est-ce qu’un robot ? Un robot c’est tout d’abord une base Ensuite vient le processeur qui exécutera les instructions. Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 16 / 24
  • 17. Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions De quoi un robot a besoin pour évoluer dans son environnement ? Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 17 / 24
  • 18. Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions De quoi un robot a besoin pour évoluer dans son environnement ? Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 18 / 24
  • 19. Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions Un robot peut apercevoir son environnement et l’état de ses composants grâce aux capteurs. Ceux-ci comprennent : Les caméras Les capteurs de proximité Les capteurs de contact Les capteurs de température ... Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 19 / 24
  • 20. Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions Un robot peut interagir avec son environnement grâce aux actuateurs. Ceux-ci comprennent : Les moteurs Les bras robotiques Les divers outils d’un robot ... Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 20 / 24
  • 21. Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions Quels capteurs et actuateurs doit-on donner à un robot pour qu’il puisse trouver son chemin dans le labyrinthe grâce à l’algorithme de la main droite ? Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 21 / 24
  • 22. Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions Demo time ! https://www.robotmesh.com/studio Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 22 / 24
  • 23. Introduction Le langage Blockly Sortir d’un labyrinthe Programmer un robot Questions Sciences Informatiques UMONS Comment programmer un robot en 30 minutes? 24-25 mars 2022 23 / 24