introduction to webot

Upload: adele-maratova

Post on 06-Jul-2018

243 views

Category:

Documents


10 download

TRANSCRIPT

  • 8/17/2019 Introduction to Webot

    1/63

    Manual WebotsWorldsControllersPrototypesSamplesDevicesReal RobotHowTo

  • 8/17/2019 Introduction to Webot

    2/63

    What is Webots?

    • Webots is a professional mobile robot simulation softwarepackage. It oers a rapid prototyping environment, thatallows the user to create 3D virtual worlds with physicsproperties such as mass, oints, friction coe!cients, etc.

    •  "he user can add simple passive obects or active obects

    called mobile robots. "hese robots can have dierentlocomotion schemes #wheeled robots, legged robots, or$ying robots%.

    • &oreover, they may be e'uipped with a number of sensorand actuator devices, such as distance sensors, drive

    wheels, cameras, servos, touch sensors, emitters, receivers,etc.• (inally, the user can program each robot individually to

    e)hibit the desired behavior. Webots contains a largenumber of robot models and controller program e)amples to

    help users get started.

  • 8/17/2019 Introduction to Webot

    3/63

    *ample of Webot proectsblimp_lis.wbt (citate rom samples! demo!worlds"

    • #eywords$ Flying robot, physics plugin, keyboard, joystick•  "his is an e)ample of the $ying blimp robot developed at the +aboratory of

    Intelligent *ystems #+I*% at -(+. ou can use your keyboard, or a oystick tocontrol the blimp/s motion across the room. 0se the up, down, right, left,page up, page down and space #reset% keys. 1arious "ransform andInde)ed(ace*et nodes are used to model the room using te)tures andtransparency. 2 physics plugin is used to add thrust and other forces to the

    simulation.

  • 8/17/2019 Introduction to Webot

    4/63

    %umanoid.wbt (citate rom samples! demo!worlds"

    • #eywords$ Humanoid, QRIO robot , obotis D2wIn45- robot.• In this e)ample, a humanoid robot performs endless gymnastic movements

    6 *occer play

  • 8/17/2019 Introduction to Webot

    5/63

    -ioneer 32" #citate from guide tour%• -ioneer 32" robot #2dept &obileobots%.•  "his all terrain four wheels drive robot is e'uipped with a *ick +&* 789 range

    :nder.

    • It is programmed to perform a simple obstacle avoidance behavior based onthe sensor data measured by the range :nder.

  • 8/17/2019 Introduction to Webot

    6/63

    ;att.wbt #citate from samples

  • 8/17/2019 Introduction to Webot

    7/63

    *occer.wbt (citate rom samples! demo!worlds"• #eywords$ Soccer, Supervisor, Dierential!heels, label• In this e)ample, two teams of simple DierentialWheels robots play

    soccer. 2 *upervisor is used as the referee@ it counts the goals anddisplays the current score and the remaining time in the 3D view. "his e)ample shows how a *upervisor can be used to read andchange the position of obects.

  • 8/17/2019 Introduction to Webot

    8/63

    angeA:nder.wbt #citate from samples

  • 8/17/2019 Introduction to Webot

    9/63

    &oon.wbt (citate rom samples! demo!worlds"• #eywords$ Dierential!heels, %oala, keyboard, te&ture'• In this e)ample, two Coala robots #C4"eam% circle on a moon4like

    surface. ou can modify their traectories with the arrow keys onyour keyboard. "he moon4like scenery is made of Inde)ed(ace*etnodes. ;oth robots use the same controller code.

  • 8/17/2019 Introduction to Webot

    10/63

    camera.wbt (citate rom samples!devices!worlds"

    • #eywords$ $amera, image processing, Dierential!heels• obot uses a camera to detect colored obects. "he robot analyses

    the ; color level of each pi)el of the camera images. It turns andstops for a few seconds when it has detected something. It also

    prints a message in the >onsole e)plaining the type of obect it hasdetected. ou can move the robot to dierent parts of the arena#using the mouse% to see what it is able to detect.

  • 8/17/2019 Introduction to Webot

    11/63

    connector.wbt (citate rom samples!devices!worlds"

    • #eywords$ $onnector, Servo, Inde&ed(ineSet, )S*, D*F, Dierential!heels• In this e)ample, a light robot #light blue% is lifted over two heavier robots

    #dark blue%. 2ll three robots are e'uipped with a >onnector placed at the tip

    of a moveable handle #*ervo%. 2n Inde)ed+ine*et is added to every>onnector in order to show the a)es. When the simulation starts, the lightrobot approaches the :rst heavy robot and their connectors dock to eachother. "hen both robots rotate their handles simultaneously, and hence thelight robot gets passed over the heavy one. "hen the light robot gets passedover another time the second heavy robot and so on ... 2ll the robots in thissimulation use the same controller@ the dierent behaviors are selected

    according to the robot/s name.

  • 8/17/2019 Introduction to Webot

    12/63

    *hrimp III #citate from samples

  • 8/17/2019 Introduction to Webot

    13/63

    so&ourner.wbt

    • #eywords$ Sojourner, +assive joint, planetary e&ploration robot, keyboard,Inde&edFaceSet 

    •  "his is a realistic model of the B*oournerB &ars e)ploration robot #F2*2%. 2 largeobstacle is placed in front of the robot so that it is possible to observe how the robotmanages to climb over it. "he keyboard can be used to control the robot/s motion. 

    • -hysics4based model of the *urveyor *149 robot #*urveyor >orp.%. "he tracksystem is emulated with a series of G wheels for each of the two tracks.

  • 8/17/2019 Introduction to Webot

    14/63

    'ps.wbt

    • #eywords$ +S, Supervisor, Dierential!heels, keyboard•  "his e)ample shows two dierent techni'ues for :nding out the current

    position of a robot. "he :rst techni'ue consists in using an on4board -*

    device. "he second method uses a *upervisor controller that reads andtransmits the position info to the robot. Fote that a *upervisor can read #orchange% the position of any obect in the simulation at any time. "hise)ample implements both techni'ues, and you can choose either one or theother with the keyboard. "he // key prints the robot/s -* device position. "he /*/ key prints the position read by the *upervisor.

  • 8/17/2019 Introduction to Webot

    15/63

    Kuka YouBot

    This model includes an accurate and fast simulation of the Meccanum wheels.

    The robot can be equiped with various sensors (including the MicrosoftKinect) and configured with zero, one or two arms.

  • 8/17/2019 Introduction to Webot

    16/63

    i'%t_sensor.wbt (citate rom samples!devices!worlds"

    • #eywords$ (ightSensor, +oint(ight, lamp, light -ollo.ing '• In this e)ample, the robot uses two +ight*ensors to follow a light

    source. "he light source can be moved with the mouse@ the robotwill follow it.

  • 8/17/2019 Introduction to Webot

    17/63

    What Webot can do

    • &obile robot prototyping #academic research, theautomotive industry, aeronautics, the vacuumcleaner industry, the toy industry, hobbyists, etc.%

    • obot locomotion research #legged, humanoids,'uadrupeds robots, etc.%

    • &ulti4agent research #swarm intelligence,collaborative mobile robots groups, etc.%

    • 2daptive behavior research #genetic algorithm,neural networks, 2I, etc.%.

    •  "eaching robotics #robotics lectures, >HH

  • 8/17/2019 Introduction to Webot

    18/63

    Webot *kills

    • 2 basic knowledge of the >, >HH, ava, -ython, &atlab or0;I programming language is necessary to programyour own robot controllers.

    • Jowever, even if you don/t know these languages, youcan still program the e4puck and Jemisson robots using a

    simple graphical programming language called ;ot*tudio.• If you don/t want to use e)isting robot models provided

    within Webots and would like to create your own robotmodels, or add special obects in the simulatedenvironments, you will need a basic knowledge of 3D

    computer graphics and 1&+8K description language.•  "hat will allow you to create 3D models in Webots or

    import them from 3D modelling software

  • 8/17/2019 Introduction to Webot

    19/63

    Webot simulation consists of • 2 Webots .orld :le #.wbt% that de:nes one or

    several robots and their environment. "he .wbt:le does sometime depend on e)ernal prototypes:les #.proto% and te)tures.

    • 5ne or several controller programs for the aboverobots #in >HH

  • 8/17/2019 Introduction to Webot

    20/63

    What is world?

    • 2 world, in Webots, is a 3D description of theproperties of robots and of their environment. Itcontains a description of every obect position,orientation, geometry, appearance #like color orbrightness%, physical properties, type of obect, etc.

    • (or e)ample, a robot can contain two wheels, adistance sensor and a servo which itself contains acamera, etc.

    • 2 world :le doesn/t contain the controller code of the

    robots@ it only speci:es the name of the controller thatis re'uired for each robot.• Worlds are saved in .wbt :les. "he .wbt :les are stored

    in the worlds subdirectory of each Webots proect.

  • 8/17/2019 Introduction to Webot

    21/63

    W%at is a controller )

    • 2 controller is a computer program that controls arobot speci:ed in a world :le.

    • >ontrollers can be written in any of theprogramming languages supported by Webots >,>HH, ava, 0;I, -ython or &2"+2; "&.

    • When a simulation starts, Webots launches thespeci:ed controllers, each as a separate process,and it associates the controller processes with the

    simulated robots.

  • 8/17/2019 Introduction to Webot

    22/63

    World (iles*eneralities

    • Webots world :les must use the .wbt :le name e)tension. "he:rst line of a .wbt :le uses this header• L1&+A*I& 1E.N utfO+odes and #eywords• ,RM- nodes• Webots implements only a subset of the nodes and :elds

    speci:ed by the 1&+8K standard. In the other hand, Webotsalso adds many nodes, which are not part of the 1&+8Kstandard, but are speciali=ed to model robotic e)periments.

    •  "he following 1&+8K nodes are supported by Webots2ppearance, ;ackground, ;o), >olor, >one, >oordinate,

    >ylinder, Directional(ight, *levationrid, *&trusion, Fog, roup,

    Image/e&ture, Inde&edFaceSet, Inde&ed(ineSet, 0aterial,+oint(ight, Shape, Sphere, Spot(ight, /e&ture$oordinate,/e&ture/rans-orm, /rans-orm, 1ie.point and !orldIn-o'

    • Jere are Webots additional nodes 2ccelerometer, $amera, $harger, $ompass, $onnector,Dierential!heels, DistanceSensor, *mitter, +S, yro,

    Hyperate, (*D, (ightSensor, +en, +hysics, Receiver, Robot,Servo, Solid, Supervisor and /ouchSensor'

  • 8/17/2019 Introduction to Webot

    23/63

    World (iles

    /S0 and D01

    • 2 node which is named using the D( keywordcan be referenced later by its name in the same:le with 0* statements.

    •  "he D( and 0* keywords can be used to reduceredundancy in .wbt and .proto :les.

    • D( name are limited in scope to a single.wbtor .proto :le. If multiple nodes are given thesame D( name, each 0* statement refers tothe closest node with the given D( namepreceding it in the .wbt or .proto :le.

  • 8/17/2019 Introduction to Webot

    24/63

    -rototype

    • 2 prototype de:nes a new node type in terms of built4innodes or other prototypes.

    •  "he prototype interface de:nes the :elds for theprototype.

    • 5nce de:ned, prototypes may be instantiated in the

    scene tree e)actly like built4in nodes. Jere e)ample ofproto de:nition

  • 8/17/2019 Introduction to Webot

    25/63

    /sin' Prototypes wit% t%e Scene Tree• *everal prototype e)amples are packaged with Webots.

    Instances of these prototypes can be added to thesimulation with the *cene "ree buttons. Fote that currentlythe *cene "ree allows the instantiation but not the de:nitionof prototypes. -rototype de:nitions must be created ormodi:ed manually in .proto :les.

    Prototype Directories• In order to make a prototype available to Webots, the

    complete prototype de:nition must be placed in a .proto:le. ach .proto :le can contain the de:nition for only oneprototype, and each :le must be saved under the nameP prototype3ameQ.proto, where prototype3ame is thename of the prototype as speci:ed after the -5"5keyword #case4sensitive%. (or e)ample the above

     "wo>olor>hair prototype must be saved in a :le name "wo>olor>hair.proto.

  • 8/17/2019 Introduction to Webot

    26/63

    • ;y de:nition, the current proect directory is the parent

    directory of the worlds directory that contains the currentlyopened .wbt :le.• 2dd Fode Dialog• If a prototype is saved in a :le with proper name and location, it

    should become visible in the 2dd a node dialog that can beinvoked from the Scene Tree.

  • 8/17/2019 Introduction to Webot

    27/63

    )ample of -roto

    • 2 complete e)ample of prototype de:nition and instantiationis provided here. "he prototype is called "wo>olor>hair@ itde:nes a simple chair with four legs and a seating part.

    • (or simplicity, this prototype does not have bounding obectsnor -hysics nodes. 2 more complete e)ample of this prototype

    named *imple>hair is provided in Webots distribution.•  "he "wo>olor>hair prototype allows to specify two colors onefor the legs and one for the seating surface of the chair.

    •  "he interface also de:nes a translation :eld and a rotation:eld that are associated with the e'ually named :elds of theprototype/s *olid base node. "his allows to store the position

    and orientation of the prototype instances.

  • 8/17/2019 Introduction to Webot

    28/63

    1i'ure $ "wo instances of the "wo>olor>hair prototype in Webots

  • 8/17/2019 Introduction to Webot

    29/63

    +odes and 1unctions

    +odes•

    Webots nodes listed in this reference are described using standard1&+ synta). -rincipally, Webots uses a subset of the 1&+8Knodes and :elds, but it also de:nes additional nodes and :eldsspeci:c to robotic de:nitions. (or e)ample, the Webots WorldInfo and *phere nodes have additional :elds with respect to 1&+8K.

    http://c/Program%20Files%20(x86)/Webots/doc/reference/section3.52.htmlhttp://c/Program%20Files%20(x86)/Webots/doc/reference/section3.44.htmlhttp://c/Program%20Files%20(x86)/Webots/doc/reference/section3.44.htmlhttp://c/Program%20Files%20(x86)/Webots/doc/reference/section3.52.html

  • 8/17/2019 Introduction to Webot

    30/63

    1unctions•  "his manual covers all the functions of the controller 2-I,

    necessary to program robots. "he > prototypes of these functionsare described under the S43O+SIS tag. "he prototypes for theother languages are available through hyperlinks or directly inchapter 9N. "he language4related particularities mentioned underthe label called $55 3ote, 6ava 3ote, +ython 3ote, 0atlab 3ote,etc.

    Remote Control•  "he >, >HH, ava or the -ython 2-I can be used for programming

    a remotely controlled e4puck, Chepera or 2ibo robot. "his can beachieved through the robot window in the Webots graphical userinterface.

    3D0$ 3pen Dynamics 0n'ine• Webots relies on 5D, the 5pen Dynamics ngine, for physicssimulation. Jence, some Webots parameters, structures orconcepts refer to 5D. "he Webots documentation does not,however, duplicate or replace the 5D documentation. Jence, itis recommended to consult the 5D documentation to understandthese parameters, structures or concepts. "his 5D

    documentation is available online from the 5D web site.

  • 8/17/2019 Introduction to Webot

    31/63

    */4 Pro'rammin' or Controller Pro'rams•  "he programming of graphical user interfaces #0I% is not covered in

    this manual since Webots can use any 0I library for creating userinterfaces for controllers #including "CH, w)Widgets, &(>, *wing,etc.%. 2n e)ample of using w)Widgets as a 0I for a Webots controlleris provided in the w)gui controller sample included within the Webotsdistribution.

    +ode c%art•  "he Webots Fode >hart outlines all the nodes available to build

    Webots worlds.• In the chart, an arrow between two nodes represents an inheritance

    relationship. "he inheritance relationship indicates that a derivednode #at the arrow tail% inherits all the :elds and 2-I functions of abase node #at the arrow head%. (or e)ample, the *upervisor nodeinherits from the obot node, and therefore all the :elds and functionsavailable in the obot node are also available in the *upervisor node.

  • 8/17/2019 Introduction to Webot

    32/63

  • 8/17/2019 Introduction to Webot

    33/63

    0sing >HH 2-Iprogramming

  • 8/17/2019 Introduction to Webot

    34/63

  • 8/17/2019 Introduction to Webot

    35/63

  • 8/17/2019 Introduction to Webot

    36/63

  • 8/17/2019 Introduction to Webot

    37/63

    i i

  • 8/17/2019 Introduction to Webot

    38/63

    0sing ava -rogramming

  • 8/17/2019 Introduction to Webot

    39/63

  • 8/17/2019 Introduction to Webot

    40/63

  • 8/17/2019 Introduction to Webot

    41/63

  • 8/17/2019 Introduction to Webot

    42/63

    Fodes 6 2-I function• &any of components < nodes in Webots app

    e)ample as in 2ccelerometer, 2ppearance,;ackground, ;o) >amera, >ameraRoom, >apsule,>harger, >olor, >ompass, >one, >ontact-roperties,>onnector, >oordinate, >ylinder, Damping,DierentialWheels, Directional+ight, Display,Distance*ensor, levationrid mitter, )trusion,(og, -* roup, yro, Image"e)tureInde)ed(ace*et, Inde)ed+ine*et, +D, +ight,+ight*ensor, &aterial, -en ,-hysics, -lane,

    -oint+ight, eceiver, obot *ervo, *hape, *olid,*phere, *pot+ight, *upervisor, "e)ture>oordinate,

     "e)ture"ransform, "ouch*ensor, "ransform.

  • 8/17/2019 Introduction to Webot

    43/63

    2ccelerometer

    •  "he 2ccelerometer node can be used to model accelerometer devicessuch as those commonly found in mobile electronics, robots andgame input devices. "he 2ccelerometer node measures accelerationand gravity induced reaction forces over 9, 7 or 3 a)es. It can be usedfor e)ample to detect fall, the up

  • 8/17/2019 Introduction to Webot

    44/63

    2ppearance

    •  "he 2ppearance node speci:es the visual properties of ageometric node. "he value for each of the :elds in this nodemay be F0++. Jowever, if the :eld is non4F0++, it shallcontain one node of the appropriate type.

    1ield Summary•  "he material :eld, if speci:ed, shall contain a &aterial node.

    If the material :eld is F0++ or unspeci:ed, lighting is o #alllights are ignored during rendering of the obect thatreferences this 2ppearance% and the unlit obect color is#9,9,9%.

    •  "he te)ture :eld, if speci:ed, shall contain an Image"e)turenode. If the te)ture node is F0++ or the te)ture :eld is

    unspeci:ed, the obect that references this 2ppearance isnot te)tured.•  "he te)ture"ransform :eld, if speci:ed, shall contain a

     "e)ture"ransform node. If the te)ture"ransform is F0++ orunspeci:ed, the te)ture"ransform :eld has no eect.

  • 8/17/2019 Introduction to Webot

    45/63

    ;o)•  "he ;o) node speci:es a rectangular parallelepiped bo) centered at #N,N,N%

    in the local coordinate system and aligned with the local coordinate a)es.

    ;y default, the bo) measures 7 meters in each dimension, from 49 to H9.•  "he si=e :eld speci:es the e)tents of the bo) along the & 4, y 4, and 7 4a)esrespectively. "hree positive values display the outside faces while threenegative values display the inside faces.

    •  "e)tures are applied individually to each face of the bo). 5n the front #H 7 %,back #4 7 %, right #H & %, and left #4 & % faces of the bo), when viewed from theoutside with the H y 4a)is up, the te)ture is mapped onto each face with the

    same orientation as if the image were displayed normally in 7D. 5n the topface of the bo) #H y %, when viewed from above and looking down the  y 4a)istoward the origin with the 4 7 4a)is as the view up direction, the te)ture ismapped onto the face with the same orientation as if the image weredisplayed normally in 7D.

    5n the bottom face of the bo) #4 y %,when viewed from below looking upthe y 4a)is toward the origin with theHR4a)is as the view up direction, thete)ture is mapped onto the face withthe same orientation as if the imagewere displayed normally in 7D.

     "e)ture"ransform aects the te)turecoordinates of the ;o).

  • 8/17/2019 Introduction to Webot

    46/63

    >amera

    •  "he >amera node is used to model a robot/s on4board camera, a

    range4:nder, or both simultaneously. "he resulted image can bedisplayed on the 3D window. Depending on its setup, the >ameranode can model a linear camera, a lidar device, a &ircosoft Cinector even a biological eye which is spherically distorted.

    1ield Summary• :eld5f1iew hori=ontal :eld of view angle of the camera. "he value

    ranges from 8 to UV radians. *ince camera pi)els are s'uares, the

    vertical :eld of view can be computed from the width, height andhori=ontal :eld5f1iew• vertical FO1 9 #eldO-1ie. : height ; .idth • width width of the image in pi)els• height height of the image in pi)els• type type of the camera BcolorB, Brange4:nderB or BbothB. "he

    camera types are described precisely in the correspondingsubsection below.• spherical switch between a planar or a spherical proection. 2

    spherical proection can be used for e)ample to simulate abiological eye or a lidar device. &ore information on sphericalproection in the corresponding subsection below.

    Camera Type

  • 8/17/2019 Introduction to Webot

    47/63

    yp

    •  "he camera type can be setup by the type :eld described above.

    Color

    •  "he color camera allows to get color information from the 5pen+ conte)t of thecamera. "his information can be get by the wbAcameraAgetAimage function, while thered, green and blue channels #;% can be e)tracted from the resulted image by thewbAcameraAimageAgetA4like functions.

    • Internally when the camera is refresh, an 5pen+ conte)t is created, and the ;information is copied into a buer of unsigned char #N47GG%. It/s this buer which isaccessible by the wbAcameraAgetAimage function.

    Ran'e51inder

    •  "he range4:nder camera allows to get depth information #in meters% from the 5pen+

    conte)t of the camera. "his information can be get by the wbAcameraAgetArangeAimagefunction, while the depth can be e)tracted from the resulted image by thewbAcameraArangeAimageAgetAdepth function.

    • Internally when the camera is refresh, an 5pen+ conte)t is created, and the =4buer iscopied into a buer of $oat. 2s the =4buer contains scaled and logarithmic values, analgorithm lineari=es the buer to metric values between near and ma)ange. It/s thisbuer which is accessible by the wbAcameraAgetArangeAimage function.

    6ot%•  "his type of camera allows to get both the color data and the range4:nder data in theresulted buer doing only one 5pen+ conte)t. "his has been introduced foroptimi=ation reasons, mainly for the &icrosoft Cinect device, because creating the5pen+ conte)t is costly. "he color image and the depth data can be get with thewbAcameraAgetAimage and the wbAcameraAgetArangeAimage functions as describedabove.

  • 8/17/2019 Introduction to Webot

    48/63

    )ample of camera functions

    • wb_camera_enable, wb_camera_disable " enableand disable camera updates

    • wb_camera_'et_ov, wb_camera_set_ov " get andset #eld o- vie. -or a camera

    •wb_camera_'et_widt%, wb_camera_'et_%ei'%t "get the si7e o- the camera image

    •   wb_camera_'et_type " get the type o- the camera

  • 8/17/2019 Introduction to Webot

    49/63

    +ight *ensor• +ight*ensor nodes are used to model photo4transistors, photo4diodes or

    any type of device that measures the irradiance of light in a given

    direction. Irradiance represents the radiant power incident on a surface inWatts per s'uare meter #W

  • 8/17/2019 Introduction to Webot

    50/63

    +ight *ensor1ield Summary• lookup"able this table allows Webots to map simulated

    irradiance values to user4de:ned sensor output values and tospecify a noise level. "he :rst column contains the inputirradiance values in W

  • 8/17/2019 Introduction to Webot

    51/63

    • Fote that the occlusion $ag aects only the direct  light measurement, not the ambient  light which isalways added in. ;y default, the occlusion :eld isdisabled because the occlusion detection is

    computationally e)pensive and should be avoidedwhenever possible. (or e)ample, in a setup whereit is obvious that there will never be an obstaclebetween a particular sensor and the various light

    sources, the occlusion $ag can be set to (2+*.•  *ee the section on the Distance*ensor node formore e)planation on how a lookup"able works.

    > t

  • 8/17/2019 Introduction to Webot

    52/63

    >onnector• >onnector nodes are used to simulate mechanical docking systems,

    or any other type of device, that can dynamically create a physical

    link #or connection% with another device of the same type.• >onnector nodes can only connect to other >onnector nodes. 2t any

    time, each connection involves e)actly two >onnector nodes #peer topeer%. "he physical connection between two >onnector nodes can becreated and destroyed at run time by the robot/s controller. "heprimary idea of >onnector nodes is to enable the dynamicrecon:guration of modular robots, but more generally, >onnector

    nodes can be used in any situation where robots need to be attachedto other robots.• >onnector nodes were designed to simulate various types of docking

    hardware• &echanical links held in place by a latchripping mechanisms

    • &agnetic links between permanent magnets #or electromagnets%• -neumatic suction systems, etc.• >onnectors can be classi:ed into two types, independent of the

    actual hardware system• Symmetric connectors, where the two connecting faces are

    mechanically #and electrically% e'uivalent. In such cases bothconnectors are active.

    •  2symmetric connectors, where the two connecting interfaces are

  • 8/17/2019 Introduction to Webot

    53/63

    >onnector 2)is *ystem

    • 2 >onnector/s a)is system is displayed by Webots whenthe corresponding robot is selected or when Display 2&es is checked in Webots +re-erences. "he 7 4a)is is drawn asa G cm blue line, the y4a)is #a potential docking rotation%is drawn as a G cm red line, and each additional potentialdocking rotation is displayed as a X cm black line.

    •  "he bounding obects and graphical obects of a>onnector should normally be designed such that thedocking surface corresponds e)actly to &y 4plane of thelocal coordinate system. (urthermore, the >onnector/s =4a)is should be perpendicular to the docking surface andpoint outward from the robot body.

    • (inally, the bounding obects should allow thesuperposition of the origin of the coordinate systems.

    • If these design criteria are not met, the >onnector nodeswill not work properly and may be unable to connect.

  • 8/17/2019 Introduction to Webot

    54/63

    +ote$ "o be functional, a >onnector node re'uires thepresence of a -hysics node in its parent node. ;ut it is notnecessary to add a -hysics node to the >onnector itself.

  • 8/17/2019 Introduction to Webot

    55/63

    Damping• 2 Damping node can be used to slow down a body #a *olid

    node with -hysics%. "he speed of each body is reduced bythe speci:ed amount #between N.N and 9.N% every second.2 value of N.N means Bno slowing downB and value of 9.Nmeans a Bcomplete stopB, a value of N.9 means that thespeed should be decreased by 9N percent every second.

    • 2 damped body will possibly come to rest and become

    disabled depending on the values speci:ed in WorldInfo.Damping does not add any force in the simulation, itdirectly aects the velocity of the body. "he dampingeect is applied after all forces have been applied to thebodies. Damping can be used to reduce simulationinstability.

    • 2 Damping node can be speci:ed in the defaultDamping:eld of the WorldInfo node@ in this case it de:nes thedefault damping parameters that must be applied toevery body in the simulation.

    -h i

  • 8/17/2019 Introduction to Webot

    56/63

    -hysics•  "he -hysics node allows to specify parameters for the physics

    simulation engine.• -hysics nodes are used in most Webots worlds with the e)ception

    of some purely kinematics4based simulations.•  "he -hysics node speci:es the mass, the center of gravity and the

    mass distribution, thus allowing the physics engine to create abody  and compute realistic forces.

    • 2 -hysics node can be placed in a *olid node #or any node derived

    from *olid%.•  "he presence or absence of a -hysics node in the physics :eld ofa *olid de:nes whether the *olid will have a  physics or akinematic behavior.

    4n passive ob&ects• If a passive obect should never move during a simulation then

    you should leave its physics :eld empty. In this case no contactforce will be simulated on this obect and hence it will nevermove.

    4n Robot• 2rticulated robot, humanoids, vehicles and so on, are built as

    hierarchies of *olid nodes #or subclasses of *olid%. "he contactand friction forces generated by legs or wheels are usually a

    central aspect of the simulation of robot locomotion.

    b

    http://c/Program%20Files%20(x86)/Webots/doc/reference/section3.43.htmlhttp://c/Program%20Files%20(x86)/Webots/doc/reference/section3.43.htmlhttp://c/Program%20Files%20(x86)/Webots/doc/reference/section3.43.htmlhttp://c/Program%20Files%20(x86)/Webots/doc/reference/section3.43.html

  • 8/17/2019 Introduction to Webot

    57/63

    obot•  "he obot node can be used as basis for building a robot, e.g., an

    articulated robot, a humanoid robot, a wheeled robot...•

    If you want to build a two4wheels robot with dierential4drive you shouldalso consider the DierentialWheels node. If you would like to build arobot with supervisor capabilities use the *upervisor node instead#Webots -5 license re'uired%.

    1ield Summary• controller name of the controller program that the simulator must use to

    control the robot. "his program is located in a directory whose name ise'ual to the :eld/s value. "his directory is in turn located in thecontrollers subdirectory of the current proect directory. (or e)ample, ifthe :eld value is BmyAcontrollerB then the controller program should belocated in myAproect

  • 8/17/2019 Introduction to Webot

    58/63

    *olid• 2 *olid node represents an obect with physical properties such as

    dimensions, a contact material and optionally a mass.•  "he *olid class is the base class for collision4detected obects.

    obots and device classes are subclasses of the *olid class.• In the 3D window, *olid nodes can be manipulated #dragged,

    lifted, rotated, etc% using the mouse.• Direct derived nodes 2ccelerometer, >amera, >harger, >ompass,

    >onnector, Display, Distance*ensor, mitter, -*, yro, +D,

    +ight*ensor, -en, eceiver, obot, *ervo, "ouch*ensor

    DierentialWheels

    http://c/Program%20Files%20(x86)/Webots/doc/reference/section3.1.htmlhttp://c/Program%20Files%20(x86)/Webots/doc/reference/section3.5.htmlhttp://c/Program%20Files%20(x86)/Webots/doc/reference/section3.8.htmlhttp://c/Program%20Files%20(x86)/Webots/doc/reference/section3.10.htmlhttp://c/Program%20Files%20(x86)/Webots/doc/reference/section3.13.htmlhttp://c/Program%20Files%20(x86)/Webots/doc/reference/section3.19.htmlhttp://c/Program%20Files%20(x86)/Webots/doc/reference/section3.20.htmlhttp://c/Program%20Files%20(x86)/Webots/doc/reference/section3.22.htmlhttp://c/Program%20Files%20(x86)/Webots/doc/reference/section3.25.htmlhttp://c/Program%20Files%20(x86)/Webots/doc/reference/section3.27.htmlhttp://c/Program%20Files%20(x86)/Webots/doc/reference/section3.27.htmlhttp://c/Program%20Files%20(x86)/Webots/doc/reference/section3.25.htmlhttp://c/Program%20Files%20(x86)/Webots/doc/reference/section3.22.htmlhttp://c/Program%20Files%20(x86)/Webots/doc/reference/section3.20.htmlhttp://c/Program%20Files%20(x86)/Webots/doc/reference/section3.19.htmlhttp://c/Program%20Files%20(x86)/Webots/doc/reference/section3.13.htmlhttp://c/Program%20Files%20(x86)/Webots/doc/reference/section3.10.htmlhttp://c/Program%20Files%20(x86)/Webots/doc/reference/section3.8.htmlhttp://c/Program%20Files%20(x86)/Webots/doc/reference/section3.5.htmlhttp://c/Program%20Files%20(x86)/Webots/doc/reference/section3.1.html

  • 8/17/2019 Introduction to Webot

    59/63

    DierentialWheels

    •  "he DierentialWheels node can be used as base node tobuild robots with two wheels and dierential steering. 2nyother type of robot #legged, humanoid, vehicle, etc.%needs to use obot as base node.

    • 2 DierentialWheels robot will automatically take controlof its wheels if they are placed in the children :eld. "hewheels must be *olid nodes, and they must be namedBright wheelB and Bleft wheelB. If the wheel obects arefound, Webots will automatically make them rotate at thespeed speci:ed by thewbAdierentialAwheelsAsetAspeed#% function.

    •  "he origin of the robot coordinate system is the proectionon the ground plane of the middle of the wheels/ a)le. "he &  a)is is the a)is of the wheel a)le, y  is the verticala)is and 7  is the a)is pointing towards the rear of therobot #the front of the robot has negative 7  coordinates%.

    *imulation modes

  • 8/17/2019 Introduction to Webot

    60/63

    *imulation modes•  "he DierentialWheels/s motion can be computed by dierent

    algorithms BphysicsB, BkinematicsB or B(ast7DB depending on thestructure of the world.

    P%ysics mode• 2 DierentialWheels is simulated in BphysicsB mode if it contains

    -hysics nodes in its body and wheels. In this mode, the simulationis carried out by the 5D physics engine, and the robot/s motion iscaused by the friction forces generated by the contact of the

    wheels with the $oor. "he wheels can have any arbitrary shape#usually a cylinder%, but their contact with the $oor is necessary forthe robot/s motion.

    #inematics mode• When a DierentialWheels does not have -hysics nodes then it is

    simulated in BkinematicsB mode. In the BkinematicsB mode therobot/s motion is calculated according to 7D kinematics algorithms

    and the collision detection is calculated with 3D algorithms.(riction is not simulated, so a DierentialWheels does not actuallyre'uire the contact of the wheels with the $oor to move. Instead,its motion is controlled by a 7D kinematics algorithm using thea)le+ength, wheeladius and ma)2cceleration :elds.

  • 8/17/2019 Introduction to Webot

    61/63

    1ast7D (0n8i" mode•  "his mode is enabled when the string BenkiB is speci:ed in the

    WorldInfo.fast7d :eld. "he B(ast7DB mode is implemented in a

    user4modi:able plugin which code can be found in thisdirectorywebots

  • 8/17/2019 Introduction to Webot

    62/63

    yro•  "he yro node is used to model 9, 7 and 34a)is angular velocity

    sensors #gyroscope%. "he angular velocity is measured in radians

    per second Srad

  • 8/17/2019 Introduction to Webot

    63/63

    eview eal obot

    • 05puc8_line.wbt (avoid obstacles usin' t%e braitenber'controller."

    • %emisson_cross_compilation.wbt (two rectangular obstacles toavoid"$ Dierential!heels, BotStudio, graphical programming, Hemisson

    • 2lice (real robot5avoidin' wall usin' t%e braitenber'controller" $ Braitenberg, DistanceSensor 

    • 6oebot.wbt(real robot 9 avoidin' wall in arena"

    • botstudio_obstacle.wbt (same as %emission_cross_compilationbut more simpler"

    • 8%epera.wbt

    • 8%epera_'ripper.wbt (to 'rip a stic8 and move t%en pt on t%e

    :oor"• rover.wbt

    • 6otstudio_ma;e.wbt (same as Robomind"

    • 4pr_cube.wbt