59 lines
1.7 KiB
Python
59 lines
1.7 KiB
Python
import time
|
|
from rp_lib import * # Bibliothèque Ropy
|
|
|
|
###############################################################################
|
|
# rp_cmd-correction_mission_2.py
|
|
# @title: Commandes pour le Rover Ropy - Correction mission 2
|
|
# @project: Ropy (Blender-EduTech)
|
|
###############################################################################
|
|
|
|
###############################################################################
|
|
# Initialisation du niveau :
|
|
# Niveau 1 : Les premiers pas de Ropy
|
|
# Niveau 2 : Ma première fonction
|
|
# Niveau 3 : Sécuriser Ropy
|
|
# Niveau 4 : Partir au bout du monde
|
|
# Niveau 5 : Faire face à l'inconnu
|
|
# Niveau 6 : Se rendre utile
|
|
###############################################################################
|
|
|
|
###############################################################################
|
|
# Fonctions
|
|
###############################################################################
|
|
|
|
# Avancer + marquer (mission 2)
|
|
def mrp_avancer ():
|
|
rp_avancer()
|
|
rp_marquer()
|
|
|
|
###############################################################################
|
|
# Commandes
|
|
###############################################################################
|
|
|
|
def commandes():
|
|
|
|
rp_gauche()
|
|
mrp_avancer()
|
|
rp_droite()
|
|
mrp_avancer()
|
|
mrp_avancer()
|
|
mrp_avancer()
|
|
mrp_avancer()
|
|
rp_droite()
|
|
mrp_avancer()
|
|
mrp_avancer()
|
|
|
|
###############################################################################
|
|
# En: External call << DONT CHANGE THIS SECTION >>
|
|
# Fr: Appel externe << NE PAS MODIFIER CETTE SECTION >>
|
|
###############################################################################
|
|
|
|
def cycle():
|
|
commandes()
|
|
rp_fin()
|
|
|
|
if __name__=='start':
|
|
thread_cmd_start(cycle)
|
|
if __name__=='stop':
|
|
thread_cmd_stop()
|