Phase 7
Project completion |Week 13|
- Robotic Arm Calibration
 - Rejection test
 - OCS test
 - Validation
 - Final Demo
 
This is the third functional test of the OCS system excluding the object rejection system which is under test separately.
The intent of this test is to fine tune the Robotic Arm movement by calibrating the distance and angle from the object to the robotic arm. Calibration is done in Arduino IDE as shown in the code below.
Once, deep learning classification is completed, Matlab will send a signal to the robotic arm and the robotic arm will perform a pick and place operation. The following subroutine function will move the robotic arm servos to pick the water bottle and place it into the designated container. Different stages of the robotic arm movement can be calibrated by changing the value of the servo motors, M1 through M6.
// subroutine callmoveOne_Right_170_waterBottle ();// Subroutinevoid moveOne_Right_170_waterBottle (){  delay (3000);                       //(M1,  M2, M3,  M4,  M5,  M6, step delay)    BraccioRobot.moveToPosition(pos.set(90, 135,  0, 145, 178, 70), 30);  // Robotic Arm initial position  delay (2000);                          BraccioRobot.moveToPosition(pos.set(90, 45,  10, 135, 178, 10), 30); // object position  delay (2000);                         BraccioRobot.moveToPosition(pos.set(90, 45,  10, 135, 178, 50), 20); // Close Gripper  delay (2000);                         BraccioRobot.moveToPosition(pos.set(90, 65,  20, 135, 178, 50), 20); // lift  delay (2000);                         BraccioRobot.moveToPosition(pos.set(170, 65,  20, 135, 178, 50), 20); // rotate  delay (2000);                         BraccioRobot.moveToPosition(pos.set(170, 60,  5, 120, 180, 50), 20); // position for drop off  delay (2000);                         BraccioRobot.moveToPosition(pos.set(170, 60,  5, 120, 178, 10), 20); // drop  delay (2000);                         BraccioRobot.moveToPosition(pos.set(170, 65,  25, 155, 178, 10), 20); // clear  delay (2000);}Then call the "Home" subroutine to position the servos in safe position.
// calling the goHome subroutinedelay (50);goHome ();Pre-Demo Test