The Arduino is the control center for the servos; it oversees the smooth motion of the servos and serves a buffer to the angle-destination commands sent in by the Raspberry Pi. The Arduino handles speed control, angle offsets and balancing, and serial communication with the Pi. The Raspberry Pi, along with the HDMI 7” 800x480 Capacitive Touch LCD, serves as the Graphical User Interface (GUI) for control of the Robot Arm. The Pi’s programming is written in Python 3.2.4, and serves a plethora of function to convert from user input to angular serial output. It shows a top-down view of the Competition Area, with all scorable items, dice and goals, absolutely to scale where 1px = 6cm. The GUI allows the user to select two “B” slots in each egg carton and will automatically calculate the quickest path to attain the greatest amount of points through a Pythonic recursive algorithm, prioritizing matching goals and “B” slots, although shying away from corner “B”’s, which the Robot Arm can’t reach.
The path is calculated in Cartesian coordinates, with wrist and rotation angles, and is converted to radial and then angular coordinates for the servos through Inverse Kinematics, self-checked with Forward Kinematics and accounting for all variance in dimensions of the wrist movement, as well as sag experienced by straining the load-bearing spring by reaching far. The Pi will also attempt to “flick” the wrist in order to reach distant points otherwise unreachable. Completing these calculations, the Pi will automatically execute the series of commands, transmitting them to the Arduino to control the Robot Arm, which returns with feedback on expected position of the end effector of the Robot Arm, which is subsequently displayed on the screen through Forward Kinematics.
In the case of technical or mechanical failure, the user is able to skip parts of the sequence by hitting “Abort” or “Pause”, which will take them to the Manual Override screen pictured above from which they can continue their execution later. The Manual Override screen provides a touch-responsive GUI which allows the user to tap any point within the Competition Area on the screen to command the Robot Arm to move to that position through Inverse Kinematics, with options to control height, wrist, wrist rotation, gripper/vacuum activation and preset positions. ALL code, in both the Arduino and the Raspberry Pi Python program, was created by Amit. Every. Single. Line.
Positioning of the end effector, whether it be the gripper or the suction cup, is controlled by the base servo (1), shoulder servo (2), and elbow servo (3). The wrist servo (4) levels the end effector and switches between the two end effectors. The gripper rotation servo (5) rotates the gripper, as necessary. The gripper servo (6) and vacuum servo (7) are activated when picking up items from the Competition Area.
The plan of movement is subject to change during event, whereby the user may choose to interrupt the automatic execution to correct any errors.
Trial | Time | Score | Score Attained Automatically |
1 | 3:00 | 51 | 35 |
2 | 3:00 | 47 | 31 |
3 | 2:52 | 47 | 35 |
4 | 2:56 | 53 | 27 |
5 | 2:54 | 55 | 35 |
6 | 3:00 | 55 | 39 |
7 | 2:45 | 53 | 35 |
8 | 2:50 | 51 | 39 |
9 | 3:00 | 47 | 35 |
10 | 2:55 | 51 | 35 |
string s = "C++ is the best!";
s.Replace("++","#");
System.Console.WriteLine(s);