Webots User Guide

previous page go up next page

Foreword

Thanks

1. Installing Webots

2. Getting Started with Webots

3. Sample Webots Applications

4. Tutorial: Modeling and simulating your robot

5. Programming Controllers and Plugins

6. Using the e-puck robot

7. Using the KheperaTM robot

8. Using the IPRTM robots

9. Using the LEGO MindstormsTM robots

10. Using the AiboTM robots

11. Robot Soccer Lab

     

4.4 Modelling an existing robot: pioneer2.wbt

We are now going to model and simulate a commercial robot from ActivMedia Robotics: Pioneer 2-DXTM, as shown on the ActivMedia Web site: http://www.activrobots.com. First, you must model the robot's environment. Then, you can model a Pioneer 2TM robot with 16 sonars and simulate it with a controller.

Please refer to the worlds / pioneer2.wbt and controllers / pioneer2 files for the world and controller details. They are located in the projects / robots / pioneer2 directory of Webots.

4.4.1 Environment

The environment consists of:

  • a chessboard: a Solid node with an ElevationGrid node.

  • a wall around the chessboard: Solid node with an Extrusion node.

  • a wall inside the world: a Solid node with a Cylinder node.

This environment is shown in figure 4.12.

pioneer2-walls

Figure 4.12: The walls of the Pioneer 2TM robot world

4.4.2 Robot with 16 sonars

The robot (a DifferentialWheels node) is made up of six main parts:

  1. the body: an Extrusion node.

  2. a top plate: an Extrusion node.

  3. two main wheels: two Cylinder nodes.

  4. a rear wheel: a Cylinder node.

  5. front and rear sensor supports: two Extrusion nodes.

  6. sixteen sonars: sixteen DistanceSensor nodes.

The Pioneer 2 DXTM robot is depicted in figure 4.13.

pioneer2

Figure 4.13: The Pioneer 2 DXTM robot

Open the tree editor and add a DifferentialWheels node. Insert in the children field:

  1. for the body: a Shape node with a geometry Extrusion. See figure 4.14 for the coordinates of the Extrusion.

    pioneer2-body

    Figure 4.14: Body of the Pioneer 2TM robot

  2. for the top plate: a Shape node with a geometry Extrusion. See figure 4.15 for the coordinates of the Extrusion.

    pioneer2-top-plate

    Figure 4.15: Top plate of the Pioneer 2TM robot

  3. for the two main wheels: two Solid nodes. Each Solid node's children list contains a Transform node, which itself contains a Shape node with a geometry Cylinder. Each Solid node has a name: "left wheel" and "right wheel". See figure 4.16 for the wheels' dimensions.

    pioneer2-wheels

    Figure 4.16: Wheels of the Pioneer 2TM robot

  4. for the rear wheel: a Transform node containing a Shape node with a geometry field set to Cylinder, as shown in figure 4.17

    pioneer2-rear

    Figure 4.17: Rear wheel of the Pioneer 2TM robot

  5. for the sonar supports: two Shape nodes with a geometry Extrusion. See figure 4.18 for the Extrusion coordinates.

    pioneer2-supports

    Figure 4.18: Sonar supports of the Pioneer 2TM robot

  6. for the 16 sonars: 16 DistanceSensor nodes. Each DistanceSensor node contains a Transform node. The Transform node has a Shape node containing a geometry Cylinder. See figure 4.19 and the text below for more explanation.

    pioneer2-sonars

    Figure 4.19: Sonar locations on the Pioneer 2TM robot

Modeling the sonars:

The principle is the same as for the MyBot robot. The sonars are cylinders with a radius of 0.0175 and a height of 0.002. There are 16 sonars, 8 on the front of the robot and 8 on the rear of the robot (see figure 4.19). The angles between the sonars and the initial position of the DEF SONAR Transform are shown in figure 4.20. A DEF SONAR Transform contains a Cylinder node in a Shape node with a rotation around the z axis. This DEF SONAR Transform must be rotated and translated to become the sensors ds0, ds1, etc.

pioneer2-position

Figure 4.20: Angles between the Pioneer 2TM sonar sensors

Each sonar is modeled as a DistanceSensor node, in which can be found a rotation around the y axis, a translation, and a USE SONAR Transform, with a name (ds0, ds1, ...) to be used by the controller.

Sonar name
translation rotation
ds0 -0.027 0.209 -0.164 0 1 0 1.745
ds1 -0.077 0.209 -0.147 0 1 0 2.094
ds2 -0.118 0.209 -0.11 0 1 0 2.443
ds3 -0.136 0.209 -0.071 0 1 0 3.14
ds4 -0.136 0.209 0.160 0 1 0 -3.14
ds5 -0.118 0.209 0.205 0 1 0 -2.443
ds6 -0.077 0.209 0.236 0 1 0 -2.094
ds7 -0.027 0.209 0.253 0 1 0 -1.745
ds8 0.027 0.209 0.253 0 1 0 -1.396
ds9 0.077 0.209 0.236 0 1 0 -1.047
ds10 0.118 0.209 0.205 0 1 0 -0.698
ds11 0.136 0.209 0.160 0 1 0 0
ds12 0.136 0.209 -0.071 0 1 0 0
ds13 0.118 0.209 -0.116 0 1 0 0.698
ds14 0.077 0.209 -0.147 0 1 0 1.047
ds15 0.027 0.209 -0.164 0 1 0 1.396

Table 4.1: Translation and rotation of the Pioneer 2TM DEF SONAR Transforms

To finish modeling the Pioneer 2TM robot, you will have to fill in the remaining fields of the DifferentialWheels node as shown in figure 4.21.

pioneer2-other

Figure 4.21: Some fields of the Pioneer 2TM DifferentialWheels node

4.4.3 Controller

The controller of the Pioneer 2TM robot is fairly complex. It implements a Braitenberg controller to avoid obstacles using its sensors. An activation matrix was determined by trial and error to compute the motor commands from the sensor measurements. However, since the structure of the Pioneer 2TM is not circular, some tricks are used, such as making the robot go backward in order to rotate safely when avoiding obstacles. The source code of this controller is a good programming example. The name of this controller is pionner2.

previous page go up next page
^ page top ^

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