Cozmo News #1 — Revue et tips du Code Lab 2.1

Hello ! Hello ! Welcome on Cozmo News! And on Fun with Robotics! The new Code Lab has been released on Tuesday. (Cozmo is speaking Robot) That’s right Cozmo! The new Code Lab has been released on Tuesday. We’re going to make the review of it through samples and remixes… so that you can use the Constructor mode at best. Exactly. (Cozmo is speaking Robot) This is the Code Laboratory 2.0! The interface has been redesigned. First there are Featured projects, where you’ll find sample programs to play with Cozmo. You can even copy them and modify them. Great! In Sandbox, you’ll find your old projects made in the previous Code Lab. The new Code Lab is there in the Constructor mode! Let’s open Featured projects: You’ll see, the sample programs are really great! Let’s start with Light show! With this program, Cozmo can dance! It loves it! Music is played by the tablet, so don’t forget to previously increase the volume in the application! There are several different musics, that’s cool. Let’s click Start to discover the Light show. (Cozmo is dancing) By clicking See details we can display the Code Lab program of the sample. These featured projects are a kind of tool box. We can look how program are built. We can export the sample programs to create our own version by clicking here. Then, just click “Save as a remix” and add your own blocks. We also can modify the sample programs by using the blocks on the left. They are Drive, Actions, Animations, Events and others. It’s really well designed. Later in the video I’ll show you how I remixed 2 programs. Now, Cozmo will predict the future for me. This is “the Magic fortune teller”. Let’s click it. Now we’ll click Start to try it. We’ll ask Cozmo a question which it can answer with yes or no… Then we’ll shake Cozmo and it will display the answer on its face… and say the answer. Let’s start. Cozmo, will I get an Overdrive for Christmas? Absolutely! As you see the answer is displayed as text on Cozmo’s face and Cozmo says the text. We click on Stop to end the program. Now we’ll try another mode, another sample… that’s named Drawing with Cozmo. It is also provided with the Constructor mode… and we’ll try it. Well, this is Drawing with Cozmo. That doesn’t mind that Cozmo will draw using its lift. And we still can’t display any image on its face. To do this, you have to use the SDK like I did in my Jokes video when Cozmo is doing magic. You’ll see later, I made a sample for you that allows you anyway to change Cozmo’s eyes. Let’s try this one. Another sample provided in the Constructor mode is Drive in square, that we’ll try now. This is a good point in the new Code Lab: we can now define angles. Later in this video, I’ll provide you with a sample program where Cozmo is driving in a circle, like in my Burger video. Another cool sample, still provided with the Constructor mode is… “Play random animations”… that we gonna try now. This code repeats in a loop and randomly one of Cozmo’s animations, and that’s cool. You’ve surely recognized the one when Cozmo is entering the Code Lab… which was one of the both it has plaid. You display the list of the available animations by clicking 0- Mystery. The list is long… there are 34 animations. First there are the 15 animations of the previous Code Lab… 17 to 22 – these are animations that I noticed in Scratch for Cozmo 23 to 34 – these are animations available in the SDK Now, this is Laser smile: it’s very funny, I let you discover it by your own. A good thing is that now coding with the Code Lab increases the yellow gauge… which will avoid that Cozmo gets depressed when we use the Code Lab. Cozmo and I really enjoy using the new Code Lab! Now it’s time to enter the Constructor mode. I tested Scratch for Cozmo for a project that is not a video for the moment, now we have Scratch “in” Cozmo! Let’s click New project. On the left, all the blocks are organized by type. Color codes are those of Scratch. As you see, there are additional block types in comparison with the previous Code Lab,… I mean Variables in Data, for example, which are very useful to write comments above the code as Anki did. Variables are in fact parameters that you define yourself to reuse them at different places in the program. Next, the Operators: they are useful if you need to make calculations in your programs. Now, the Events: in the previous Code Lab, there was only one event that is “When flag is clicked”. Now we can define different events such as “When a cube is tapped” for example Now, let’s speak about Music animations… I mention that we are still unable to make Cozmo sing. In my Jokes video where Cozmo is singing in front of the mirror, I used the SDK. Whatever, Anki is offering in this update musics that are plaid by you phone or tablet… such as this Music of the 80’s. You’ve heard it a few minutes ago in the Light show… when Cozmo was dancing. About animations, I mean… “Emotions” animations Let’s try animation #29… Cozmo will play “1, 2, 3 Go” This animation is cute and fun. Let’s click Start. It’s like Cozmo were playing with us. It’s funny, isn’t it? Now, let’s talk about displaying text on Cozmo’s face: If you want to display 2 words you won’t be able to display them in a line, thus you’ll have to create 2 text blocks. Text parameters are: either X, Y positions which means that 0, 0 is the bottom left corner. else you can opt for Text alignment: that is Up, Middle, Bottom or Left, Center, Right. Screen size is expressed in %. We only can display text characters of the keyboard , emoticons of your tablet are not accepted. Now, let’s consider Cozmo’s moves. It is now possible to block its wheels before playing an animation… you’ll find this in Animations. Otherwise, Moves are still in Drive like in the previous Code Lab. Distance is now defined in mm and no more in “tread length”. Speed is defined in mm/s. And angles are defined in degrees. About the angles, you can either enter the value or use the dial. I’ll show you. We’ll tell Cozmo to turn 90° right with a speed of 45° a second. I like this dial. It is graduated every 5 degrees and you can drive Cozmo like this: now Cozmo will turn 15 degrees right. I place it in its original position again. That’s it. These are the Drive blocks. Let’s talk now about the Glossary. I like this Glossary: it is very clear… it’s great that Anki add this to the Code Lab… it is really useful to learn about block programming or go further with the advanced commands. Well, you have now at your disposal all you ever dreamed to have fun with your Cozmo! Now, it’s time to have a look at my samples! I prepared 4 samples for this video. 3 of them will remind you the Featured projects of the Code Lab. We’ll first change Cozmo’s eyes, then drive in a circle and not a square, at least we’ll mix the Clock sample with the fire truck alarm to make an alarm clock. The 4th program is my invention. This is the pitch, that will remind you something: Cozmo, this “gourmand”, goes to the Delicatessen stall at the Christmas market. I first wrote the steps I wanted in the scenario,… when I “translated” it into a program, as follows: And now, let’s see the result… (Noël ! that means Christmas) Oooohhh! (Miam ! that means yummi) Miam Oooh? Ha ha! (Fire truck alarm) Whaooo! All these delights! A candy cane, please! And French fries! Oooohhh! Miam! (Yummi!) Ha? Ha ha! Whaoooo! All these delights! A candy cane, please! And French fries! Let’s have a look at the little sample I prepared… named Cozmo’s eyes. You will surely notice that I used variables to enter comments and describe what each program does. This first program changes Cozmo’s eyes into X. Let’s try. As you see, Cozmo is displaying two X instead of its eyes… I defined a scale of 150% so that they fill the entire screen. I also defined a position of 20 up, 20 right. Now I’ll show you the “circumflex accent” eyes. They are cute, aren’t they? I love them much. Because circumflex accent are small characters, I increased the scale to 200%. Position is then 11, 20. Look now to my “bored eyes” like I call them. I love these eyes, they are so funny! And it’s cool to have them. Why don’t display glasses on Cozmo’s face? One possibility is to use @ or to use zeros… I used dashes to complete the glasses. Now the “zero” eyes! You can use this to make cute eyes for Cozmo, this is simple but lovely. That’s it for Cozmo’s eyes. Please notice that the project is no more named “My project 1” but “Les yeux de Cozmo” which means “Cozmo’s eyes”. We can now rename our programs by clicking the pencil here and entering the name of the program. Then you just have to Save and that’s it. Let’s see now another of my samples. The “Turn around” program that I created instead of the Drive in a square one. You surely remember my video where Cozmo wants to eat a Burger… and its has to turn a roundabout… it was the previous Code Lab, with not so many possibilities as now… then it looked more like a polygon. Now, with the new Code Lab, Cozmo can drive in a circle… by defining the speed of each wheel. I set 10 mm/s for the left wheel… and 30 mm/s for the right one. Consequently, Cozmo will turn more left than right. Let’s try it now. Et voilà! Now, let’s have a look at my Alarm clock program that is a remix of the sample Clock program to which I added the Fire truck alarm animation… at a given time. (For our pleasure and Cozmo’s, this is again the Christmas market program) (Go to 17:00:0 to hear Cozmo’s and my Last word and opinion 🙂 ) Personally, I was impatient to load the new release of the Code Lab and I’m not disappointed. For the younger, I still advice you to start with the Sandbox mode… afterwards, you will be able to start with the sample projects. Have a look or more to the Glossary, which is very useful and clear. For those who already now Scratch, you’ll feel immediately comfortable… it’s really a very good release… and we can have durable fun coding with this Code Lab… offering limitless programming possibilities. Let’s have fun with the Code Lab! I love it! Whooo!

