/* ********************************************************************* * * * NAME: Gary E. Shay, Jr. SSN: 576-74-2564 * * CLASS: CS-455 Robot Vision, Dr. Roger Webster * * * * * * This program exercises the robot and shows interfacing to * * the speech synthesizer. * * * ********************************************************************* */ /* --------------------------------------------------------------------- */ /* catch.c */ /* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */ /* - Some necessary includes... - */ /* --------------------------------------------------------------------- */ #include #include #include #include #include #include /* --------------------------------------------------------------------- */ /* - Global variables and structures... - */ /* --------------------------------------------------------------------- */ #define DEG_PER_RAD 57.2958 #define fabs(x) ((x < 0) ? (-x) : (x)) main() { /* Initialize the Robot. */ ROBOT$INIT(); /* Initialize the Speech Synthesizer */ ROBOT$SPEECH_INIT(); /* Begin the exerciser. */ ROBOT$SPEAK( "Welcome to Row bot arow bicks." ); ROBOT$OPEN_GRIPPER( 3.3 ); ROBOT$OPEN_GRIPPER( 1.0 ); ROBOT$OPEN_GRIPPER( 3.3 ); ROBOT$CLOSE_GRIPPER(); ROBOT$SPEAK("Touch your tows. One."); sleep( 1 ); ROBOT$MOVE(250.0, 0.0, 0.0, 26.0, 90.0, 0.0); ROBOT$SPEAK("And two."); sleep( 1 ); ROBOT$MOVE(250.0, 0.5, 0.0, 1.0, -110.0, 0.0); ROBOT$SPEAK("Three."); sleep( 1 ); ROBOT$MOVE(250.0, 0.0, 0.0, 26.0, 90.0, 0.0); ROBOT$SPEAK("And four."); sleep( 1 ); ROBOT$MOVE(250.0, 0.5, 0.0, 1.0, -110.0, 0.0); ROBOT$MOVE(250.0, 8.0, 0.0, 13.0, 0.0, 0.0); ROBOT$SPEAK("Ecksirsize the hand."); ROBOT$MOVE(250.0, 15.0, 0.0, 13.0, 0.0, 0.0); ROBOT$MOVE(250.0, 10.0, 0.0, 11.0, -45.0, 180.0); ROBOT$MOVE(250.0, 10.0, 0.0, 15.0, 45.0, -180.0); ROBOT$MOVE(250.0, 10.0, 0.0, 11.0, -45.0, 180.0); ROBOT$MOVE(250.0, 10.0, 0.0, 15.0, 45.0, -180.0); ROBOT$SPEAK("Razzle dazzle right to left."); sleep( 1 ); ROBOT$MOVE(250.0, 8.0, 3.0, 0.5, -90.0, -180.0); ROBOT$MOVE(250.0, 8.0, 2.0, 0.5, -90.0, 0.0); ROBOT$MOVE(250.0, 8.0, 2.0, 1.5, -90.0, 0.0); ROBOT$MOVE(250.0, 8.0, 0.0, 1.5, -90.0, 90.0); ROBOT$OPEN_GRIPPER( 2.0 ); ROBOT$MOVE(250.0, 8.0, 0.0, 0.5, -90.0, -90.0); ROBOT$CLOSE_GRIPPER(); ROBOT$MOVE(250.0, 8.0, 0.0, 1.5, -90.0, 0.0); ROBOT$MOVE(250.0, 8.0, -2.0, 1.5, -90.0, 0.0); ROBOT$MOVE(250.0, 8.0, -2.0, 0.5, -90.0, 0.0); ROBOT$MOVE(250.0, 8.0, -3.0, 0.5, -90.0, 0.0); ROBOT$SPEAK("Razzle dazzle front to back."); sleep( 1 ); ROBOT$MOVE(250.0, 11.0, 0.0, 0.5, -90.0, -180.0); ROBOT$MOVE(250.0, 10.0, 0.0, 0.5, -90.0, 0.0); ROBOT$MOVE(250.0, 10.0, 0.0, 1.5, -90.0, 0.0); ROBOT$MOVE(250.0, 8.0, 0.0, 1.5, -90.0, 90.0); ROBOT$OPEN_GRIPPER( 2.0 ); ROBOT$MOVE(250.0, 8.0, 0.0, 0.5, -90.0, -90.0); ROBOT$CLOSE_GRIPPER(); ROBOT$MOVE(250.0, 8.0, 0.0, 1.5, -90.0, 0.0); ROBOT$MOVE(250.0, 6.0, 0.0, 1.5, -90.0, 0.0); ROBOT$MOVE(250.0, 6.0, 0.0, 0.5, -90.0, 0.0); ROBOT$MOVE(250.0, 5.0, 0.0, 0.5, -90.0, 0.0); ROBOT$SPEAK("Touch the corners and."); sleep( 1 ); ROBOT$MOVE(250.0, 0.0, -10.0, 0.5, -90.0, 0.0); ROBOT$MOVE(250.0, 0.0, 10.0, 20.0, 90.0, 0.0); ROBOT$MOVE(250.0, 0.0, 10.0, 0.5, -90.0, 0.0); ROBOT$MOVE(250.0, 0.0, -10.0, 20.0, 90.0, 0.0); ROBOT$SPEAK("Now we are done."); sleep( 1 ); ROBOT$MOVE(250.0, 15.0, 0.0, 13.0, 0.0, 0.0); ROBOT$HOME(); ROBOT$SPEAK("Whew. I need some Kool Aid."); }