Enable your pictures

Enable your pictures

Robot Trainer
Brian Chen

Robot:
Attack:
Defense:
Speed:
Dexterity:
Special Ability:
Type:
Weakness:
Model:
PIKACHEN
900
400
Like a lightning bolt
Like a ninja
Thunderbolt
Electric
Messing with its fluke
Scribbly Myro Bot

About Me
What do you like about Computer Science?
What did you do for the summer?
What are your hobbies?
What are you passionate about?
Making my scribbly robot go round and round in circles.
Think about my scribbly robot before I even got it.
Caring for my scribbly daily and feeding him.
Petting my scribbly robot.



Robot Training Grounds
Final Project 12/11/12
Lab Group: Brian Chen (PikaChen)

1. Write a description of your CS topic that you are trying to teach/demonstrate.
-- I am demonstrating human-computer-music interaction. Users will be able to use my keyboard as a user interface and interact with the robot as if it were a piano.
2. Write a description of how your program will engage the user.
-- The user will press certain keys on the keyboard and my robot will play sounds.
3. Describe your process for developing your human-computer interface
-- I used a switch statement to parse through my keyboard inputs.
4. Describe how you will evaluate your human-computer interface.
-- I will check how many keystrokes the user presses.
5. Describe how you will evaluate the user’s interaction.
-- I will see how many people actually come to my presentation. I will also count the number of keystrokes each user presses.
6. Write a description of how your program will collect user interaction information
-- The program automatically calculates the number of keystrokes and how many users have interacted with the robot based on how many times I enter the song mode.
7. How will you generate an evaluation report based on the user data collected?
-- On a text file....
HW 004: Rover 12/5/12
Lab Group: Brian Chen (PikaChen)

MY MARS ROVER PROGRAM CAN DETECT ALIENS ACCURATELY IN ALL THE PHOTOS!!!!

1. Write a description of your search algorithm for finding aliens in pictures for MARS.
- Search verticle columns for green. If found green then keep searching until the program stops finding green.
' 2. Write a description of your class Alien. What are its data members? What are its member functions?
- My alien's code is alien to me. It knows its number, size, position, and dimensions.
3. Describe your process for developing your object recognition algorithm
- Search verticle columns for green. If found green then keep searching until the program stops finding green. I cannot identify any other colors except green thingies.
4. Which picture did you start testing your algorithm with first? Why did you choose to start with that picture?
- I tested MARS5.jpg because there were two aliens with different colors. I figured if I could handle multiple colors, then I could handle pictures with a single color.
5. Write a description of your sorting algorithm for the aliens by size?
- My sorting algorithm is a bubble sort. It sorts bubbly.
6. Write a description of your sorting algorithm for the aliens by closeness to the rover?
- The positions are sorted by whichever alien has the lowest pixel on the picture.
7. What is the Big O of your sorting algorithms?
- n squared
HW 003: USAR 11/11/12
Lab Group: Brian Chen (PikaChen), Josh DiGiovanni (Wheatley), Cherys Fair (Puca), Matt Pohlmann (George)

1. Write a description of your team's USAR strategy. What is your algorithm and sensors used for this task?
- We are going to take pictures and drive. Obstacle sensors and IR sensors used so that robot doesn't ram itself into a wall. Each robot will start at the same position.
' 2. Write a description of your robot's performance for navigating through the mock disaster area. What is your algorithm and sensors used for this sub-problem?
- Based off my driving skill, the robot will perform as I perform. Sensor data will be monitored by me throughout the drive.
3. Write a description of your robot's locating lost scribblers behavior. What is your algorithm and sensors used for this sub-problem?
- The robot will take pictures whenever I deem it to. I will sort through the pictures and locate the lost scribblers.
4. Write a description of your team's mapping strategy. What is your algorithm for this task?
- We are going to drive in different directions. From our starting location, we will track the drive commands used to determine the location of our robot.
Lab 005: Arrays Lab 10/18/12
Lab Group: Brian Chen (PikaChen), Josh DiGiovanni (Wheatley), Ken Chang (NOS4A2), Matt Pohlmann (George)

