Webots fitness function7/15/2023 Then, after five seconds or so, the robot will "remember" the lamp and resume its light-seeking behaviour. When that happens, it should print its position to the console. The moment the robot gets real close to the lamp, however, it will “forget” it, make a U-turn, and move away. If it can detect the lamp, and it is far enough, it will move toward it. Your controller must implement a combination of behaviours, as follows: The robot will move straight by default. All code should be in a single source file. You can either modify the provided robot controller, which is in C, or replace it by your own controller using your programming language of choice. (10 marks) (c) Write your controller program. Lastly, it must have a single GPS device on board to report its position. It must also be equipped with one or more light sensor/s, to detect the lamp. In the end, your robot must have at least 4 and at most 8 distance sensors, to detect obstacles all around but mostly ahead of the robot. You can therefore use readily available sensors and must add any other as needed. All have the same blue body and the same pair of red wheels and their motors the only difference is the set of sensors. (b) Use a robot similar to any of the wheeled robots seen in the above-mentioned Webots demos. Lastly, add a solid lamp with a point light source to your environment, somewhere near the center. This world consists of a walled arena with a 4x4 chequered floor and four colored cuboid obstacles. ![]() It should look exactly like the one used in many Webots demos, such as for instance for the bumper, encoders, gps, led, pen, and several others. Problem 2: This exercise is about combining wisely and efficiently a number of demos and robot behaviors as provided by Webots, studied in class, and used in earlier projects, to build a working Braitenberg vehicle. The aim is to help the reader/instructor to better understand and appreciate your effort and implementation, and likely enhance your grade. Moreover, while you do not need to submit a paper (other than for Problem 1), you are required instead to include appropriate comments in your program files to explain your approach and especially your decision logic, and any other matter of interest as you see fit. What matters is the design, from top-level decision logic to low-level sensing and control directives, not the program syntax. Once again, note that your code should look very much the same regardless, as the same program logic should be implemented in all cases. Make sure your code will work anywhere (e.g., move the folder to a different disk location to test.) As was the case before, you may use any of the available programming languages i.e., either C, C++, Java, or Python. As indicated earlier, you ought to submit the entire folder (in Zip/Rar file). For each exercise hereafter, create a Webots project with the same number i.e., "Project2" and "Project3", that will contain your world model and robot controller/s (and any other folders as created by Webots). Nevertheless, feel free to browse the Webots user guide, examples, and reference manual as may be needed. ![]() All necessary concepts and features have been explained in class, and you surely explored more throughout the projects. Note about Problems 2-3: In the following two exercises, you must design and implement a program in the Webots robot simulator that we used throughout the semester.
0 Comments
Leave a Reply. |