
Graphical User Interface (GUI)r
The GUI interface is designed to implement forward (FK) and inverse (IK) kinematics with ease. The parameters for FK could be entered via text boxes or scroll bar below the 'Plot Theta/Phi' push button. To implement IK, values are entered below the 'Plot XY' push button. To execute FK or IK after value entry, the 'Plot Theta/Phi' and 'Plot XY' buttons are pressed respectively. When values for FK are provided and executed the corresponding XY values would be displayed in the text entry boxes, likewise when XY values are enter for IK the corresponding forward kinematic values of Theta/Phi are calculated and displayed on the entry boxes.
The previous trajectory path are overwritten by new plots. Trajectories could also be manually cleared by 'Clear Plots' push button.
The GUI is design to display the trajectory path of the projectile in the 3rd person perspective behind the pingpong cannon. An background image of the pingpong cannon's testing environment is added to show relative accuracy of the trajectory prediction in a live setting. The Theta and Phi angle therefore correspond to the left/right and up/angles of the barrel aim respectively.
Before initializing the GUI, a background image file would have to be present in the MATLAB code execution coder with corresponding name as the image reader name. When MATLAB code is executed, the image should appear on the plot space area. In order to view the trajectory clearly especially under complex background image conditions, the image could be changed to gray scale or the lines of trajectory could be made thicker.
Note: There is both angle and XY value limitations due to the physical performance of the cannon's actuating servos and solenoid power. The hard limits of Theta/Phi angles are shown at the side of the scroll bars. If values outside the allowable values are entered, the values would be changed to the closest permissible value. The limit for XY values are scaled to 10.
No comments:
Post a Comment