32
TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson ([email protected]) Fredrik Heintz ([email protected]) October 23, 2015

TDDD63 Project: Humanoids Version 3TDDD63/projects/2015/... · TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson ([email protected])

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: TDDD63 Project: Humanoids Version 3TDDD63/projects/2015/... · TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson (erik.b.hansson@liu.se)

TDDD63 Project: HumanoidsVersion 3.01

Jon Dybeck (jondy276)Carl Ehrenstråhle (careh585)

Erik Hansson ([email protected])Fredrik Heintz ([email protected])

October 23, 2015

Page 2: TDDD63 Project: Humanoids Version 3TDDD63/projects/2015/... · TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson (erik.b.hansson@liu.se)

Contents

1 Project overview 31. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32. Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43. The Nao robot . . . . . . . . . . . . . . . . . . . . . . . . . . . 64. Handling Nao and guidelines for the lab . . . . . . . . . . . . . 7

2 Configuration and installation 91. Configuring the tools . . . . . . . . . . . . . . . . . . . . . . . . 92. Downloading python wrapper . . . . . . . . . . . . . . . . . . . 93. Updating python wrapper . . . . . . . . . . . . . . . . . . . . . 104. Version numbering . . . . . . . . . . . . . . . . . . . . . . . . . 10

3 Assignments 11Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

1. Intro Phase: Assignment One – Hello world! . . . . . . . . . . . 12Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Examination . . . . . . . . . . . . . . . . . . . . . . . . . 12

1.1. Milestone One – Stand and sit . . . . . . . . . . . . . . . 121.2. Milestone Two – "Hello world!", says Nao . . . . . . . . . 151.3. Milestone Three – Wait for touch . . . . . . . . . . . . . 18

2. Intro Phase: Assignment Two – Basic skills . . . . . . . . . . . . 22Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . 22Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22Examination . . . . . . . . . . . . . . . . . . . . . . . . . 22

2.1. Milestone One – Walking . . . . . . . . . . . . . . . . . . 222.2. Milestone Two – Turning the head . . . . . . . . . . . . . 222.3. Milestone Three – Using the camera . . . . . . . . . . . . 232.4. Milestone Four – Finding and tracking the ball . . . . . . 232.5. Milestone Five – Following the ball . . . . . . . . . . . . 23

3. Main Phase: Assignment Three – Playing soccer . . . . . . . . . 24Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

1

Page 3: TDDD63 Project: Humanoids Version 3TDDD63/projects/2015/... · TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson (erik.b.hansson@liu.se)

Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24Examination . . . . . . . . . . . . . . . . . . . . . . . . . 24

3.1. Milestone One – Kicking the ball . . . . . . . . . . . . . 243.2. Milestone Two – Finding the goal . . . . . . . . . . . . . 243.3. Milestone Three – Aligning the robot . . . . . . . . . . . 243.4. Milestone Four – Scoring a goal . . . . . . . . . . . . . . 25

4. Main Phase: Assignment Four – Co-operation . . . . . . . . . . 25Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Examination . . . . . . . . . . . . . . . . . . . . . . . . . 25

4.1. Milestone One – Send messages . . . . . . . . . . . . . . 264.2. Milestone Two – Wait for clearance . . . . . . . . . . . . 274.3. Milestone Three – Pass the ball . . . . . . . . . . . . . . 274.4. Milestone Four (optional) – Cross pass . . . . . . . . . . 27

5. Main Phase: Assignment Five – Elective task . . . . . . . . . . 28Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . 28Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28Examination . . . . . . . . . . . . . . . . . . . . . . . . . 28

4 Extra reading 301. Simulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

1.1. Why use a simulator? . . . . . . . . . . . . . . . . . . . . 301.2. What is a simulator? . . . . . . . . . . . . . . . . . . . . 301.3. Why not only a simulator? . . . . . . . . . . . . . . . . . 311.4. Simulators for Nao . . . . . . . . . . . . . . . . . . . . . 31

2

Page 4: TDDD63 Project: Humanoids Version 3TDDD63/projects/2015/... · TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson (erik.b.hansson@liu.se)

Project overview

1. Introduction

The goal of this project is to get hands on experience with programminghumanoid robots. You will do this by programming the Nao robot to playsoccer.

To make the Nao robot play soccer you have to implement both relativelysimple behaviors, such as finding and kicking the ball, and more complexbehaviors, such as scoring a goal. However, programming a humanoid robotto play soccer from scratch is a huge task. Therefore, you will work with apython interface for NaoQi which provides high level of functionality for theNao robot. Moreover, you will get detailed instructions on how to get startedwith the python interface and the assignments will lead you trough the basicbehaviors for playing soccer. However, you still have to put in a lot of timeand effort into the project for it to be successful.

The examination of the project is to complete all the assignments de-scribed in this document on time. This includes writing a short report de-scribing your final assignment, where you decide what you want to do.

When developing robots, it is quite common to have a simulator as a toolin the development process easier. However, this is mostly efficient whenthe behavior is becoming more complex than what is expected of you in thiscourse. Therefore, we will not use any simulator in this course. Nevertheless,if you want to know more about simulators there is a section explaining whata simulator is in the extra reading.

3

Page 5: TDDD63 Project: Humanoids Version 3TDDD63/projects/2015/... · TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson (erik.b.hansson@liu.se)

2. Background

Figure 1.1: The goalkeeper of team Bembelbots (top left), picture fromRoboCup official webpage (top right) and screenshot from the simulationleague of RoboCup (bottom).

