Title: Webots
1Webots
- Presentation by Adrian Pease
2Overview
- What is Webots
- How does Webots work
- How you can make Webots work for you
- Questions at the end
3What bots?
- Webots developed by Cyberbotics
(www.cyberbotics.com) - Originally designed as a research tool to
investigate robot control algorithms - 3D mobile robot simulator
4What does Webots simulate?
- Simulates the robots environment terrain
arbitrary objects, walls etc - Simulates differentially wheeled robots
- i.e. independently moving wheels for navigation
- Simulates axels, sensors etc based on technical
specifications - Pioneer2 architecture supported
5How does Webots simulate?
- Environment and robots are simulated using VRML
(Virtual Reality Modelling Language) - Control of robots is simulated with user written
C/C or Java programs in conjunction with the
Webots API
6What can you model?
- Appearance
- Background
- Color
- Coordinate
- DirectionalLight
- ElevationGrid
- Shape
- Viewpoint
- WorldInfo
-
- http//www.vrml.org/
7Webots extensions to VRML
VRML
Transform
Webots
Solid
DifferentialWheels
DistanceSensor
Camera
8Add/Edit VRML (Scene Tree)
Modify
Toolbar
Hierarchical structure
9Add/Edit VRML (Text File)
DifferentialWheels translation -0.563642 0
-1.54467 rotation 0 1 0 -48.0436 children
Shape appearance Appearance
material Material ambientIntensity
0.34 diffuseColor 1 0 0
geometry Extrusion crossSection
-0.1 0.215 0.1 0.215
0.135 0.185 0.135 -0.095
0.08 -0.11
- Edit VRML file in a text editor
- Similar concept to XML
- Series of object definitions
- Defining attributes of objects
- Definitions can be nested
10Before/After Modifications
11Controllers
- Programs usually written in C, but can also be
written in C or Java - Program interfaces to the Webots API to
- Set wheel speed
- Move next step etc
- Read sensor readings
- Grab Camera frames
12Supervisor Robots
- A super robot - write controllers for
supervisors the same as for normal robots - Cant do anything a DifferentialWheel robot can
do, but can - Send/receive messages to/from other robots
- Move, rotate, change colour of objects in the
scene - Take snapshots of the current scene
- Track objects/robots
13How to write a controller in C
include ltdevice/robot.hgt include
ltdevice/differential_wheels.hgt include
ltdevice/distance_sensor.hgt
int main() robot_live(reset) for
(i0ilt16i) distance_sensor_enable(dsi,64)
for() / The robot never dies! /
for (i0ilt16i) sensor_valuei
distance_sensor_get_value(dsi)
differential_wheels_set_speed(speed0,speed1)
/ Set motor speeds / robot_step(64) / run
one step /
14Compiling the controller
- Use the make command to build the controller in
a console window on Linux or Windows - Microsoft Visual C, Dev-C project files also
available
15Questions
- So where does the Web in Webots come from?
- HyperGates are objects that transport the robot
from the current simulation to another simulation
specified by the URL attribute of the HyperGate
node hence your robots can travel over the web. - Any more questions?