Webots User Guide

previous page go up next page

Foreword

Thanks

1.Installing Webots

2.Upgrading from Webots 2

3.Getting Started with Webots

4.Tutorial: Modelling and simulating your robot

5.Robot and Supervisor Controllers

6.Tutorial: Using the KheperaTM robot

7.ALife Contest

     

6.3 Understanding the model

6.3.1 The 3D scene

In order to better understand what is going on with this simulation, let's take a closer look at the scene structure. Double click on an object in the scene, or select the Edit Scene Tree Window to open the scene tree window. If you double clicked on an object, you will see that object selected in the scene tree (see figure 6.4). Clicking on the little cross icon of an object name in the scene tree, will expand that object, displaying its properties.

We will not describe in details the Webots scene structure in this chapter. It is build as an extension of the VRML97 standard. For a more complete description, please refer to the Webots user guide and reference manuals. However, let's have a first overview.

You can see that the scene contains several objects, which we call nodes. You can play around with the nodes, expanding them to look into their fields, and possibly change some values. The WorldInfo node contains some text description about the world. The Viewpoint node defines the camera from which the scene is viewed. The Background node defines the color of the background of the scene which is blue in this world. The PointLight node defines a light which is visible from the light sensors of the robot. The light location can be displayed in the scene by checking Display Lights in the Rendering tab of the preferences window. The remaining nodes are physical objects and have a DEF name for helping identifying them.

khepera-stw

Figure 6.4: Scene tree window for the Khepera world

The GROUND Transform is not a Solid which means no collision detection is performed with this node. On the other hand, the WALL and BOX nodes are Solid nodes. They have a boundingObject field used for collision detection. Finally, the KHEPERA DifferentialWheels node defines the Khepera robot.

6.3.2 The Khepera model

As you can guess, a DifferentialWheels node defines any differentially wheeled robot. The parameters provided here correspond to the size and functionalities of a Khepera robot. For example, if you expand the children list, you will be able to find some shapes defining the body of the robot and a number of sensors, including distance and light sensors. Although on the Khepera robot, the light and distance sensors are the same device, they are divided into two logical devices in the Webots model. This makes the simulator more modular and generic. Moreover, you will notice that each device ( DifferentialWheels, DistanceSensor, LightSensor, etc.) has a list of children defining either sub devices or 3D shapes.

The differential wheels model

The differential wheels model of a robot is defined by a number of parameters, including the axle length, the wheel radius, the maximum speed, maximum acceleration, the speed unit, slip noise and encoder noise. Values for these parameters are provided in this example to match approximately a Khepera robot. You may need to refine them if you need a very precise model. Please refer to the Webots user guide for a complete description of these parameters.

The sensor model

The distance sensors are simulated by computing the collision between a single sensor ray and objects in the scene. The response of the sensor is computed according to its lookupTable and modulated by the color of the object (since these sensors are of "infra-red" type, red objects are seen better than green ones). The lookupTable is actually a table of floating point values which is extrapolated to compute the response of the sensor. The first value is the distance expressed in meters (increasing the biggest distance value will make the sensor look further). The second value is the response read by the controller of the robot and the third value is the percentage of white noise associated to the distance and response, expressed in the range [0;1]. For a more complete discussion on the distance sensor model, please refer to the Webots user guide.

Light sensors are pretty similar to distance sensors. They also rely on a lookupTable for computing their return value according the measured value.

previous page go up next page
^ page top ^

  E-mail to webmaster Last updated: Copyright © 2002 Cyberbotics Ltd.