![]() |
2.2 Controller2.2.1 LocationThe controller program is still found in the controllers directory of your user directory defined in the Webots preferences. However, the name of the directory for each controller has changed: rename yourcontroller.khepera to yourcontroller (simply remove the .khepera extension). The same applies for the alice and supervisor controller directories where the .alice and .supervisor extensions must be removed. Note that if you used the same prefix for both khepera and a supervisor controller (e.g. stick_pulling.khepera and stick_pulling.supervisory), you will have to rename one of them because you cannot have two directories with the same name. For example, the stick_pulling.khepera directory can be renamed to stick_pulling and the stick_pulling.supervisor directory can be renamed to stick_pulling_supervisor. 2.2.2 KheperaThe khepera_xxx functions have disappeared. You must replace them with their counterparts of the new API as illustrated on table 2.2:
Table 2.2: Some equivalent function calls between Webots 2 and Webots Morover, the #include <Khepera.h> must be replaced by the following:
2.2.3 AliceThe alice_xxx functions have also disappeared. Now you can program the Alice robot (indeed a differentially wheeled robot) just like any other robot in Webots. Thus all the functions described in the above subsection also apply to an Alice robot model. 2.2.4 GUIThe gui_xxx functions have all disappeared and should now be replaced by GTK+ functions. GTK+ is much more powerful than the GUI provided with Webots 2 and is well documented. You can find the GTK+ documentation (Tutorial and Reference Manual) on the Webots CD-ROM, in books available in computer science libraries, and on the GTK+ web site. 2.2.5 SupervisorThe syntax of supervisor functions has changed a lot from Webots 2 to be more consistent with the rest of the API. For example, a supervisor is now considered as a robot, hence the supervisor_step function has been replaced by the robot_step function. However,the way in which the supervisor interacts with webots remains unchanged. ![]() ![]() ![]() ^ page top ^ |
E-mail to webmaster | Last updated: | Copyright © 2002 Cyberbotics Ltd. |