In this lab, our robots had a list of songs and drawings that could be assigned to a playlist upon the user's request. The robot will first confirm the playlist by outputting the selected songs or drawings in the order of the user's input and then perform the corresponding action.
Here is a zip file of all the codes used to program this routine.

006-ArraysLab-BrianChen.zip
HW - 2: Robot Talent Show 10/4/12
Lab Group: Brian Chen (PikaChen), Josh DiGiovanni (Wheatley), Ken Chang (NOS4A2), Matt Pohlmann (George)

Prelab Answers

Opening Ceremony: Robot will play the fight song using the beep() command located in a header file. To allow user input and help spell out 'USC', the robot will accept user input such as w, s, a, and d to continuously move forward, back, turn left, and turn right. Inputting q or e will turn the robot a small, fixed amount and pressing space will stop the robot. Entering ` will end this segment and return to the behaviors menu.
Line Following: This function uses multi-threaded processes to accomplish its task. In the first thread, the robot moves forward checking both Line Sensors continuously and at the same time using a vector. This saves time getting the values (~0.25 seconds) instead of checking each individually (~0.5 seconds). Robot moves forward while both sensors detect a line; if the left sensor leaves the line, the robot turns to the right and vica versa. The second thread waits for the user to place an obstacle in front of the IR sensor, ending the line following behavior and returning to the main menu.
Maze Solving: The robot will move forward while the center obstacle sensor reports 0. Once it doesn't, the robot turns left or right depending on which obstacle sensor reports the lower value. If both values are equal, the robot chooses which way to turn depending on the result from rand () % 1 (seed based on time). All of this is done in a while loop that repeats as long as the battery is greater than 6.5. Each time it starts moving forward, an integer variable starting at 0 is incremented to keep track of how many times it moves forward. Once the variable = 7 (the number of times it should move forward according to the example maze), it waits 2 seconds to allow the robot to exit the maze, then stops and breaks the while loop.
Drawing: The robot utilizes multiple functions to draw the Sierpinski Triangles in the most efficient way possible: draw each third of the largest triangle, simultaneously forming the outter triangle. When finished, the robot will beep to say that it is done until a user shines a light into the center light sensor to end this behavior and return to the main menu.
Main Program: The algorithm that decides how the entire program procedes is as follows. The program parses user integer input into a switch statement that calls the appropriate function.


Here is a zip file of all the codes used to program this routine.

perform-brianych.zip
Lab 004 9/27/12
Lab Group: Brian Chen (PikaChen), Josh DiGiovanni (Wheatley), Matt Pohlmann (George)

Today, my robot can imitate different behaviors.


Robot Interactions Code
HW - 1: Robot Talent Show 9/21/12



Prelab Answers

1. Write a description of the song(s) your robot will sing and what is your algorithm and sensors for triggering the song.
- My robot will play the Thinking melody from Jeopardy triggered by a keyboard input.
- My robot will also be able to play notes based on keyboard inputs.
2. Write a description of what your robot will draw and what is your algorithm and sensors for triggering the drawing(s).
- Based on a keyboard input, my robot will draw a heart.
- My robot will also be able to move/draw based on user WASD commands.
3. Write a description of your robot’s surprise ability what is your algorithm and sensors for triggering the surprise ability.
- My robot is scared of the dark so he will beep when the lights are too dim. He will also beep if there is an object in front of him. My robot likes moving forward on white surfaces and when on a black surface, he will move backwards and make a random turn. He will also run away from an object that is chasing him from behind. Scared robot...
Take a look at the video of my robot's talents! Here is a zip file of all the codes used to program this routine.

TalentCode.ZIP
Lab 03 9/20/12

Enable your pictures

Lab Group: Brian Chen (PikaChen), Josh DiGiovanni (Wheatley), Richard Phillips (SwaggaWagon), Matt Pohlmann (George)

Today we made our robot draw the Fibonacci Spiral using this code: FiboSeq Code
Lab 02 9/13/12
Lab Group: Brian Chen (PikaChen), Josh DiGiovanni (Wheatley), Ken Chang (NOS4A2), Matt Pohlmann (George)

Today we experimented with the different sensors and incorporated the while, if, and for statements in our robot programs. My robot program taught my robot how to play rock paper scissors although the random function in the code is always repeats the same sequence each time the robot is restarted. Also, my robot will output the various readings of the sensors after playig rock paper scissors. Here is my robot code:

RPS Code 1 RPS Code 2
Lab 01-2 cont. 9/7/12
Lab Group: Brian Chen (PikaChen), Josh DiGiovanni (Wheatley), Wayne Chi (TurtleHead), Matt Pohlmann (George)

Robot Line - White Line - Black IR Sensor IR Distance Light Sensor Obstacle Sensor Obstacle Distance
PikaChen 0,0 1,1 Detect: 1
No-Detect: 0
Close: ~1"
Far: 2 iPhones
Bright: ~1500
Inclass: ~65000
Detect: 6400
No-Detect: 0
Furthest: 3 iPhones
Close: 1.5"
Wheatley 0,0 1,1 Detect: 1
No-Detect: 0
Close: ~1"
Far: ~16"
Bright: ~1300
Inclass: ~63000
Detect: 6400
No-Detect: 0
Furthest: 3 iPhones
Close: 1"
George 0,0 1,1 Detect: 1
No-Detect: 0
Close: ~2"
Far: ~15"
Bright: ~1400
Inclass: ~64000
Detect: 6400
No-Detect: 0
Furthest: 3 iPhones
Close: 1"
TurtleHead 0,0 1,1 Detect: 1
No-Detect: 0
Close: ~2"
Far: ~16"
Bright: ~1300
Inclass: ~62000
Detect: 6400
No-Detect: 0
Furthest: 3 iPhones
Close: 1"

Today we experimented with the various sensors on our robots from the light sensor to the obstacle sensors. Each robot had a slightly unique value outputted from the sensors possibly due to quality of the sensors.
Lab 01-2 9/6/12
Lab Group: Brian Chen (PikaChen), Josh DiGiovanni (Wheatley), Ken Chang (NOS4A2), Matt Pohlmann (George)

Today we experimented with sensors. Well more like just 1 sensor: the line sensor. Yes our robots can detect lines to an extent. There are two sensors located on the bottom of the robot. Each sensor outputs either 0 or 1 depending on if the sensor is directly above a light or dark surface respectively. If the left sensor was over a light surface and the right sensor was over a black surface, then the sensor output would read left = 0 and right = 1. To check our results, we programmed the robot to output the readings into the linux terminal. Further investigation of the other various sensors on the robot will occur tomorrow during the lab section.
Lab 01-1 9/4/12

Enable your pictures

Lab Group: Brian Chen (PikaChen), Josh DiGiovanni (Wheatly), Maggi Yang (Mybot), Matt Pohlmann (George)

Today we used Josh's bot to draw random shapes with a dry erase marker on a board. Matt figured out how to make the robot turn almost exactly 90 degrees and programmed the robot to draw a square (located near the top left). Josh used Matt's 90 degree parameters and drew the rectangle located near the top right. Maggie took a different approach and programmed the robot to draw a bow, which didn't fully connect at the end, but the shape definitely looked like a bow (located on top of the rectangle at the top right). I programmed the robot to draw a circle, which turned out to be 2 and a half circles, since my method of drawing the circles consisted of moving forward a tiny amount and turning left 100 times (located near the center).




Valid XHTML 1.0 Transitional!Valid CSS!

The University of Southern California does not screen or control the content on this website and thus does not guarantee the accuracy, integrity, or quality of such content. All content on this website is provided by and is the sole responsibility of the person from which such content originated, and such content does not necessarily reflect the opinions of the University administration or the Board of Trustees