Uploaded by burrr23 on Dec 31, 2006
Joe Khodari, Miles Hogan, and Shahrad Shahrooz
Real World Interfacing
Programming Challenge 5
UCLA Honors 69: ALiCE
Professor Gessler
All thanks to Prof. Gessler's help, we were able to make a robot that responded it its' environment. While Prof. Gessler built the robot, we added on the infrared sensors and did much of the coding for the robot's functionality.
We resolved to add buttons to the form allowing the user to make the robot move forward, back, right, and left. This was a simple task since we already had the code for "Opposite" and "Together," which coded for forward and reverse. Creating a right and left function were straightforward, no pun intended. However, when finished with this we still weren't satisfied. We decided we wanted the user to be able to control the robot using the arrow keys.
The user was now able to either control the robot using the buttons on the form or the arrow keys on the keyboard. We now had a fully operating and controllable robot.
We also added sound clips that correspond to the movements of the robot. When the user presses the forward button or up key, a clip of an engine revving plays. When the reverse button or down key is pressed, a clip of a truck reversing plays. When the pivot button is clicked, a funny clip sounding like cartoon character running/slipping plays.
After having success with getting the robot to respond well to computer input we decided to allow the robot to respond to its environment. Using infrared sensors, we enabled the robot to take in data from its surroundings and act upon it. Our ultimate goal was to allow the robot to rove around the classroom and respond to objects it approached.
First, we attached one infrared sensor to the robot. By adding some code from another program we were able to get a reading for the sensor.
Next, we added a function that allowed the robot to stop once it got too close to an object, preventing a collision. Whenever the reading was over a certain number (voltage), the program would "break" and the rover would stop. We had successfully enabled the robot to respond to its surroundings!
However, we didn't stop there. We decided that adding a second sensor would be useful if we wanted the robot to be able to turn and continue roving if it approached a wall. We tried this but had some trouble getting the robot to make a sharp enough turn to avoid hitting the wall and get jammed. To ameliorate our problem, we angled our sensors outward. This worked beautifully and our robot was able to approach a wall and make a turn. It could still rove even after approaching objects!
Once this was all complete, we played around with the roving function and found some interesting results.
After pointing the sensors slightly outwards, we tested the robot to see how it would react to obstacles. With this minor alteration, the robot worked very well. We previously thought that with this setup, if the robot ended up in a corner, it would not know be able to get out of the corner, and instead would keep turning while still turning side to side since the readings would be too high causing the robot to turn back the other way. The robot though was able to figure out on its own how to deal with this problem. The robot bounced from side to side, never hitting the wall, and eventually managed to make a complete turn out of the corner. One possible explanation for this is that since the IR sensors only take readings every half second, one IR sensor might be at the perfect distance from the wall between readings allowing it to turn out of the corner. Or maybe the loop that codes for the IR movement might have finished, thus allowing the robot to completely turn and continue in a different direction.
-
2 likes, 2 dislikes
3:27
Intelligent-Navigating Robot with Sensors, Compass, and GPSby yunanyuan1,781 views
0:57
Autonomous Robot Roverby aaqilkhan215,094 views
0:30
Obstacle Avoiding Robotby robosoftupload851 views
0:20
Sweeper Robot Infrared Communicationby usmanisi8,939 views
0:40
Robokits Multipurpose IR Sensor/Transreceiver testby robokitsindia1,227 views
0:48
Robot Finds and "Kicks" IR Soccer Ballby odomc4,782 views
1:18
Robonova-1 with Sharp GP2D12 Distance Sensor IIIby Robosupernova5,008 views
1:31
Oopic-r robot, now with two IR sensorsby jkoljonen711 views
1:00
Line Follower Robotby kaytec136,303 views
1:27
USB to IR Distance Sensor Robot Kit Demoby trossenrobotics11,547 views
0:54
My Arduino Line Following Robot - Using Pololu IR Reflectance Sensor Arrayby DuFFxP9315,553 views
2:47
Se.Gu.A.Ro. Sensor Guided Autonomous Robotby Remba924,081 views
5:52
wannabe Wall-eby parts4robots1,188 views
0:27
robot hunting trophiesby eyehearttv12,674 views
0:54
IR radar with sharp sensorby ojekeachten8,229 views
0:50
Wii IR Sensorby SENSbit1,434 views
0:43
[IR sensor test]by cjw25148,826 views
0:26
Robot with infrared sensors #2by burrr23131 views
2:48
left edge following Arduino based robot with IR distance sensorby jetty11221,036 views
1:03
Robot with infrared sensors #3by burrr23197 views
- Loading more suggestions...
Come on you cat do better then that!!
Pashtundonkey1 3 months ago
Come you c
Pashtundonkey1 3 months ago
hey, khod.... peopl....¡¡¡
jk.. nice job
jkhodari 3 years ago