

from the Wizards menu Then, choose your programming language and the file name.Ĭontroller programming requires some information related to the e-puck model.

Webots tutorial how to#
%spoiler " Reminder: How to create a new controller?" Modify the controller field of the E-puck node in order to associate it to the new controller.

Hands on #1: Save the previous world as collision_avoidance.wbt.Ĭreate a new C (or any other language) controller called e-puck_avoid_collision (for C++ and Java call it EPuckAvoidCollision instead) using the wizard. Some rudimentary programming knowledge is required to tackle this chapter (any C tutorial should be a sufficient introduction).Īt the end of the chapter, links to further robotics algorithms are given. The study of robotics algorithms is beyond the goals of this tutorial and so it won't be addressed here. This tutorial only addresses the correct usage of Webots functions. This tutorial will introduce you to the basics of robot programming in Webots.Īt the end of this chapter, you should understand what is the link between the scene tree nodes and the controller API, how the robot controller has to be initialized and cleaned up, how to initialize the robot devices, how to get the sensor values, how to command the actuators, and how to program a simple feedback loop. We will design a simple controller that avoids the obstacles created in the previous tutorials. Now we start to tackle the topics related to programming robot controllers. Tutorial 4: More about Controllers (30 Minutes)
