Différences entre versions de « Pololu-Zumo-Shield-Arduino-detecter-bord »

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche
Ligne 3 : Ligne 3 :
 
{{traduction}}
 
{{traduction}}
  
Adding sensors to the Zumo allows it to sense and react to its surroundings. In a sumo competition where two robots try to push each other out of a circular ring, it is important for a robot to be able to detect the border of the ring so it can avoid driving over the edge. Since standard robot sumo rings are colored black with a white border around the edge, infrared reflectance sensors like our QTR sensors <small>[https://www.pololu.com/category/123/pololu-qtr-reflectance-sensors lien pololu]</small> are great for this purpose. The Zumo Reflectance Sensor Array {{polpl|1419}} conveniently mounts six of these sensors in a module designed to plug directly into the front expansion header of the Zumo Shield (note: the {{pl|448|pre-assembled version of the Zumo robot}} {{polpl|2510}} ships with this reflectance sensor array already installed).
+
Ajouter des senseurs au Zumo lui permet de sentir et réagir au monde qui l'entoure. Dans les compétitions sumo où deux robots essayent de se pousser l'un l'autre hors du ring (ring circulaire), il est important que  que le robot puisse détecter le bord du ring afin de ne pas dépasser la frontière. Etant donné que les rings sumo sont noir avec une bordure blanche (tout le long de la frontière), un senseur infrarouge tel que les capteurs QTR <small>[https://www.pololu.com/category/123/pololu-qtr-reflectance-sensors lien pololu]</small> est particulièrement bien adapté. Le réseau de senseur infrarouge du Zumo {{polpl|1419}} est équipé de 6 capteurs QTR sur une carte conçue pour prendre place directement sur le connecteur d'extension situé à l'avant du shield Zumo (note: le {{pl|448|zumo robot pre-assemblé}} {{polpl|2510}} est déjà équipé avec le réseau de senseur infrarouge).
  
{{POLImage|Pololu-Zumo-Shield-Arduino-detecter-bord-00.jpg|300px|A Zumo robot preparing to attack a Parallax SumoBot.}} {{POLImage|Pololu-Zumo-Shield-Arduino-ajouter-detecteur-ligne-33.jpg|300px|Zumo reflectance sensor array on a Zumo robot, bottom view.}}
+
{{POLImage|Pololu-Zumo-Shield-Arduino-detecter-bord-00.jpg|300px|Un robot Zumo se préparant à attaquer un SumoBot Parallax.}} {{POLImage|Pololu-Zumo-Shield-Arduino-ajouter-detecteur-ligne-33.jpg|300px|Le réseau de senseur infrarouge du Robot Zumo, vue du dessous.}}
  
This example demonstrates how to program an Arduino-controlled Zumo equipped with a reflectance sensor array to drive around and stay within a sumo ring. Note that it only uses the two outermost sensors on the array, which are sufficient for border detection. With the [[Pololu-Zumo-Shield-Arduino-bibliotheque-Zumo|Zumo Shield Arduino Libraries]] installed, the sketch file can be opened in Arduino by selecting '''Fichier > Exemples > ZumoExamples > BorderDetect'''.
+
Cet exemple montre comment programmer un Robot Zumo Arduino équipé du réseau de senseur infrarouge pour qu'il se balade dans sur un ring sans jamais en sortir. Notez qu'il utilise les deux senseurs situés sur chaqye extrémité du réseau de capteur (ce qui est suffisant pour une détection de bordure). Après avoir installé les [[Pololu-Zumo-Shield-Arduino-bibliotheque-Zumo|bibliothèques Arduino du shield Zumo]], vous pouvez ouvrir le croquis/sketch en sélectionnant le point de menu '''Fichier > Exemples > ZumoExamples > BorderDetect'''.
  
 
You might need to edit a few things in this sketch to make it work well with your Zumo:
 
You might need to edit a few things in this sketch to make it work well with your Zumo:

Version du 16 avril 2017 à 19:56

Ajouter des senseurs au Zumo lui permet de sentir et réagir au monde qui l'entoure. Dans les compétitions sumo où deux robots essayent de se pousser l'un l'autre hors du ring (ring circulaire), il est important que que le robot puisse détecter le bord du ring afin de ne pas dépasser la frontière. Etant donné que les rings sumo sont noir avec une bordure blanche (tout le long de la frontière), un senseur infrarouge tel que les capteurs QTR lien pololu est particulièrement bien adapté. Le réseau de senseur infrarouge du Zumo lien pololu est équipé de 6 capteurs QTR sur une carte conçue pour prendre place directement sur le connecteur d'extension situé à l'avant du shield Zumo (note: le zumo robot pre-assemblé lien pololu est déjà équipé avec le réseau de senseur infrarouge).

Pololu-Zumo-Shield-Arduino-detecter-bord-00.jpg

Un robot Zumo se préparant à attaquer un SumoBot Parallax.

Cliquer l'image pour l'agrandir

Pololu-Zumo-Shield-Arduino-ajouter-detecteur-ligne-33.jpg

Le réseau de senseur infrarouge du Robot Zumo, vue du dessous.

Cliquer l'image pour l'agrandir

Cet exemple montre comment programmer un Robot Zumo Arduino équipé du réseau de senseur infrarouge pour qu'il se balade dans sur un ring sans jamais en sortir. Notez qu'il utilise les deux senseurs situés sur chaqye extrémité du réseau de capteur (ce qui est suffisant pour une détection de bordure). Après avoir installé les bibliothèques Arduino du shield Zumo, vous pouvez ouvrir le croquis/sketch en sélectionnant le point de menu Fichier > Exemples > ZumoExamples > BorderDetect.

You might need to edit a few things in this sketch to make it work well with your Zumo:

  • If one or both of your motors have been connected backwards, uncomment lines 48 and/or 49 to correct their directions.
  • Adjust the speeds and durations in lines 13-17. Generally, lower speeds and shorter durations should work better with faster motors, while higher speeds and longer durations should be more appropriate for slower motors. We found that these default values worked well with a Zumo using 75:1 HP motors lien pololu.
  • Finally, the sensor reading threshold used to differentiate between black and white surfaces, defined on line 10, might need to be changed to suit your environment.

Upload the sketch to an Arduino mounted on a Zumo, place the Zumo on a sumo ring (or a similar large dark surface with a light border), and press the user pushbutton. Be ready to catch the Zumo in case it drives off the ring! If everything works right, the Zumo should sound a countdown with its buzzer and then start driving forward until it detects the ring border; it should then back up, turn, and continue. If not, try adjusting some of the parameters as described above. Here are some specific troubleshooting tips:

  • If the Zumo overshoots the ring border, try lowering FORWARD_SPEED (especially if it is going very fast) or reducing QTR_THRESHOLD.
  • If the Zumo stops at the border but turns too much or not enough before continuing, adjust TURN_SPEED and/or TURN_DURATION.
  • If you do not hear any sound from the buzzer, make sure you have the buzzer control jumper configured correctly for your Arduino.

The ability to wander around while staying inside a sumo ring is enough to allow a Zumo to compete as a basic sumo robot, but a more advanced robot might be able to detect its opponent and drive toward it directly. As a next step, you might consider adding more sensors, such as range finders lien pololu to allow the Zumo to find its opponent instead of relying on luck to make contact.


Basé sur "Zumo Shield for Arduino" de Pololu (www.pololu.com/docs/0J57) - Traduit en Français par shop.mchobby.be CC-BY-SA pour la traduction
Toute copie doit contenir ce crédit, lien vers cette page et la section "crédit de traduction". Traduit avec l'autorisation expresse de Pololu (www.pololu.com)

Based on "Zumo Shield for Arduino" from Pololu (www.pololu.com/docs/0J57) - Translated to French by shop.mchobby.be CC-BY-SA for the translation
Copies must includes this credit, link to this page and the section "crédit de traduction" (translation credit). Translated with the Pololu's authorization (www.pololu.com)