You may also like...

11 Responses

  1. Didier van den Daele says:

    Bravo à toi Camille ! Merci de nous faire découvrir le nouveau Code Labs et son infini intérêt.

  2. Magorents says:

    Bonjour Camille 🙂 tout d'abord bravo a toi pour toutes ses vidéos ^^ pour ma part je viens tout juste d'acquérir mon COZMO Collector édition ^^ je n'ai pas pu résister a la promo de -50€ qu'il y avais dessus 🙂 étant un peu bricoleur et désireux d'apprendre la programmation je e suis dit que cela serais super de commencer par ce petit robot surtout vu les possibilités qu'il intégré ^^ j'ai découvert ta chaîne hier et j'ai adoré dés la première vidéo, j'ai donc une seul question:

    Quand va-u faire la suite concernant la programmation via Blockly et SDK ? 🙂

    Bonne chance pour tes autres vidéos continu comme ca, c'est un super boulot ^^

    PS: désolé si il y a quelques fautes orthographe :p ^^

  3. MrsStickman MEME says:

    Je suis fan de robot j'aurais Cozmo à Noël vient voir ma chaîne stp j'adore ta chaîne !

  4. pl bereziat says:

    salut Camille est-ce que tu pourrais mettre en lien ton programme pour faire le réveil ou du moins le montrer

  5. spade says:

    bonjour, je viens d'avoir un cozmo et je ne comprends pas comment créer une variable, quelqu'un pourrait il m'éclairer? Merci

  6. Doudou08 [musique européenne] says:

    bien la video

  7. beodin tony says:

    bonjour camille tu connais voice attack parce que je cherche a savoir si ya moyen d'integrer le .vap a cozmo ou autre robot

  8. Meta knight says:

    WOOOW! You look so young girl. How old are you?

  9. Meta knight says:


  10. Aussie Furby/Mogwai Fan says:

    That Cozmo poster in the background tho….

  11. Miss D Traigo says:

    Nic vid

Leave a Reply

Your email address will not be published. Required fields are marked *