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

     

4.3 My third world: 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 robots 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 controllerss/pioneer2 files for the world and controller details.

4.3.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 an Extrusion node.

This environment is shown in figure 4.16.

pioneer2-walls

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

4.3.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 wheels: two Cylinder nodes.

  4. a rear wheel: a Cylinder node.

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

  6. sixteen sonars: sixteen DistanceSensor nodes.

The Pioneer 2 DXTM robot is depicted in figure 4.17.

pioneer2

Figure 4.17: 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.18 for the coordinates of the Extrusion.

    pioneer2-body

    Figure 4.18: Body of the Pioneer 2TM robot

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

    pioneer2-top-plate

    Figure 4.19: Top plate of the Pioneer 2TM robot

  3. for the two wheels: two Solid nodes. Each Solid node children 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.20 for the wheels dimensions.

    pioneer2-wheels

    Figure 4.20: Wheels of the Pioneer 2TM robot

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

    pioneer2-rear

    Figure 4.21: Rear wheel of the Pioneer 2TM robot

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

    pioneer2-supports

    Figure 4.22: 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.23 and the text below for more explanation.

    pioneer2-sonars

    Figure 4.23: Sonars location on the Pioneer 2TM robot

Modelling the sonars:

The principle is the same as for the kiki 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.23). The angles between the sonars and the initial position of the DEF SONAR Transform are shown in figure 4.24. 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 FL1, RR4, etc.

pioneer2-position

Figure 4.24: Angles between the Pioneer 2TM sonar sensors

Each sonar is modelled 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 (FL1, RR4, ...) to be used by the controller.

Sonar name translation rotation
FL1 -0.027 0.209 -0.164 0 1 0 1.745
FL2 -0.077 0.209 -0.147 0 1 0 2.094
FL3 -0.118 0.209 -0.11 0 1 0 2.443
FL4 -0.136 0.209 -0.071 0 1 0 3.14
FR1 0.027 0.209 -0.164 0 1 0 1.396
FR2 0.077 0.209 -0.147 0 1 0 1.047
FR3 0.118 0.209 -0.116 0 1 0 0.698
FR4 0.136 0.209 -0.071 0 1 0 0
RL1 -0.027 0.209 0.253 0 1 0 -1.745
RL2 -0.077 0.209 0.236 0 1 0 -2.094
RL3 -0.118 0.209 0.205 0 1 0 -2.443
RL4 -0.136 0.209 0.160 0 1 0 -3.14
RR1 0.027 0.209 0.253 0 1 0 -1.396
RR2 0.077 0.209 0.236 0 1 0 -1.047
RR3 0.118 0.209 0.205 0 1 0 -0.698
RR4 0.136 0.209 0.160 0 1 0 0

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

To finish modelling the Pioneer 2TM robot, fill in the remaining fields of the DifferentialWheels node as shown in figure 4.25.

pioneer2-other

Figure 4.25: Some fields od the Pioneer 2TM DifferentialWheels node

4.3.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 backwards 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 pioneer2.

previous page go up next page
^ page top ^

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