Difference between revisions of "Webots"
(→Screenshots) |
(→Screenshots) |
||
Line 51: | Line 51: | ||
Workplace in Webots: | Workplace in Webots: | ||
[[Image:1.png|left|600px|Workplace in V-REP:]] | [[Image:1.png|left|600px|Workplace in V-REP:]] | ||
+ | <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> | ||
+ | |||
+ | |||
+ | Sensor for new robot: | ||
+ | [[Image:Webots2.png|left|600px|Workplace in V-REP:]] | ||
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> | <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> |
Revision as of 12:49, 19 June 2012
About project
Webots is a professional robot simulator widely used for educational purposes. The Webots project started in 1996, initially developed by Dr. Olivier Michel at the Swiss Federal Institute of Technology (EPFL) in Lausanne, Switzerland. Webots uses the ODE (Open Dynamics Engine) for detecting of collisions and simulating rigid body dynamics. The ODE library allows one to accurately simulate physical properties of objects such as velocity, inertia and friction. A large collection of freely modifiable robot models comes in the software distribution. In addition, it is also possible to build new models from scratch. When designing a robot model, the user specifies both the graphical and the physical properties of the objects. The graphical properties include the shape, dimensions, position and orientation, colors, and texture of the object. The physical properties include the mass, friction factor, as well as the spring and damping constants. Webots includes a set of sensors and actuators frequently used in robotic experiments, e.g. proximity sensors, light sensors, touch sensors, GPS, accelerometers, cameras, emitters and receivers, servo motors (rotational & linear), position and force sensor, LEDs, grippers, gyros and compass. The robot controller programs can be written in C, C++, Java, Python and MATLAB. The AIBO, Nao and E-puck robot models can also be programmed with the URBI language (URBI license required). Webots offers the possibility to take PNG screen shots and to record the simulations as MPEG (Mac/Linux) and AVI (Windows) movies. Webots worlds are stored in cross-platform .wbt files which format is based on the VRML language. It is also possible to import and export Webots worlds or objects in the VRML format. Another useful feature is that the user can interact with a running simulation at any time, i.e. it possible to move the robots and other object with the mouse. Webots is used in several online robot programming contests. The Robotstadium[1] competition is a simulation of the RoboCup Standard Platform League. In this simulation two teams of Nao play soccer with rules similar to regular soccer. The robots use simulated cameras, ultrasound and pressure sensors. In the Rat's Life[2] competition two simulated e-puck robots compete for energy resources in a Lego maze. Matches are run on a daily basis and the results can be watched in online videos.
Example of source code
wb_robot_keyboard_enable(TIME_STEP);
do {
sc_update();
double speeds[2] = {0.0, 0.0};
int c = wb_robot_keyboard_get_key();
while (c) {
switch (c) {
case WB_ROBOT_KEYBOARD_UP:
speeds[LEFT] += MAX_SPEED;
speeds[RIGHT] += MAX_SPEED;
break;
case WB_ROBOT_KEYBOARD_DOWN:
speeds[LEFT] -= MAX_SPEED;
speeds[RIGHT] -= MAX_SPEED;
break;
case WB_ROBOT_KEYBOARD_LEFT:
speeds[LEFT] -= TURN_SPEED;
speeds[RIGHT] += TURN_SPEED;
break;
case WB_ROBOT_KEYBOARD_RIGHT:
speeds[LEFT] += TURN_SPEED;
speeds[RIGHT] -= TURN_SPEED;
break;
}
c = wb_robot_keyboard_get_key();
}
wb_differential_wheels_set_speed(speeds[LEFT], speeds[RIGHT]);
} while (wb_robot_step(TIME_STEP) != -1);
Screenshots
Workplace in Webots:
Sensor for new robot: