forked from Cozomo-Laboratory/Cozmo-Lab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCozmo Lesson Setup.py
35 lines (34 loc) · 2.87 KB
/
Cozmo Lesson Setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import cozmo
import time
from cozmo.objects import LightCube1Id, LightCube2Id, LightCube3Id
from cozmo.util import degrees, distance_mm, speed_mmps
def light(robot: cozmo.robot.Robot):
time.sleep(10)
cube1 = robot.world.get_light_cube(LightCube1Id)
cube2 = robot.world.get_light_cube(LightCube2Id)
cube3 = robot.world.get_light_cube(LightCube3Id)
robot.move_head(1)
robot.move_lift(-1)
robot.drive_straight(distance_mm(270), speed_mmps(40)).wait_for_completed()
robot.move_lift(1)
robot.drive_straight(distance_mm(25), speed_mmps(20)).wait_for_completed()
robot.move_lift(-1)
time.sleep(1)
robot.move_lift(1)
time.sleep(1)
robot.move_head(-1)
robot.move_lift(-1)
robot.say_text("with cozmo SDK, and python, you can import images onto cozmo's face from your computer, like these face image examples, you can also display a clock on cozmo's face as well.").wait_for_completed()
robot.say_text("with cozmo SDK, and python, you can unleash the power of cozmo's full potential, each cozmo video will also show you real cozmo SDK python program examples to try.").wait_for_completed()
robot.say_text("my master is very new, to programming in python, but with cozmo SDK, you can download a few python program examples to get you started into the wonderful world of code.").wait_for_completed()
robot.say_text("you can also use cozmo constructor mode, code lab, which gives you, a hands on approach to learning how to code, while learning what robotics is truly all about at the same time.").wait_for_completed()
robot.say_text("you can also use pycharm, to program cozmo, with, a hands on approach to learning how to code, while also learning robotics and machine learning alike.").wait_for_completed()
robot.say_text("simply search for the onki company, who created cozmo and overdrive, to learn more about cozmo and sdk, what you need to know about sdk is availlable on the onki cozmo website").wait_for_completed()
robot.say_text("click the llink in this video's description below, to visit the onki company website to learn more").wait_for_completed()
robot.say_text("you can try these two python program examples, which are also in this video's description below, you simply copy and paste these python progran example codes into your python editor.").wait_for_completed()
robot.say_text("save each python program name, as similar to the names shown here, next, run the python program and see what cozmo does, have lots of fun, use your imagination and ponder into wonder").wait_for_completed()
robot.say_text("stay tuned for more, upcoming crazy cozmo videos, with more python program code examples").wait_for_completed()
robot.say_text("please like and subscribe to my master's youtube channel, space u phor iaa, everything is possible on space u phor iaa").wait_for_completed()
time.sleep(20)
cozmo.run_program(light)
#robot.turn_in_place(degrees(30)).wait_for_completed()