The history of robots playing soccer dates back to 1992. At that time itwas mainly a subject of some papers, workshops on challenges in artificialintelligence and discussions. However, this led to the start of RoboCup,which is an international robot soccer competition held every year start-ing in 1997 in Japan. Sony CSL has more information about the historyof RoboCup and some of the original papers on their website if you areinterested in reading more (http://www.sonycsl.co.jp/person/kitano/RoboCup/RoboCup-old.html).

RoboCup has many different leagues, such as the simulation league, the

4

Page 6: TDDD63 Project: Humanoids Version 3TDDD63/projects/2015/... · TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson (erik.b.hansson@liu.se)

small size league, the standard platform league and the kid size humanoidleague. In the simulation league teams of 11 simulated robots and 1 simulatedcoach compete against each other, while the other leagues consists of teamsof real robots.

The Nao humanoid robot, that we use in this course, is currently the robotused in the standard platform league (SPL). A standard platform ensuresthat all teams compete in the league on the same terms when it comes tohardware. Hence, it is the software developed by the different teams thatdecides the winner.

A game in the standard platform league takes 20 minutes, 2×10 minutes.The game is played on a soccer field that is 9m×6m, with two white goals andan orange street hockey ball. For more information see the RoboCup Soccerhome page (http://www.robocup2015.org/show/article/1.html) and theSPL rules (http://www.informatik.uni-bremen.de/spl/pub/Website/Downloads/Rules2015.pdf).

As the interest for RoboCup and robots in general has increased, moreand more types of competitions have been introduced. For example, there isnow competitions in rescue and dance.

The main goal of RoboCup is to beat the FIFA (human) world championsin soccer by 2050. Of course, this has to be done on human terms, whichmeans that the robots are limited to humanoids that may not harm peo-ple and with human-like sensors. To achieve this, many breakthroughs arerequired. For example, the robots need significantly better hardware thatmakes them faster and more robust while still being safe to play against.They also need better software to control the actuators and sensors on therobots, implement behaviors such as dribbling like Maradonna or Messi andmaking the right decisions at the right time.

More information about RoboCup can be found at their website: http://www.robocup.org/.

5

Page 7: TDDD63 Project: Humanoids Version 3TDDD63/projects/2015/... · TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson (erik.b.hansson@liu.se)

3. The Nao robot

Figure 1.2: The Nao humanoid robot with its sensors and actuators.

In this project you work with a robot called Nao, developed by theFrench company Aldebaran Robotics (http://www.aldebaran-robotics.com/en/). It is a humanoid robot with 25 degrees of freedom (DOF). DOFis a measurement of independent motions, for example a robot with one jointthat can turn in one direction has one DOF. For the Nao, the 25 DOF are inthe form of 25 motors and actuators. In addition, it has several sensors: Twocameras, four microphones, a sonar range finder, two infrared (IR) emittersand receivers, one inertial measurement unit (IMU) and nine tactile sensors.Furthermore, it is fitted with eight high-fidelity speakers and several LEDs.

The Nao is equipped with an Intel ATOM 1.6 GHz CPU that runs a

6

Page 8: TDDD63 Project: Humanoids Version 3TDDD63/projects/2015/... · TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson (erik.b.hansson@liu.se)

Linux kernel and controls the mechanical hardware. It also has a middle-ware called NAOqi developed by Aldebaran Robotics. NAOQi provides alot of predefined functionality and the possibility for users to add their ownmodules to NAOqi. However, one drawback is that the predefined functionsare not always optimized. Therefore, the teams which competes with Naohave implemented their own versions of, for example, walk engines, prede-fined motions and image processing. However, this functionality still usesthe NAOqi to control each joint and to fetch data from the sensors.

The technical documentation for Nao can be downloaded from Aldebaranswebsite (http://www.aldebaran-robotics.com/Downloads/Download-document/192-Datasheet-NAO-Humanoid.html).

4. Handling Nao and guidelines for the lab

There are, to avoid any unnecessary damages to the robot, rules for how tohandle the Nao robot in the lab.

• You should under no circumstances run any code on the robot unlesssomeone is on the field and is prepared to catch the robot in casesomething happens.

• When you are lifting the robot you should have a firm grip around itswaist with both your hands (see the picture below).

• Use a new robot if the one you are using runs out of battery. If thereis no other robot you will have to change battery by following theinstructions at the table. Finally, connect the empty battery, or robot,to a charger.

• Do not leave the robots on the floor unsupervised.• Contact an assistant or supervisor immediately and mark the robot if

something has broken on the robot.• Replace the robot when finished.

7

Page 9: TDDD63 Project: Humanoids Version 3TDDD63/projects/2015/... · TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson (erik.b.hansson@liu.se)

Figure 1.3: How to hold the Nao robot (left), Nao in sitting position (right)

In addition to the rules for how to handle the Nao humanoid robot there area few guidelines for the lab:

• You should never wear shoes in the lab. We want to keep it as cleanas possible.

• The computers in the lab is under the same rules as the rest of thecomputers at the university. This means that you are, for example, notallowed to play games on them.

• Share the robots between each other in a fair way since there is a limitednumber of robots available and some might get damaged during thecourse.

8

Page 10: TDDD63 Project: Humanoids Version 3TDDD63/projects/2015/... · TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson (erik.b.hansson@liu.se)

Configuration and installation

1. Configuring the tools

The workstations in the lab uses the same system as the computers in theSU-rooms. Therefore, you will be able to access the files from any computeroutside the lab and can have your personal configuration for the programsyou use. However, we strongly recommend you to use the same configurationfor all the project members since it ensures that the code is formatted in thesame way for everyone and that the code can run from every project membersaccount. Moreover, we strongly recommend that your configuration helpsyou to keep tab on the length of your lines in your code since you shouldfollow the standard for Python, pep-8 (a good idea is to read or re-readthe chapter 16 "programmeringspraxis" in the python programming course,TDDD73, web resources). Furthermore, we recommend that you configurethe indentation, according to pep-8, to four spaces. This saves you the troubleof having different indentation when writing code with others and on differentcomputers. Moreover, it will make sure that you will not get any problemsin the case that one of the assistants decides to test your code on their ownaccounts.

Lastly, in the project you are required to use SVN to store your code.Instructions for how to use SVN can be found at the course website.

2. Downloading python wrapper

The python wrapper that is provided is available in two ways. The first, andthe easiest, if you never have used Git, a version control system like SVN,before is to download the latest release as a compressed folder. The second,is to clone the Git repository. Lets start of with the first option:

Open the web-page https://gitlab.ida.liu.se/eriha01/tddd63-humanoidsand navigate to "Commits". From there select the Tags tab and then down-load the latest version as a compressed folder. Then it is simply to decompressthe folder.

The second option is to use Git. To do so, navigate to the folder you wishto store the wrapper in and run the following command:andan000$ git clone https :// gitlab.ida.liu.se/eriha01/tddd63 -humanoids.git

That is it, now there is a new directory inside the current directory which

9

Page 11: TDDD63 Project: Humanoids Version 3TDDD63/projects/2015/... · TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson (erik.b.hansson@liu.se)

contains the wrapper.

3. Updating python wrapper

Updating the python wrapper is done in the same way as downloading it. Youfollow the link and download the latest release version or run the followingcommand while in the git repository which will fetch the latest version:andan000$ git pull

4. Version numbering

All source files in the wrapper are marked with a version number in theheader of the file. This is so that you can make sure that you have the latestversion. In the file tab on the git repositories web-site (https://gitlab.ida.liu.se/eriha01/tddd63-humanoids/tree/master) you will see a listof all the files and which is the latest version.

When you have gotten the latest version you can compare the versionnumbers in the files with those in the README.md (or the on the repositorywebsite) to make sure that everything is up to date.

10

Page 12: TDDD63 Project: Humanoids Version 3TDDD63/projects/2015/... · TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson (erik.b.hansson@liu.se)

Assignments

Introduction

The project consist of two phases, the introductory phase and the main phase.The introductory phase consists of two assignments and should be finishedby the end of the first period. The main phase consists of three assignmentsand should be finished by the end of the course.

You should separate your code for each assignment in different folders inyour SVN repository (e.g. <svn root>/ass1, <svn root>/ass2). This shouldbe done so that the assistants and the supervisor easily can see which filesthat is used for each assignment. However, this does not mean that youshould rewrite the code but that you should copy your old code that you willuse again.

We recommended that you do the assignments in the order they are pre-sented since they, in most cases, build upon previous assignments. Thisallows you to reuse the code that you developed in previous assignments.Furthermore, we strongly suggest that you follow the time schedule below sothat you will be finished on time.

Assignment Expected week for completionIntro phase: Assignment 1 week 41Intro phase: Assignment 2 week 44Main phase: Assignment 3 week 46Main phase: Assignment 4 week 48Main phase: Assignment 5 week 50

Main phase: Technical report week 51Main phase: Demonstration week 52

Table 3.1: Project time schedule

The instructions to all the assignments are presented in the same way as thisintroduction, i.e. an introduction and then the following subsections.

Purpose A short description of what you are supposed to learn from theassignment and a very brief description on how it will be learned.

Task A description on what you are supposed to do in the assignment.

11

Page 13: TDDD63 Project: Humanoids Version 3TDDD63/projects/2015/... · TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson (erik.b.hansson@liu.se)

Examination A detailed description on what you have to do to pass theassignment.

Milestone(s) A detailed description for every milestone of an assignment.

1. Intro Phase: Assignment One – Hello world!

In this assignment you will learn how you use the python wrapper to pro-gram Nao. Since this is the first assignment, you will get highly detaileddescriptions on how to complete each milestone. However, keep in mind thatyou will not get equally detailed descriptions in the following assignments.

PurposeThe purpose of this assignment is that you should learn the basics of program-ming the Nao humanoid robot. Through the assignment you will be guidedon how to use the Nao, the python wrapper and other related software.

TasksYour task is to complete the three milestones of the assignment. This includesusing the basic motions of the Nao robot and reacting to information fromthe world through the sensors of the Nao robot.

ExaminationTo pass this assignment you have to:

1. Complete all the milestones.2. Demonstrate your programs for each of the milestones of the assignment

to an assistant.3. Demonstrate an understanding of the code and the system by individ-

ually answering questions regarding your code.

1.1. Milestone One – Stand and sitThe first milestone in the project is to get a simple program to run on therobot. In this case the program should make the robot first stand up andthereafter, sit down. When building this program there are three major stepsthat is good to follow:

1. Make a general idea for how the behavior is to be implemented (whichactions does the robot have to do to stand and then sit?). In thissimple case this might be done by simple discussing how to do it orsimply by implementing it. However, this will not be as easy to do

12

Page 14: TDDD63 Project: Humanoids Version 3TDDD63/projects/2015/... · TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson (erik.b.hansson@liu.se)

when the behavior gets more complex. Therefore, we will introducethe idea of a concept diagram. A concept diagram can take its form inmany shapes. For example, a state diagram or a flow chart. However,the most important part is that it describes how the behavior is goingto be implemented on a conceptual level. An example is the diagrambelow which describes the behavior in this assignment.

2. Implement the behavior according to the concept diagram that youhave created (which algorithm implements the idea you came up within step 1?).

3. Test the code by running it on the robot (how well did the algorithmwork?). During this step it is most likely that you will encounter someproblems with your concept for how the behavior is to be implemented.However, this is not something to be afraid of. It is rather one of themost fundamental parts of science: find a hypothesis, test it and there-after, reformulate the hypothesis if needed. However, it is important tokeep concept diagrams through the iterations of these three steps sinceit can be used to show progress and, more important, they documentwhat already have been tested. Furthermore, by adding notes to theconcepts diagram of what went wrong you have a good documentationthat can be used to review the project and from which it is possible towrite a good report or make improvements.

As mentioned above we start the work on this assignment by coming upwith a concept of how to implement the wanted behavior. In this case it issimple. We first want the robot to stand and when it is standing it should sitdown. However, there is two more part to it that is not mentioned explicit.Firstly, the actuators (the electrical motors in the robot) has to be turnedon. Secondly, when the robot has sat down the actuators needs to be turnedoff to save energy and to prevent overheating. Hence, our concept can takeits form in the following concept diagram (here in the form of a UML statediagram):

13

Page 15: TDDD63 Project: Humanoids Version 3TDDD63/projects/2015/... · TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson (erik.b.hansson@liu.se)

Figure 3.1: State diagram describing the stand and sit program.

In the diagram above the different parts are the following:• States: the states are the rectangles with the rounded corner. They

consist of a name followed by a horizontal line and thereafter someactions. These actions are in general an entry action which is executedwhen the state is entered, a do action which is executed while in thesate (this can be more than once) and an exit action which is executedwhen leaving the state.

• Transitions: the arrows going between the states that directs which thenext state will be.

• Start: the start of a state diagram is marked with a single filled blackcircle with a transition from it.

• End: the end of a state diagram, in the cases where one exists, ismarked with a filled black circle that is circled by another non-filledblack circle.

1.1.1. Writing the programThe next step after the concept diagram is created is to implement it in code.The first part of our diagram is to start the robot. However, at the momentwe do not have any functions for starting the robot with. Hence, we look inthe modules that we have available and find that the Control has a methodstart_robot so we start of with importing the Control module:from control import Control

Unfortunately, this is not enough for the program to import the Controlmodule. We also need to place the file containing the module inside the samefolder as our own program is located so that python can find the correct file.1

1An alternative to copying the file is to update the environment variable PYTHON-PATH so that it points to the location of the wrapper. This can be done

14

Page 16: TDDD63 Project: Humanoids Version 3TDDD63/projects/2015/... · TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson (erik.b.hansson@liu.se)

So we start of by copying the file that the Control module is located in tothe same folder as our own program. If you do not remember how to get thedifferent modules go back up the "Downloading python wrapper" section.The next step is to create a controller for the robot that you are using. Thisis done by calling the constructor with the name of the robot (the name is"nao#" where # is the number the robot has). In our example the robot is"nao1":control = Control("nao1")

Now we have a controller for our robot which we can use for making therobot do things. In our case we will simply tell it to do what we drew in theconcept diagram. To start up followed by stand up, sit down and finally, toturn off all the motors. To do this we write the following code:control.start_robot ()control.stand_up ()control.sit_down ()control.turn_motors_off ()

If you have done as it said you should now successfully have written aprogram that will make the robot stand up and thereafter sit down. Thenext step is to run the program which is described in the next section.

1.1.2. Running the programRunning a program on the robot differs slightly from how you have done sofar in your education. Instead of simply writing:andan000$ python my_program.py

to run the code you have to do somethings a bit different. To run the codeon the robots you have to do the following steps:

1. Make sure one of your group members are beside the robot on the soccer field.2. Enter the following code:

andan000$ python my_program.py

Note that this runs the program with Python2 instead of Python3.This is meant to be since NAOqi, which the wrapper uses, is writtenin Python2 and therefore, require us to run the program in Python2.

1.2. Milestone Two – "Hello world!", says NaoIn this milestone you will extend your program from milestone one to makethe robot say "Hello world" after it has stood up. To implement this behavior

by adding "PYTHONPATH=$PYTHONPATH:/home/<liu-id>/<path-to-wrapper>" toyour .bashrc file.

15

Page 17: TDDD63 Project: Humanoids Version 3TDDD63/projects/2015/... · TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson (erik.b.hansson@liu.se)

we will add to the program in the previous milestone since they are extremelysimilar. Furthermore, you will not need to save the code for the previousmilestone since this is within the same assignment.

The first step is to modify our concept to include the new parts of thebehavior. The resulting concept diagram is the following:

Figure 3.2: State diagram describing the hello world program. Using blockingsay function.

As some of you might have noticed, the action in the Say state in thediagram is not only named say. That is because there are two say methods:say_blocking and say_non_blocking. The only difference between these twoare, as can be deduced from the name, that one is blocking and the other isnot. Of course, that raises the question of what blocking and non blockingmeans. These properties are something that you will encounter, under a lotof different name, in many systems as an engineer. The general idea is thata blocking function will hinder the program to continue until it has beenfinished and a non-blocking function will run in parallel while the programcontinues with its remaining parts. The use of the non-blocking say methodwould require updating our concept to avoid having the robot start talkingand then sit down before it has finished. Hence, our concept diagram couldlook like the following:

16

Page 18: TDDD63 Project: Humanoids Version 3TDDD63/projects/2015/... · TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson (erik.b.hansson@liu.se)

Figure 3.3: State diagram describing the hello world program. Using a non-blocking say function.

In this state diagram we introduce a new thing. Namely, the text on one ofthe transitions. The text on a transition is on the format "condition/action".The condition is a boolean statement that must evaluate to True before thetransition can happen and the action is an action that will be executed whenthe transition happens.

The drawback with using a non-blocking say function in this case is thatwe will have to implement the function is_say_finished ourselves since it isnot implemented in the python wrapper. In general, it is recommended touse existing functionality over rewriting it as your own.

Note that if there are no text on a transition it is assumed that it is undera condition that always evaluates to True. Hence, it will always happen.

1.2.1. Writing the programAs you might have noticed this program has a lot of similarities with theprogram in the previous assignment. Therefore, you can just modify the codethat you wrote in the previous assignment. However, we must first decidewhat we are going to modify. If you compare the two concept diagrams thereis only one difference. That is that the robot should say "Hello World!"after it has stood up and before it sits down. Therefore, it seems logicalthat we add something that makes the robot say something in between thestatements that makes the robot stand and the statement that makes therobot sit:from control import Control

control = Control("nao1")

control.start_robot ()

17

Page 19: TDDD63 Project: Humanoids Version 3TDDD63/projects/2015/... · TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson (erik.b.hansson@liu.se)

control.stand_up ()control.say_blocking("Hello World!")control.sit_down ()control.turn_motors_off ()

1.2.2. Running the programJust like in the previous assignment you have to follow the special steps forrunning code on the robots in the lab. Therefore, make sure that at leastone of your group members are with the robot on the robot field before yourun the code from the computer. Moreover, do not forget to use Python 2instead of Python 3.

1.3. Milestone Three – Wait for touchIn this milestone you will extend your program to make the robot wait untilits middle tactile sensor is touched before it stands. Furthermore, the robotshould wait with sitting down until its middle tactile sensor has been touchedagain. Moreover, it should say "goodbye" before it sits down.

As before, we will start by updating the concept to describe the extendedbehavior. The new concept can be described in the following concept diagram(now using a flow chart instead of a state diagram):

18

Page 20: TDDD63 Project: Humanoids Version 3TDDD63/projects/2015/... · TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson (erik.b.hansson@liu.se)

Figure 3.4: Flowchart describing program with waiting for being touched.

The flowchart are different from a state diagram in multiple ways. Mostly,it does not describe the actions or transitions that the system needs. Hence,it, usually, describes the system on a higher abstraction level. As a result, itleaves more room for interpretations of the diagram than the state diagram.Therefore, we recommend that you use the state diagram when making aconcept diagram for your programs.

In the diagram you can see that we have arrived to a decision node whichquestions whether the tactile sensors are pressed. The tactile sensors are thethree touch sensors on top of the robots head. Hence, our implementationwill now have to react to the value from our sensors. In the case of the tactilesensors it is quite easy for two reasons. Firstly, the sensors are binary, thatmeans they are either pressed or they are not. Secondly, the assignment doesnot specify which of the tactile sensors we need to use. Hence, touching anyof them is enough. To get the information from the sensors we will use theget_touch_sensor_status method.

19

Page 21: TDDD63 Project: Humanoids Version 3TDDD63/projects/2015/... · TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson (erik.b.hansson@liu.se)

1.3.1. Writing the codeJust as with the previous assignment this is similar to the previous programso a good idea is to modify the code that was written before. However, thereare some more problems that you have to face when writing this part of theprogram. Namely, how do you make the robot wait for someone to touch thehead? A good idea might be to take a top-down approach and assume thatyou will write a function that waits until someone touch the head given thatit gets something to access the sensors of the robot. Then your code for theprogram might look something like this:wait_until_head_is_touched(perception)control.start_robot ()control.stand_up ()control.say_blocking("Hello World!")wait_until_head_is_touched(perception)control.say_blocking("Goodbye")control.sit_down ()control.turn_motors_off ()

Now there are two major things left for to do. Firstly, what is the percep-tion variable that the wait_until_head_is_touched function uses? Secondly,how do we implement the function?

The answer to the first question is to look at the modules that are avail-able. There are three available, the Control module, the Communication mod-ule and the Perception module. Out of these three the Perception sounds themost promising. Furthermore, by looking in it you will discover a methodcalled is_head_button_pressed which sounds just like what is needed. So wecan define the control and perception variables as following:control = Control("nao1")perception = Perception("nao1")

Now to the implementation of the wait_until_head_is_pressed function.One of the most simple way of implementing this is to use a while loop thatdoes not do anything until the head button is pressed. However, this is quitea bad idea because it will constantly evaluate the expression in the whileloop. Therefore, we will use unnecessary amounts of the processors capacity.With a bit of thinking, and maybe testing, we can come to the conclusionthat it is not realistic that the head button is pressed for less than a tenthof a second. Therefore, there could be something in that waits for a tenthof a second before it checks if the head button is pressed again. Moreover, ifthis is placed inside the while loop then the result will actually become thatwe ask every tenth of a second if the head button is pressed and will notleave the loop before it is pressed. The sleeping for a set amount of time is astandard python function called sleep that is in the time module. Hence, our

20

Page 22: TDDD63 Project: Humanoids Version 3TDDD63/projects/2015/... · TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson (erik.b.hansson@liu.se)

wait function could look like this:INPUT_SLEEP_TIME = 0.1

def wait_until_head_is_touched(perception ):"""Waits until the head button is touched:param perception: the perception object that is used to sense"""while not perception.is_head_button_pressed ():

sleep(INPUT_SLEEP_TIME)

As you can see we made a variable called INPUT_SLEEP_TIME thatwe set to 0.1 instead of passing 0.1 as an argument to the sleep function.This is a so called configuration variable (config variable for short) that caneasily be changed. Furthermore, by using a config variable it is guaranteedthat if that variable is changed, then the value will be changed in all placesthat the variable is used (compared to having to change the same value to anew in a lot of places).

With these additions the final program could look like this:from control import Controlfrom perception import Perceptionfrom time import sleep

INPUT_SLEEP_TIME = 0.1

def wait_until_head_is_touched(perception ):"""Waits until the head button is touched:param perception: the perception object that is used to sense"""while not perception.is_head_button_pressed ():

sleep(INPUT_SLEEP_TIME)

control = Control("nao1")perception = Perception("nao1")

wait_until_head_is_touched(perception)control.start_robot ()control.stand_up ()control.say_blocking("Hello World!")wait_until_head_is_touched(perception)control.say_blocking("Goodbye")control.sit_down ()control.turn_motors_off ()

21

Page 23: TDDD63 Project: Humanoids Version 3TDDD63/projects/2015/... · TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson (erik.b.hansson@liu.se)

1.3.2. Running the codeRunning the code is done in the same way as for the two previous assignment:At least one of the group members at the soccer field with the robot beforeyou run your code using Python 2.

2. Intro Phase: Assignment Two – Basic skills

PurposeThe purpose of this assignment is to get a deeper understanding of how toprogram a robot, how to use actuators and sensors. This will be done byprogramming the basic skills needed for playing football with the Nao.

TaskThe task of this assignment is to make the robot find the ball, even if it isnot in its line of sight, and then follow it.

ExaminationTo pass Assignment Two you have to:

• Complete all the milestones.• Present a concept diagram over your robot.• Divide the code in a logical manner between different files.• Demonstrate a working ball tracker.• Individually explain how the code works.

2.1. Milestone One – WalkingThe first milestone of the assignment is to make the robot walk. First, itshould walk forward for a while; then it should turn roughly ninety degreeson the spot; finally, it should walk in an arc so that it is close to face thesame direction as it started in (basically doing a u-turn).

As with the previous assignment you should start by creating a conceptfor the wanted behavior and make a diagram over it. In which form youmake the diagram is up to you. However, we recommend using UML statediagrams and at least start by sketch them out with pen and paper since itusually goes faster than using a computer program for creating diagram.

2.2. Milestone Two – Turning the headIn the second milestone you will write a new program that turns the head ofthe robot. Try to come up with a motion with the head that you can later

22

Page 24: TDDD63 Project: Humanoids Version 3TDDD63/projects/2015/... · TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson (erik.b.hansson@liu.se)

on use while searching for a ball.To finish this assignment it is recommended that you follow the same

procedure as described in the previous milestone.

2.3. Milestone Three – Using the cameraThe focus in the third milestone is to make use of the robot’s camera. Thisshould be done by detecting the ball as well as reacting to finding the balland loosing it. However, you must be aware that there is a risk that therobot will not recognize the ball in front of it every frame of the camera.Furthermore, you must take this into account since it is not acceptable if therobot believes it has lost the ball only because it has not been recognized ina couple of camera frames.

Tips: The say_non_blocking, set_face_leds and set_ear_leads functionsis really good for troubleshooting while running a program on the robot.

Note: Nao has two cameras, one facing forwards and the other facingdownwards. Both of them can not be active at the same time, instead youhave to swap between them. Furthermore, the top camera can not see thefeet of the robot. Therefore, you have to use both cameras to keep theball in sight. Switching camera can be done with the use_upper_cameraand the use_lower_camera functions. However, this switch do not happeninstantaneously. Therefore, you will have to be aware of the fact that itmight still be to old camera that the data comes from for a while.

2.4. Milestone Four – Finding and tracking the ballTo achieve this milestone, the robot should be able to find the ball when itis within a two meter radius of the robot (it does not have to find the ball ifit is located in an impossible spot, such as between its feet). This milestonecombines the two previous milestones.

For completing this milestone we strongly recommend you to structureyour code in multiple logical sections. For example, one file could containthe code for finding the ball while another file could contain the code fortracking the ball.

2.5. Milestone Five – Following the ballIn the final milestone of this assignment you should make the robot find theball and then follow it as it is pushed around the field (within reasonablelimits). As in milestone four it can be very useful to use multiple files toimplement this behavior.

23

Page 25: TDDD63 Project: Humanoids Version 3TDDD63/projects/2015/... · TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson (erik.b.hansson@liu.se)

3. Main Phase: Assignment Three – Playingsoccer

PurposeThe purpose of this assignment is to expand your code so that the robot isable to play soccer and not just mastering basic skills. To achieve this, youneed to use more complex programs than in the previous assignments. Youwill most likely also have to improve the basic skills that you have started todevelop in the previous assignment.

TaskThe task is divided into four milestones that incrementally creates a pro-gram that can find the ball and kick it into the goal. As usual, we stronglyrecommend you to re-use the code you have written in previous assignments.

ExaminationTo pass Assignment Three you have to:

• Complete all the milestones.• Present concept diagram(s) for how the behavior is implemented• Demonstrate how the robot can find the ball, position itself and then

score a goal.• Be prepared to individually explain how the code works.

3.1. Milestone One – Kicking the ballFirst out is one more basic skill, which is to kick the ball. By now you shouldbe familiar with how the python wrapper works and you should be able toimplement this behavior without much problem. Note that you are supposedto make the robot position itself in front of the ball as well as kick it.

3.2. Milestone Two – Finding the goalFinding and kicking the ball is quite useless unless you can find the opponent’sgoal or your own position on the field. Therefore, this milestone is to locatethe goal and turn towards it.

3.3. Milestone Three – Aligning the robotWe are now ready to start with slightly more complex tasks related to makinga robot play soccer. First, aligning it in relation to the goal and the ball in

24

Page 26: TDDD63 Project: Humanoids Version 3TDDD63/projects/2015/... · TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson (erik.b.hansson@liu.se)

order to kick the ball in the right direction.Tip: Can your code keep control of the ball while aligning the robot?Tip: Can the robot realize that it has lost the ball?

3.4. Milestone Four – Scoring a goalAs the final step in this assignment your robot should actually be able toscore a goal. There are many ways to achieve this task and you are free toexplore whichever of these that you want. However, your program should beable to score a goal from different positions around the field. This will mostlikely require that the robot kicks the ball more than one time. Hence, yourcode should be able to handle that in an acceptable manner.

4. Main Phase: Assignment Four – Co-operation

PurposeIn a soccer game with multiple players communication and co-operation isessential to winning. Until now your robot has been incapable of communi-cating with other robots. The purpose of this assignment is to teach you thebasics of co-operation.

TaskIn this assignment you will be introduced to the communication part of thepython wrapper. Furthermore, you will create an FSM that allows two ormore robots to co-operate in order to solve a couple of task. The first taskconsists of making one robot react to sensor inputs to another. Followingthis is a task to make one of the robot direct the other robot through givingpermission for shooting. The final task is to make one robot pass the ball tothe other.

ExaminationTo pass Assignment Four you have to:

• Complete at least the three first milestones.• Present a diagram of the state machines.• Demonstrate two robots passing the ball between themselves.• Be prepared to individually explain how the code works.

25

Page 27: TDDD63 Project: Humanoids Version 3TDDD63/projects/2015/... · TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson (erik.b.hansson@liu.se)

4.1. Milestone One – Send messagesFor communication between two or more robots we must no introduce thefinal module that you will be using: Communication which is located in the filecommunication.py. The Communication module is quite small comparedto the other. It only contains three functions that you will use: broadcast(sends an unreliable message to all robots started from your workstation),send_message (sends a reliable message to a specific robot started on yourworkstation), get_message (gets the first message in your message queue)and is_empty (tests if the message queue is empty).

When using the communication module there are a couple of things thatyou should be aware of. Firstly, there is a message queue in the robotswhich stores the messages that it have received. This queue behaves as mostmessage queues in networks. That means if the queue is full it will simplydrop the incoming messages. In this case the queue size is 10 and it istherefore, up to you to make sure that you will not fill your message queueby sending unnecessary messages and by fetching messages from it. Secondly,this is queue which means that if you get the first message in the queue it willno longer be stored in the queue. Hence, be careful so that your code doesnot forget an important message by mistake. Lastly, the broadcast functionsimply sends a message to all the possible online robots without waiting foracknowledgment. Therefore, it’s not guaranteed that the message is receivedby the other robots.

To use the Communication module you will have to start it like all theother modules by giving it the name of the robot that the module is goingto run on. Thereafter, you can use it by the above mentioned methods. Forexample:from communication import Communicationfrom time import sleep

nao_com = Communication("nao1")

# No feedback on deliverynao_com.broadcast("I’m alive!")# Feedback on deliverynao_com.send_message("nao2", "Are you there?")

while True:if nao_com.has_messages ():

recv_msg = nao_com.get_message ()if recv_msg["msg"] == "Nope":

nao_com.send_message("nao2", "...")elif recv_msg["msg"] == "Yes":

nao_com.send_message("nao2", "Great , let’s play football!")break

26

Page 28: TDDD63 Project: Humanoids Version 3TDDD63/projects/2015/... · TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson (erik.b.hansson@liu.se)

else:sleep (1)

As you can see in the example above the message that was fetched withget_message contained a dictionary and just not the message. That is be-cause a message contains two parts. The first is the message that was sentand has the key "msg". The second is the time when the message was sentand has the key "ts".

Your task is now to modify the code from the last milestone of the firstassignment so that touching the tactile sensor of one robot makes anotherrobot react.

4.2. Milestone Two – Wait for clearanceOne of the fundamentals of passing is that the receiving robot should beprepared. Therefore, it is necessary for the robots to communicate to makea successful pass.

Your task in this milestone is to make one of the robots find the ball,wait until it gets clearance from the other robot and then kick the ball.In addition, the robot should mark that it waits for clearance by sayingsomething relevant. Furthermore, the robot giving clearance should also besaying something when it gives the kicking robot clearance to kick the ball.

4.3. Milestone Three – Pass the ballIn the previous milestone the robot kicked as soon as it got clearance. How-ever, kicking a ball in a random direction does not count as a pass. A passhas to be directed towards one of the robot’s teammates. To make a perfectpass is a complex task and therefore your task is to make one robot pass theball in the general direction of the other robot (given that they are lookingat each other before). The second robot should take control of the ball whenit has been passed.

4.4. Milestone Four (optional) – Cross passThis milestone is an extension of the previous, with some more conditions:

• The first robot should be located on your side of the field.• The second robot should be located on the opponent’s side of the field.• The robots may not cross the middle line (look at the line detection

functions).• The second robot should score a goal after it has gotten control of the

ball.

27

Page 29: TDDD63 Project: Humanoids Version 3TDDD63/projects/2015/... · TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson (erik.b.hansson@liu.se)

5. Main Phase: Assignment Five – Elective task

PurposeRobots are used for a huge variety of tasks, not just playing soccer. Thereare always new ways of completing a task and new ideas on what could besolved by robots. This assignment gives you the opportunity to try your ownideas for what the Nao robot can be used for.

TaskYou are relatively free to define the task for this assignment. However, it hasto be approved by one of the assistants or the supervisor.

These are some examples of what you can do:• Program two robots to co-operate and play against two other robots.

If there is another group that does the same, why not challenge themto a match?

• Program a goalkeeper.• Make a throw-in.*• Make two robots hand the ball to each other.*• Make the robot go trough an obstacle course.

* These tasks require functionality that is not part of the python wrapper.However, they can be implemented quite easily by only using Python andyou are very welcome to ask an assistant on how to do so.

ExaminationThe examination of this assignment is to define a task, make a serious effortto complete the task and write a short report. You are allowed to write thereport based on assignment 1-4 if you do not think that you do not haveenough data to write a report on assignment 5. However, you should stillmake an effort to finish assignment 5.

The report that you should write is a technical documentation and istherefore, classified as a formal text. Hence, you are should use a formallanguage and a good structure. However, you are free to write the report inSwedish or English. Following, is the format that your report should follow:

• Front page: The front page should include the name of the projects,the name of all the group members, your supervisor, the name of theinstitution that you have written it for (Linköpings university) and thedate of the last change.

• Table of content.• Introduction: A short description of the task and what you have done.

28

Page 30: TDDD63 Project: Humanoids Version 3TDDD63/projects/2015/... · TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson (erik.b.hansson@liu.se)

• Implementation: This section includes a description of how your pro-gram works. However, do note that you are not supposed to describeyour code line by line, not even function by function. Your should codedo that. Instead, it should describe the general behavior the code im-plements. This is a really good place to include your concept diagramssince they are doing just this. Furthermore, with concept diagrams youwill only have to explain it shortly since the concept diagrams should beself-explanatory. Lastly, you should also include a short argumentationfor why you implemented the way you did.

• Results: In the result section you should include how well your imple-mentation solved the problem. Remember that pictures can sometimesexplain more than words.

• Discussion: Here you should discuss why you got the result you didand discuss the conclusions you can draw from the result.

• Conclusion: Under the conclusion section you should present your con-clusions. In this project most of your conclusions will be concerningwhat could have been better (be it in your own implementation, thehardware of the robot or the system that you are using). However,these conclusions should be valid based on your discussion. Further-more, you should also include some ideas of which improvements thatcould be made to your program, the python wrapper and the robot inthe future.

• Project feedback: Where there any parts of the project, documentationor planing that were good? Is there anything that can be improved? Ifso what and, if you have an idea, how? Is there any recommendationthat you would like to give to the next years students who have thisproject?

• References: Include any references you have using a well know standard,such as the Harvard or Oxford reference system.

• Appendix (if you have one): Do not forget to write a table of contentif you have a long appendix.

29

Page 31: TDDD63 Project: Humanoids Version 3TDDD63/projects/2015/... · TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson (erik.b.hansson@liu.se)

Extra reading

1. Simulator

1.1. Why use a simulator?As you might have noticed when developing on the Nao robots (if you arereading this before you’ll have to take our word for it), it can take quitesome effort to always test code on the physical robots. For example, therehas to be a person present to catch the Nao robot in case that it falls overand there is no way to speed up the program to get to the part you actu-ally want to test (since that would require to speed up the physical world).And this is just for a quite small humanoid robot. Imagine that you arewriting code for Boston Dynamic’s BigDog (http://www.bostondynamics.com/robot_bigdog.html) or one of Witas UAV Platform (a unmanned he-licopter http://www.ida.liu.se/divisions/aiics/aiicssite/uastech/photos.en.shtml). For the BigDog you might have to first build a settingfor the robot and for the UAV you would have to take it where there are norisk of crashing into people. Obviously, that takes some effort. Moreover,it could prove quite costly to do those tests as well. Therefore, it is quitecommon to run preliminary tests in a simulator before testing it on the realrobots to rid the programs of bugs and to test concepts. Hence, using asimulator can lower the effort and cost of development.

1.2. What is a simulator?Now that we have covered why it is a good idea to use a simulator, wenaturally have to ask what it is. Essentially, a simulator is somethingthat simulates an environment and/or agents. When used in roboticsthis usually means that the simulator emulates the real world environmentthe robot is supposed to work in as well as the robot itself. For example, theNao robot could have a simulator which environment is a football field andthe agent is a Nao robot.

A simulator can also have different levels of details that are simulated. Inour example with the Nao robot it could vary from a simple two dimensionalsimulation where the robot, for example, can not fall to a complex threedimensional simulation which tries to simulate the physics of the real world.Naturally, the three dimensional simulation can simulate more than the twodimensional (potentially, it could simulate if the robot will fall when some of

30

Page 32: TDDD63 Project: Humanoids Version 3TDDD63/projects/2015/... · TDDD63 Project: Humanoids Version 3.01 Jon Dybeck (jondy276) Carl Ehrenstråhle (careh585) Erik Hansson (erik.b.hansson@liu.se)

its limbs are moved). However, the drawback of the more complex simulationis that it requires a lot more computation power than the simple one. In factit can be too heavy for a modern computer if the goal is to simulate a wholeteam of the robots. Therefore, the two dimensional simulator might be abetter choice if the aim is to simulate how the decision making works for thewhole team even if it does not take into consideration that the robot can fall.

1.3. Why not only a simulator?Imagine having a three dimensional simulator that simulates the physics,the environment that the robot is going to be in and the robot as well.Furthermore, the simulator is quite exact so you are fairly sure that the codethat controls the robot in the simulator will be able to control the real robotas well. Why would we not do all the testing in the simulator since it ischeaper and just ignore the real robot until it is deployed?

In theory it is interesting idea. However, for a robot that acts in the realworld the simulator would have to be able to simulate all aspects of the worldif we are going to be sure that it will behave the same in the real world as inthe simulator. Unfortunately, this is so complex that we would not be able tosimulate it in a reasonable time. Hence, simulations are usually simplified sothat they can be computed within a reasonable time. Therefore, a simulatoronly captures parts of the real world. This leads to the fact that anycode tested in a simulator is not guaranteed to work the same way in the realworld. Hence, the code should always be tested on the physical robot beforeits considered tested.

1.4. Simulators for NaoThere are a few simulator that is widely used for simulating Nao in a threedimensional world. For some time there was only one available, Webots.However, Aldebaran release the meshes for Nao a couple of years ago andsince then a couple of more simulator has been released. For example, VRepis a simulator that now supports the Nao robot to some degree.

In addition to all the three dimensional simulators there are also a coupleof two dimensional simulator available. However, since a two dimensionalsimulator is relatively easy to implement there are quite a few that writestheir own. For example, in our own lab we have our own two dimensionalsimulator for simulating a soccer game.

31