Michael Mulet 04/18/13 IMDL sites.google.com/site/scaredycatrobot.

10
Scaredy Cat Robot Michael Mulet 04/18/13 IMDL sites.google.com/site/scaredycatrobot

Transcript of Michael Mulet 04/18/13 IMDL sites.google.com/site/scaredycatrobot.

Page 1: Michael Mulet 04/18/13 IMDL sites.google.com/site/scaredycatrobot.

Scaredy Cat RobotMichael Mulet

04/18/13IMDL

sites.google.com/site/scaredycatrobot

Page 2: Michael Mulet 04/18/13 IMDL sites.google.com/site/scaredycatrobot.

ScaredyCat RobotRobot that runs away from scary object that is “sees”

Page 3: Michael Mulet 04/18/13 IMDL sites.google.com/site/scaredycatrobot.

Sensor Description3 IR proximity sensors2 bump sensors1 Webcam w/ image processingDual axis accelerometer

Page 4: Michael Mulet 04/18/13 IMDL sites.google.com/site/scaredycatrobot.

Camera connects to beagle boardBBoard to “sensor” msp430“sensor” msp430 reads in data from Irs and

communicates to “motor” msp430Motor msp430 controls motors through pwm

Page 5: Michael Mulet 04/18/13 IMDL sites.google.com/site/scaredycatrobot.

Behavior Descriptionwhile(1){ P2OUT &=0x3F; //status leds offif(check_collision() == 1 ){ rightmotor(period/4,forwards);

leftmotor(period/4,forwards); }

if((P1IN & 0x04)!= 0){ //if pink is detected scared_mode(); } } //end of while loop

Page 6: Michael Mulet 04/18/13 IMDL sites.google.com/site/scaredycatrobot.

int check_collision(int direction){ if((check_rb() == 1) || (check_ir(frontRight) == 1)){ //collision on

right P2OUT &= 0x3F; //status LED P2OUT |= 0x40; avoid(left); return 1; } if((check_lb() ==1)|| (check_ir(frontLeft) == 1)){ //collision on left P2OUT &= 0x3F; //status LEDs P2OUT |= 0x80; avoid(right); return 1; } return 0;

Page 7: Michael Mulet 04/18/13 IMDL sites.google.com/site/scaredycatrobot.

Avoid back up for a random amount of time between .25 s and 2 s

Then turn right or left for a random amount of time

Random values are taken from LSB of timerIf collision, Recursive avoid

Page 8: Michael Mulet 04/18/13 IMDL sites.google.com/site/scaredycatrobot.

Spin around. Amount of spin and direction is randomwhile(1){ //check if any bumper or IR has been hit P2OUT |= 0xC0; //status LED if(check_collision(forwards) == 1){ return 1; }

if( check_accelermeter() ==1 ){ Return 1;

} }

Page 9: Michael Mulet 04/18/13 IMDL sites.google.com/site/scaredycatrobot.

Human interactivityStatus LEDsReady light on cameraBeagleboard

Page 10: Michael Mulet 04/18/13 IMDL sites.google.com/site/scaredycatrobot.

BeagleboardCaptrue image from cameraDownsample for speedConvert from BGR to HSVThreshold on HueTake the mean of the imageIf mean is greater than a threshold pink is

detectedGPIO, buffer logic