Getting Started with Webots -...
Transcript of Getting Started with Webots -...
Getting Started with Webots
S FT COMPUTING @ YONSEI UNIV . KOREA 16
Webots?
• Webots is a professional mobile robot simulation software package.
• Offers a rapid prototyping environment, that allows the user to crea
te 3D virtual worlds with physics properties such as mass, joints, fricti
on coefficients, etc.
• User can add simple passive objects or active objects called mobile r
obots. They may be equipped with a number of sensor and actuat
or devices, such as distance sensors, drive wheels, cameras, servos,
touch sensors, emitters, receivers, etc.
• Finally, the user can program each robot individually to exhibit th
e desired behavior. Webots contains a large number of robot models
and controller program examples to help users get started.
1
S FT COMPUTING @ YONSEI UNIV . KOREA 16
Features
2
S FT COMPUTING @ YONSEI UNIV . KOREA 16
Features
3
S FT COMPUTING @ YONSEI UNIV . KOREA 16
Features
4
S FT COMPUTING @ YONSEI UNIV . KOREA 16
Features
5
S FT COMPUTING @ YONSEI UNIV . KOREA 16
Features
6
S FT COMPUTING @ YONSEI UNIV . KOREA 16
Features
7
S FT COMPUTING @ YONSEI UNIV . KOREA 16
What can I do with Webots?
• Mobile robot prototyping
– academic research, the automotive industry, aeronautics, the vacuum cle
aner industry, the toy industry, hobbyists, etc.
• Robot locomotion research
– Legged, humanoids, quadrupeds robots, etc.
• Multi-agent research
– swarm intelligence, collaborative mobile robots groups, etc.
• Adaptive behavior research
– genetic algorithm, neural networks, AI, etc.
• Teaching robotics
– Robotics lectures, C/C++/Java/Python programming lectures, etc.
• Robot contests
– e.g. www.robotstadium.org1 or www.ratslife.org2
8
S FT COMPUTING @ YONSEI UNIV . KOREA 16
What do I need to know to use Webots?
• A minimal amount of technical knowledge is Needed
• A basic knowledge of the C, C++, Java, Python, Matlab or URBI progr
amming language is necessary. (Just Single language)
9
S FT COMPUTING @ YONSEI UNIV . KOREA 16
Simulation
• A Webots simulation is composed of following items:
1. A Webots world file (.wbt) that defines one or several robots and their en
vironment. The .wbt file does sometime depend on external prototypes fi
les (.proto) and textures.
2. One or several controller programs for the above robots(in C/C++/Java/
Python/Matlab/URBI).
3. An optional physics plugin that can be used to modify Webots regular ph
ysics behavior (in C/C++).
10
S FT COMPUTING @ YONSEI UNIV . KOREA 16
What is World?
• A 3D description of the properties of robots and of their environment.
– Organized as hierarchical structures
– Position, orientation, geometry, appearance (like color or brightness),
physical properties, type of object, etc
11
• A world file doesn’t contain the con-
troller code of the robots; it only sp-
ecifies the name of the controller
that is required for each robot.
• Worlds are saved in .wbt files. The
.wbt files are stored in the worlds s
ubdirectory of each Webots project.
Scene tree
S FT COMPUTING @ YONSEI UNIV . KOREA 16
What is Controller?
• Controls a robot specified in a world file. Controllers can be written in
any of the programming languages supported by Webots
– C, C++, Java, URBI, Python or MATLABTM
12
• When simulation starts, the specifie
d controllers launched, each as a se
parate process, it associates the con
troller processes with the simulated
robots. -Note that several robots can use the
same controller code, however a distin
ct process will be launched for each
robot.
Control window
S FT COMPUTING @ YONSEI UNIV . KOREA 16
What is Supervisor? (Only in Professional ver.)
• A privileged type of Robot
– can execute operations that can normally only be carried out by a human
operator and not by a real robot.
• The Supervisor is normally associated with a controller program that c
an also be written in any of the above mentioned programming langua
ges.
• In contrast with a regular Robot controller, the Supervisor controller wi
ll have access to privileged operations. The privileged operations incl
ude simulation control, for example, moving the robots to a random po
sition, making a video capture of the simulation, etc.
13
S FT COMPUTING @ YONSEI UNIV . KOREA 16
Webots installation
14
Download the Webots. And Run. http://www.cyberbotics.com/windows
S FT COMPUTING @ YONSEI UNIV . KOREA 16
How to run the Webots in Matlab?
• On Windows, Webots comes only in 32-bit flavour and therefore it can
only inter-operate with a 32 bit version of MATLAB. (!!!!!!!)
• However, On Mac OS X, there is only one version of Webots but that
version is compatible with both 32-bit and 64-bit installations of MATL
AB.
15
윈도우에서 64bit은 안됩니다. 절대!
S FT COMPUTING @ YONSEI UNIV . KOREA 16
How to run the Webots in Matlab?
16
At first, Run CMD.
S FT COMPUTING @ YONSEI UNIV . KOREA 16
How to run the Webots in Matlab?
17
Type Path=C:\Program Files (x86)\MATLAB\R2010a\bin
S FT COMPUTING @ YONSEI UNIV . KOREA 16
How to run the Webots in Matlab?
• Open the world file
– c:\program files (x64)\webots\projects/languages/matlab/worlds/ e-puck_
matlab.wbt or
– the world file c:\program files (x64)\webotsprojects/contests/nao_robocup/
worlds/nao2_matlab.wbt
18
Open this file and wait until webots & matlab opens.
S FT COMPUTING @ YONSEI UNIV . KOREA 16
How to run the Webots in Matlab?
19
Well done.
S FT COMPUTING @ YONSEI UNIV . KOREA 16
Webots guided tour – Control Nao
20
S FT COMPUTING @ YONSEI UNIV . KOREA 16
Webots guided tour – Control Nao
21
S FT COMPUTING @ YONSEI UNIV . KOREA 16
Webots guided tour – Control Nao
22
Click play button. We can see the Nao walks.
And you can control it with your keyboard.
S FT COMPUTING @ YONSEI UNIV . KOREA 16
Webots guided tour – Control Nao
23
Click Nao and,
Shift + click ->Move Nao
Shift + click ->Lift
Ctrl + click ->Rotate
In the same way, you can also move all the
element in this room.
Enjoy it!