100% found this document useful (1 vote)
207 views

Activity: Webot-Robot Simulation Robot Operating System (Ros) (5 Hour)

This document provides information about conducting a 5-hour session on robot simulation using Robot Operating System (ROS) and Webots. Students will learn how to build an obstacle avoiding robot in Webots and get an introduction to ROS terminology. The session covers the basic user interface of Webots, examples of sample worlds, and demonstrates how to test a first simulation by creating a new world with a robot and objects in an arena environment. It also describes how to modify the environment by creating a ball object using the graphical representation in Webots.

Uploaded by

sudiprd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
207 views

Activity: Webot-Robot Simulation Robot Operating System (Ros) (5 Hour)

This document provides information about conducting a 5-hour session on robot simulation using Robot Operating System (ROS) and Webots. Students will learn how to build an obstacle avoiding robot in Webots and get an introduction to ROS terminology. The session covers the basic user interface of Webots, examples of sample worlds, and demonstrates how to test a first simulation by creating a new world with a robot and objects in an arena environment. It also describes how to modify the environment by creating a ball object using the graphical representation in Webots.

Uploaded by

sudiprd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Activity : WeBot- Robot Simulation 

Robot Operating System(ROS) 


[5 Hour] 

This  session  includes  ROS(Robot  Operating  System)  [Webots:  Robot 


Simulator].  Students  will  get  knowledge  about  how  robots  simulate​ . 
This  topic  includes  an  activity  on  how  to  build  a  Obstacle  Avoiding 
Robot  using  Webots:  Robot  Simulator.  ​ Webots  provides  a  complete 
development environment to model, program and simulate robots. 
 
Before  diving  into  the  software,  Mentor  should  introduce  ROS 
terminology. And download the application on their dedicated PCs. 
 
[Note:  ROS  (Robot  Operating  System,  it  is  not  an  Operating  System  is 
more  like  an  environment.  It  offers  a  rapid  prototyping  environment 
that  allows  the  user  to  create  3D  virtual  worlds  with  physics 
properties such as mass, joints, friction coefficients, etc.]  
 
Students  should  have  basic  knowledge  on  Physics  properties,  and 
Mathematics. 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Terms used in WeBot : 
 
[ ​
What is Webot : Robot Simulator​? 
 
answer  :  Webots  is  a  professional  mobile  robot  simulation 
software  package.  It  offers  a rapid prototyping environment, that 
allows the user to create 3D virtual worlds.​] 
  
[​
What is World​? 
 
answer  :  A  world,  in  Webots,  is  a  3D  description  of  the 
properties  of  robots  and  of  their  environment.  It  contains  a 
description  of  every  object:  position,  orientation,  geometry, 
appearance  (like  color  or  brightness),  physical  properties,  type 
of object, etc​ . ] 
  
[ ​
What is a Controller​? 
 
answer  :  A  controller  is a computer program that controls a robot 
specified  in  a  world  file.  Controllers  can  be  written  in  any  of 
the  programming  languages  supported  by  Webots:  C,  C++,  Java, 
Python or MATLAB.​] 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
U
​ser Interface​:​​Webots GUI is composed of four principal windows. 
 
1. 3D window (Middle) 
2. Scene tree (Left side) 
3. Text Editor(Right Side) 
4. Console( Bottom) 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
The GUI has nine menus: 
 
​File, Edit, View, Simulation, Build, Overlays, Tools, Wizards​and ​Help​

 
 
 
 
 
 
 
 
 
 
 
 
 
# Sample Webots Application​ : 
 
Example worlds can be tested easily, and can be directly opened from 
Webots using the​O
​pen Sample World​​
item in ​
File​m . 
​enu​
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
For example:​​Open Sample World item​in 
File​menu click , 
 
 
 
 
 
 
 
then choose option from Open Sample World 
dialogue box​ i.e 
[ >
​humans​
,  
>
​languages​, 
>
​robots​

>samples , 
>
​vehicles​ ]  
 
 
 
 
 
 
 
#Testing the first Simulation ​

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Create a new World 
 
# Create a new project  
 
> ​
Wizards​menu  

 
 
> ​
New Project 
Directory...​menu item 
and follow the 
instructions: 
 
>> Name the project 
directory  
>> Name the world file 
>> Click all the tick 
boxes, including the "Add 
a rectangle arena" 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
# changing the size 
 
>> Double-click R
​ectangleArena​node  
 
>> Select the ​
floorTileSize​field  
>> set its value. 

>> Select the wallHeight field 


and change its value. 

 
 

# adding the objects 

> Select the last node​R


​ectangleBox  

> Click A
​dd​button at the top of 
the scene tree 
 
 
 
> In the open dialog box, choose 
PROTO nodes (Webots Projects) / 
objects / factory / containers / 
WoodenBox (Solid)​

>> Change its ​


translation​. 
Alternatively​
, you may use the 
green arrow that appears in the 
3D view to adjust its 
translation.y​field. 

 
 

# Add a e-puck Robot: 

> Select the last node 


WoodenBox  

> Click on the​A


​dd​​
button​   

  

> In the dialog box, choose 


PROTO nodes (Webots Projects) / 
robots / gctronic / e-puck / 
E-puck (Robot) 

> Save the simulation 

> press the​​


Run real-time​button . 

 
 

Modification of the Environment : 

How to create simple objects in the environment. 

/* After the above said procedure,Remain above Environment as it is. 


now we create a Solid object i.e Ball using below said graphical 
representation./* 

The figure depicts a rigid body and its sub-nodes. The graphical 
representation of the Solid node is defined by the Shape nodes 
populating its ​
children​list. 

The simplest model of a rigid body in Webots having a graphical 


representation. 

 
 

Creating a Ball 
# ​
 
 
 
 
 
 
 
 
 
 
 
 
For creating a ball, we will follow the graphical representation step 
by step. 
 
 
 
 
> press the ​
Add​button. 
 
> open the B
​ases nodes​section. 
 
> select the ​
Solid​​
node. 
 
 
 
 
 
 
 
 
 
 
 
 
> expand the ​
Solid​node. 
 
>> select its ​
children​field.  
 
> Add a S
​hape​node > using the A
​dd 
button. 
 
 
 
 
 
 
 
 
 
>  Select  the  ​
appearance  field  of  the  Shape  node  and  use  the  ​
Add 
button to add a P
​BRAppearance​node. 

>> Add a S
​phere​node as the ​
geometry​field. 

>> change the ​


PBRAppearance​​
node [ value 0 to value 1] 
(optional). 

>> Add another S


​phere​node to the ​
boundingObject​field. 

>> Add a P
​hysic​
s​node to the p
​hysics​field. 

 
 

>> S
​ave​the simulation (mandatory). 

>> Final Result will look like below : 

You might also like