20
#NAOROBOT

NAO Robot workshop for kids (english)

Embed Size (px)

Citation preview

Page 1: NAO Robot workshop for kids (english)

#NAOROBOT

Page 2: NAO Robot workshop for kids (english)

Choregraphe (2.1.2)

It’s a graphical interface to program NAO(downloadable after creating an account on Community)

Main Plane

Simulator

Boxes

Page 3: NAO Robot workshop for kids (english)

Dedicated LibraryFor this workshop, you’ll need to add a library.It’s called Library_Kids_NAOWorkshop.cbl

It contains 3 boxes: LookAround, RaiseArm, LowerHand

Click « open box library »and select the .cbl file

Page 4: NAO Robot workshop for kids (english)

What’s a box?

A box contains some code executing a specific action It’s mainly Python code

Also, a box can be made of other boxes

A box can have different outputs

Input Output

Parameters

Edit the box: double clickStop box

Page 5: NAO Robot workshop for kids (english)

Goal of the workshop

• Setup NAO

• Locate someone and walk to that person

• Ask for an handkerchief

• Grab it

• Ask where to drop it

• Go to this specific place and drop the handkerchief

Sounds easy, right?

Now let’s launch Choregraphe and start a new project!

Page 6: NAO Robot workshop for kids (english)

Define language

Set language box

-> set parameters to english

-> connect to the beginning

Page 7: NAO Robot workshop for kids (english)

Wait for me before starting!

Tactile Head box

-> connect to previous box

-> select one zone (output) that youwill touch to launch the behavior

(let’s take the first one) and connectthe output so as to stop the box when pressed

Page 8: NAO Robot workshop for kids (english)

Let’s start!

Motor On/Off box

-> connect to previous box

-> set parameter to « on »

Stand Up box

-> connect to previous box

-> if box fails, connect the right output to end of the behavior

Page 9: NAO Robot workshop for kids (english)

Is someone here?

Two things at the same time once NAO is standing:LookAround box-> connect to previous box

Face Detection box-> connect to previous box-> when it finds a face, it must stop itself and the LookAround box

Page 10: NAO Robot workshop for kids (english)

OK, let me get closer to you!

Face Tracker box

-> connect to previous box (Face Detection)

-> edit parameters: mode must beset to « move »

-> when target is reached, the box stops itself

Page 11: NAO Robot workshop for kids (english)

I have a question for you

Say box

-> connect to previous box

-> edit the box (double click)

1) make sure language is set to

english

2) add text « Hello! Can you please

give me a handkerchief? »

-> click on root to go back to main plane

Page 12: NAO Robot workshop for kids (english)

Give it to me 1/2

RaiseArm box-> connect to previous box

Hands box-> connect to previous box-> edit parameters:

1) select left hand2) select « open »

Choice box-> connect to previous box-> edit the box

1) select « english »2) add text « can I close my hand? Yes or

no? »3) create a new output and connect it to

the « No » answer

Page 13: NAO Robot workshop for kids (english)

Give it to me 2/2

If the answer is yes (mid output)

Hands box

-> edit parameters to close lefthand

If the answer is no (last output):

Wait box

-> connect to previous box

-> edit parameters and set timeout to 1s

-> connect the output to choice box to relaunch the process

Page 14: NAO Robot workshop for kids (english)

What should I do with this?

Choice box

-> connect to previous box

-> edit the box

1) select « english »

2) add text « Thanks! Should I drop it in the trash or put it on the table? Tell me: trash or table? »

3) add choice « trash » & « table »

4) create an output for « table » and connect it correctly

Page 15: NAO Robot workshop for kids (english)

Where’s the right place? 1/3

Let’s do the first option:

->Connect the first output of Choice box to the LookAround box

NAOMark box

-> connect to previous box (Choice)

Switch Case box

-> connect to previous box (NAOMark)

Page 16: NAO Robot workshop for kids (english)

Where’s the right place? 2/3

Let’s do the first option:Switch Case box:-> enter value 85-> connect the first output back to NAOMark box to relaunch it-> connect the second output to stop the NAOMark box and to stop the LookAround box

Landmark Tracker box:-> connect to previous box-> edit parameters and set mode to « move »-> connect last output (target reached) to stop the box

Page 17: NAO Robot workshop for kids (english)

Where’s the right place? 3/3

Let’s repeat this for the second option:

-> Add all the boxes and connectthem correctly

-> This time, NAO will be lookingfor NAOMark 63

Page 18: NAO Robot workshop for kids (english)

Let me get rid of this

Let’s do the first option:

LowerHand box:

-> connect both landmark trackerbox « target reached » outputs to launch the box

Hands box:

-> connect to previous box

-> edit parameters to open lefthand

-> connect output to the end of the program

Page 19: NAO Robot workshop for kids (english)

Bonus (after testing)

How can we enhanced the user experience?

- Get NAO to present what is going to happen at the beginning of the app

- Get NAO to sit after he’s completely finished

- What else would you add?

Page 20: NAO Robot workshop for kids (english)