Sie sind auf Seite 1von 3

Projects Based Learning: Exploring Robotics Through Python

(based on Robotics Club participation)

Lesson

Code Objective

Narrative

1 to 2

As with any new language, you have to first learn the basics before you can move on to more complicated material. The objective of my first code was to navigate the maze using the commands moveRight, Left, Up or Down. The second code introduced how to make my robot draw shapes. Using Python logic, I was able to draw uppercase and lowercase letters, and shapes in various colors and sizes. I forgot to save the code for both of these lessons, so it will not appear in the coding section of this project.

I started off learning about my robot and how to program it through simulation programs. In other words, rather than first working with a real world robot, I was able to test out my ideas on a virtual model. There was a document I was required to read before each lesson which told me more about my robot, and taught me the skills I needed to progress. Each lesson's simulation had a number of different puzzles and activities I could do. Like programing my virtual robot to navigate a digital maze, or programming my virtual robot to follow a light source, or move when I press a certain button on the keyboard. There was one activity that taught me how to make my own text "choose your own adventure" game.

3

The objective of lesson 3 was to make my first brain program, and create my own maze by telling the simulator to put blocks in specific places using the X and Y coordinates.

After learning the basics of my robot, where it's sensors are, how it moves, and how to program it using python; I moved on to something a little more complex: brain programs. A brain program is a simple AI (artificial intelligence). I made my brain program so my virtual robot could navigate the virtual mazes by itself.

4

The objective of my lesson 4 code was to make it so my virtual robot would follow a virtual light, which I could control with my arrow keys.

The hardest part about this program was the fact that the robot could only detect light in a limited field of view. If the light wasn't almost perfectly in front of the robot, it wouldn't follow it. This was a problem since when I tried to get the robot to turn left or right, it wouldn't see the light and kept going straight forward off the screen.

Lesson

Code Objective

Narrative

5 to 6

The Controllers code contains all the simulation worlds I used through lessons 5-6, and are either selected or unselected using a hashtag symbol in front of the line of code. All of the programs I made for each of the simulations are also in the code.

In lessons 5 and 6 things got more interesting. There were more virtual puzzles for me to solve, programs for me to write, and I was almost ready to work with my very own robot. In fact, I could have started using real life robots then and there; however I decided to complete all the virtual puzzles first.

Lesson/

Project

Code Objective

Narrative

7

The objective of this was to practice with a real life robot, and to play around with different self-controlled projects.

It was finally time for me to use my robot which meant that the lesson portion of my training had become project-based. At first I was surprised at how similar the real robot was to the virtual one; however, I quickly learned that the fact that the sensors on each robot were different made things much harder. The thing I liked most about using a real robot was I was able to do whatever I wanted with it. There weren't any restraints on what I could do. All I had to do was start something, and I would get supported and helped along the way. There were even some people who were developing a tablet game with Python. At first I ran the robot through some simple duct tape mazes, then I started building my own mazes out of poster board and Velcro. After a couple weeks of practice and perfecting, I came up with my navigateWall command, which was made the robot able to navigate almost any maze, though it had a problem with turning corners.

Lesson/

Project

Code Objective

Narrative

8

The objective of this project was to modify my Findwall program so it was able to make a virtual map. It tracked where my robots had been in a maze. My robot found the best way through the maze by remembering where it had been, and could trace itself back to any given point.

The development of this program was the last thing I did in robotics club. It was very difficult, and required very precise measurements and calculations using trigonometry, and geometry. The first thing I did was measure out the parameters determining where each of the robots sensors could detect things. I used my CheckSensos command in order to figure out which robots preformed the best. Next, I created a window which would write a line in accordance with where my robot had travelled. To do that I had to greatly modify my navigateWall command until it turned into a different command entirely. The entire process of making sure the computer knew where my robot was and writing a precise line wherever my robot went took about 2 months. I ended up having to measure not only the x,y coordinates, but also the angle of the robot. I also had to trace where the robot was in space. I ended up learning lots of tricks, and commands in the process. In the end, I was able to make the virtual map precisely trace the robot's path. In addition, I improved the FindWall command so the robot can navigate through mazes and make sharp turns around corners. Believe me, this was a feat in itself. Unfortunately, I ran out of time and never got to make it so the robot could use the map to return to a designated point in the maze or find the best route through the maze.