290 likes | 302 Views
This guide provides an in-depth exploration of Webots, a mobile robot simulation software that enables users to create virtual worlds with physical properties and program robots to exhibit desired behaviors. Learn about world creation, controller programming, and applications in mobile robotics teaching and research. Explore the components of Webots, such as worlds, controllers, and objects, and discover tools for programming robots like Kiki. Follow step-by-step instructions for installation, user directory setup, and controller programming examples. Enhance your understanding with construction tools, programming frameworks, and control settings.
E N D
Introduction to Webots 2005.08.24
Outlines • Introduction • World Description • Controller Programming • A Kiki Example
Introduction • Installation • Download Webots Software http://www.cyberbotics.com/products/webots/download.html • Double click on the webots-4.0.27_setup.exe • Follow the installation instructions
Introduction • Installation • Create user directory that contains three subdirectories where Webots will look for files. • World • Controller • Objects
Introduction • Descriptions of Webots • Features • Webots is a mobile robot simulation software • Webots allows users to create 3D virtual worlds with physical properties. • A number of sensor and actuator devices can be equipped to different robots. • The user can program each robot individually to exhibit a desired behavior.
Introduction • Descriptions of Webots • Applications • Mobile Robot Prototyping • Multi-agent Research • Adaptive Behavior Research • Mobile Robotics Teaching
Introduction • Components of Webots • World • A world is a 3D virtual environment where you can create objects and robots. • A world is a hierarchical structure • Controller • Controller is a program to control the robot • Controller may be executable (.exe) or Java binary files (.class).
World Description • World Coordinate
World Description • World Structure • A world is composed of a list of nodes, each containing fields. • Fields can contain values or nodes.
World Description • Construction Tools • Scene Tree Window
void reset(void){ • ….. • } • int run(int ms){ • …..; • return 64; • } Controller Programming • Program Framework • int main(void){ robot_live(reset); robot_run(run) } /* End of main-body */
Controller Programming • Programming Tools • Dev C++ • Visual C++ • Java Development Kit (JDK) • Library • <install dir>\controller.dll
Kiki Example • World Construction • PointLight Insertion • Wall Building • Robot Modeling
Kiki Example • World Construction • PointLight Insertion
Kiki Example • World Construction • Wall Building
Kiki Example • World Construction • Wall Building
Kiki Example • World Construction • Robot Modeling
Kiki Example • World Construction • Robot Modeling
Kiki Example • World Construction • Robot Modeling (Body)
Kiki Example • World Construction • Robot Modeling (Wheel)
Kiki Example • World Construction • Robot Modeling (Sensor)
Kiki Example • Controller Programming • static DeviceTag ir0, ir1; • void reset (void){ ir0 = robot_get_device(“ir0”); ir1 = robot_get_device(“ir1”); distance_sensor_enable(ir0, 64); distance_sensor_enable(ir1, 64); }/* End of reset */
Kiki Example • Controller Programming • int run (int ms){ short leftspeed, rightspeed; int value0, value1; value0 = distance_sensor_get_value(ir0); value1 = distance_sensor_get_value(ir1); leftspeed = …….; Rightspeed = …..; differential_wheels_set_speed(leftspeed, rightspeed); return 64; }/* End of run */
Kiki Example • Control Setting • Compile the program • Save the kiki.exe to control directory • Set controller to “kiki”
Reference • Webots User Guide • Webots Reference Manual