4.2 Adding a camera to the MyBot robotThis section can be considered as an exercise to check if you understood the principles for adding devices to a robot. If you want to skip this section because you feel comfortable with Webots and you are not interested in cameras, you may skip directly to the next section, which addresses physics and does not require that the MyBot is equipped with a camera. The camera to be modeled is a color 2D camera, with an image 80 pixels wide by 60 pixels high, and a field of view of 60 degrees (1.047 radians). We can model the camera shape as a cylinder, on the top of the MyBot robot at the front. The dimensions of the cylinder are 0.01 for the radius and 0.03 for the height. See figure 4.11. ![]() Figure 4.11: The MyBot robot with a camera Try modeling this camera. The mybot_camera.wbt file is included in the Webots distribution, in the worlds directory, in case you need help. A controller program for this robot, named mybot_camera, is also included in the mybot project, in the controllers directory. This camera program does not perform image processing, since it is just a demonstration program, but you could easily extend it to perform actual image processing. The robot could, for example, learn to recognize the different objects of the scene and move towards or away from them depending on whether the object is categorized as "good" or "bad." ![]() ^ page top ^ |
| E-mail to webmaster | Last updated: | Copyright © 2008 Cyberbotics Ltd. |