The simulation allowed us to analyze the effectiveness of the space mouse control and gain more information about velocities/accelerations of the robot joints with increased feedback visibility in the system loop.
Space Mouse Incorporation
We wanted the simulation to be able to react and respond just like the real-life FANUC robot. Therefore, we needed to incorporate the space mouse into the simulation. With a MATLAB function that maps the user’s input movements of the space mouse to an output position, the simulated robot now can be controlled via the space mouse.
Robot Control and Animation
With the modeled robot, we were then able to incorporate the robot’s kinematics and dynamics equations into a feedback control loop that moved the robot to a desired position and plotted the resulting robot arm position.
This type of robot control is called Force Control, which differs from the typical Position Control that most robots utilize. Force control allows us to simulate the robot without knowing information about the joint torques – which we don’t have access to because they exist within the FANUC’s internal control system.
Tying it Together in MATLAB
Finally, both the robot control block diagram and the space mouse manipulation block diagram were run from an external MATLAB function that allowed the two to collect and output data at different times – much like what occurs with our real-life FANUC robot hand-guiding functionality.
See it in Action
The simulation operates by updating and moving the position of the end-effector based on space mouse movements supposedly every 1/3 of a second. However, even though the pause time was set to be 1/3 of a second, you can see that the robot moves slower than that. This is because of the sheer amount of math and data manipulation going on behind the scenes.
Note: With the help of the Peter Corke Robotics Toolbox for MATLAB, we were able to pull this off and change a lot of things about the robot’s parameters and variables. However, we were not able to change the name of the robot – hence why some of these screenshots label the robot as a ‘Puma 560.’