This script is responsible for getting 3D data from the Kinect, where we have used the MATLAB interface for Kinect 2.0 by Terven Juan and Cordova-Esparza Diana. After we have gotten the 3D coordinates we have used the inverse kinematics and Newton's method to find the rotational angles required for the robot. Then we output the rotational angles via serial to the Arduino and wait for a finish flag from the Arduino when it has finished moving the motors to its position.
We are transferring 7 bytes of information to the Arudino, first three are for the angles, and the next three are for the directions and the last byte is for the hand state.
David Yu (2020). MATLAB AND SIMULINK HARDWARE CHALLENGE: Robot arm MatLab files (https://www.mathworks.com/matlabcentral/fileexchange/58371-matlab-and-simulink-hardware-challenge-robot-arm-matlab-files), MATLAB Central File Exchange. Retrieved .
Nothing is updated
Inspired by: Kinect 2 Interface for Matlab