The Team
Members & Assignments
Archive
Team\Game Strategy
Mech.\Software Designs
Blogs\Schedule\Status Reports
Media
Pictures\Video Gallery
|
Software Design | Mechanical Designs | Testing Procedures | Sunny's Main Design
Software Design Mechanical Design | Top
Source Code for Tracking Objects:
#use "xbccamlib.ic"
void main() {
init_camera(); while (1) {
printf("%d\t%d\t%d\t%d",
track_x(0, 0),
track_y(0, 0),
track_size(0, 0),
track_count(0));
if (track_x(0,0)) {
move_at_velocity(0, 5*(track_x(0,0)-176));
move_at_velocity(1, 5*(176-track_x(0,0)));
}
else motor(1,30);
motor(0,30);
sleep(0.1);
display_clear();
}
}
/* So far it can pivote and track blobs */
Updated Tracking Program
int a, g;
#use "xbccamlib.ic"
void main(){
vision_track_n_follow();
}
/*STR8 RUN******************************************************/
void vision_track_n_follow(){ //will run straight if none of the sensors are triggered
init_camera(); // initialize camera
track_update(); // update info from camera queue
while(1) {
if (track_x(0,0)) {
move_at_velocity(0, 5*(track_x(0,0)-176));
move_at_velocity(1, 5*(176-track_x(0,0)));
}
if(digital(8) == 0 && digital(9) == 0 && digital(10) == 0 && digital(11) == 0){
for(a = 0; a <= 25; a++){
motor(0, 1);
motor(1, 1);
sleep(0.02);
}
for(a = 1; a <= 100; a++){
motor(0, a);
motor(1, a);
sleep(0.02);
}
for(a = 0; a <= 25; a++){
motor(0, 100);
motor(1, 100);
sleep(0.02);
}
}
/*If front right bumper is triggered*/
if(digital(8) == 1){
for(a = 0; a <= 50; a++){
motor(0, -1);
motor(1, -1);
sleep(0.02);
}
for(a = 0; a <= 25; a++){
motor(0, 0);
motor(1, 1);
sleep(0.02);
}
}
/*If front left bumper is triggered*/
if(digital(9) == 1){
for(a = 0; a <= 50; a++){
motor(0, -1);
motor(1, -1);
sleep(0.02);
}
for(a = 0; a <= 25; a++){
motor(0, 1);
motor(1, 0);
sleep(0.02);
}
}
/*If rear right bumper is triggered*/
if(digital(10) == 1){
for(a = 0; a <= 50; a++){
motor(0, 1);
motor(1, 1);
sleep(0.02);
}
for(a = 0; a <= 25; a++){
motor(0, 0);
motor(1, 1);
sleep(0.02);
}
}
/*If rear left bumper is triggered*/
if(digital(11) == 1){
for(a = 0; a <= 50; a++){
motor(0, 1);
motor(1, 1);
sleep(0.02);
}
for(a = 0; a <= 25; a++){
motor(0, 1);
motor(1, 0);
sleep(0.02);
}
}
}
}
Claw Operations:
// Claw Operation
int a;
void main(){
// Lower Claw
printf("Lower Claw\n");
down();
close();
set_servo_position(0, !185);
sleep (1.5);
up ();
sleep (1.0);
/* If the Claw lowers and senses something under
the claw then CLOSE then RAISE claw.
Idle for 1 Second
Move Forward until Both Side Sensors Activates
When Activated, turn both Motors Off
OPEN Claw
*/
pipe_sense();
printf("Pipe Sensed, Releasing\n");
off(1); off(2);
sleep(1.0);
open(); sleep(2.0); about_face();
}
// If the claw lowers and nothing's under it, go back up
// [][][][][][][][] FUNCTION [][][][][][][][]
// Pipe Sensors Function
void pipe_sense(){
// As Long and Both sensors aren't activated, go forward
while(!digital(8) & !digital(9) | digital(8) & !digital(9) | !digital(8) & digital(9)){
fd(1);
fd(2);
}
}
// About Face
void about_face(){
for(a = 0; a < 100; a++)
bk(1); bk(2);
}
//---------------------------------- Claw Operations -----------------------
// Open Claw
void open(){
enable_servos();
set_servo_position(0, 75);
}
// Close Claw
void close(){
enable_servos();
set_servo_position(0, 185);
sleep(1.0);
}
//--------------------------------- Lift Operations ---------------------
// Raise Lift
void up(){
for(a = 0; a < 300; a++){
motor(0, -75);
}
a = 0; ao();
}
// Lower Lift
void down(){
for(a = 0; a < 300; a++){
motor(0, 75);
}
a = 0; ao();
}
|
Mechanical Designs Software Design | Top
The concepts for a certain task for a robot can be very simple, but when everything is put into consideration, the navigation concepts, the sensing concepts, and appendages conepts, constructing the robot can become very difficult. The procedures we used for each part was simply trial and error.
Below are some ideas and concepts for the robot. Nothing have been decided upon as for now.
Appendages:
Expandable/Contractable Probe:
- Purpose: To knock down BotGuy and Foam Ball(s)
- Pros: Gives us the oppurtunity to score big points.
- Cons: Very Unstable and wasting of time is likely.
Powerful Large Clamp/Claw:
- Purpose: Give the Robot the ability to either grasp the opponent's robot into our area to force round forfeit
- Pros: Instant Victory!
- Cons: Limited by time of only 35 seconds! Have to design our robot to be heavy and very powerful.
Plow:
- Purpose: Gather and dump trash and bottles into proper areas, or improper areas
- Pros: Very Simple and Easy to build and program
- Cons: Bottles and trash tends to slither out of the plow. Trash becomes difficult to deal with when trying to dump into irs area.
Moving Ramp with Stationary Wall Guards:
- Purpose: Used to easily dump trash or recyclables into bins
- Pros: Very Simple and Easy to build and program
- Cons: Time Consuming
|
Navigation:
Tank Style, Belt Wheels:
- Purpose: Navigation
- Pros: Very stable, balanced, can fit a large body on top
- Cons: Can be slow, bulky, in the way.
Two Wheels, and free support back wheel:
- Purpose: Navigation
- Pros: Very stable, balanced, can fit a large body on top. Potentially has good agility. Easy to program.
- Cons: None can be thought of!
|
Sensing:
Camera:
- Location: Low to the ground, on front of the robot.
- Purpose: To identify objects and locations by color.
Touch Sensor:
- Location: Low to the ground, on front of the robot.
- Purpose: To be able to sense if its touch the pipe and ready for release of item in the claw
2 Infrared Sensors:
- Location: Under the Robot.
- Purpose: To be able to detect the black border.
Range Finder:
- Location: In front, about half way up.
- Purpose: To be able to detect objects for tyhe use of the claw.
|
Testing Procedure - Top
Navigation:
Move forward.
-Going from lowest speed to fastest speed.
-Going from fastest speed to slowest speed.
-Going fast then stop.
Normal to fast : Fast to normal.
Normal to slow : slow to normal.
Move Backward.
-Same as move forward.
Spin.
45 degrees - 360 degrees, moving slow to fast and fast to slow.
45 degrees - 360 degrees, moving slow.
45 degrees - 360 degrees, moving normal.
45 degrees - 360 degrees, moving fast.
Forward turns.
Moving slow to fast and fast to slow.
Moving normal.
Moving fast.
Backward turns.
Same as forward turn.
Have the camera turn to find the bot buddy, ball, trash, and bottle.
Test the infrared sensor by passing the black line and make a sound when it passes or by not passing the line.
Test the switch by making the robot shake or make a beep if pressed.
|
Sensors:
Camera:
- Puttin proper colored construction paper to see if the camera can track that color
Infrared:
- Hooking up sensors to the HB and programming it so that it converts the value that the infrared dectector inputs into a useable value.
Ranger Finder:
- Hooking it up to the HB and programming it so that it converts the value that the Range Finder inputs into a useable value.
Touch Sensors
- Testing touch sensors was simple. The point was to test it's efficiency on purpose it is to be used for. Mount two sensors on the robot and program it so that whenever it activates, it changes direction, according to which touch sensor was activated.
|
Main Designs For Sunny - Top
It has been Decided
Navigation:
Dual Wheels. For Balance, a structure is placed behind at the bottom of the Robot
Sensing:
A Range Finder is placed in front of the robot to detected if anything is grabbable for the claw.
The camera is used for finding objects, and it's location.
Two touch sensors are placed on front of the robot to dectect if it is in contact with the pipe for the release of the item picked up.
Two Infrared Sensors are placed underneath the robot to detect the black border on the gamboard.
Apendages:
A large claw is placed in front of the robot. It dangles from a string, part of a pulley system built; used for lifting and lowering the claw.
|
|