0% found this document useful (0 votes)
15 views2 pages

QArm - Lab 8 - Lab Procedure

Uploaded by

brendsriverasy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views2 pages

QArm - Lab 8 - Lab Procedure

Uploaded by

brendsriverasy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

QArm Lab Procedure

Singularity Avoidance

Setup
1. It is recommended that you run this lab individually.

2. Move the QArm manipulator to the home position and turn ON the unit using the power switch
located on the rear side of the base. Once powered, the manipulator should hold this position.

3. Launch MATLAB and browse to the working directory for Lab 8 – Singularity Avoidance.

Singularity Avoidance
1. Open the Simulink model SingularityAvoidance.slx (Figure 1).

2. Replace the cubic spline, forward kinematic and inverse kinematics, and differential kinematic
MATLAB functions in the Simulink model with the same functions that you developed in the previous
labs.

Figure 1 - Simulink model that implements a singularity avoidance algorithm using a finite state machine

3. Open the stateMachine MATLAB function. Using the Concept Review as a guide, complete the script
to implement the finite state machine shown in Figure 3. You are required to complete the State
Transition and State Action sections for states 1, 2, 3, and 4, namely assuming the appropriate values
to the following variables: next_state, phi_speed, and avoiding. Recall that the state machine
will determine if the target position (pT) falls within the singularity avoidance region; if it does an
alternative trajectory along the surface of the singularity avoidance cylinder is commanded to the
end-effector otherwise the original cubic spline trajectory (P) is commanded. In the function, by
setting the variable avoiding to 1, you will force the end effector to follow the perimeter of the
avoidance region, otherwise setting it to 0 commands the linear trajectory.

4. Once you have completed the state machine, open Model Properties and select the Callbacks tab.
Under InitFcn, set A to [0; 0.45; 0.3] and B to [ 0; −0.45; 0.3]. Comment all other A and B values using
the % symbol. This will command a spline trajectory with endpoints A and B along the Y axis. This

1
trajectory passes through the point [0; 0; 0.3], which is a singular point. What do you think will
happen as the arm approaches the singularity?

5. Back in the Simulink model, set the radius of the singularity avoidance cylinder by setting the
constant wired to the input port of the stateMachine script labeled R to a value of 0.25 m.

6. Build and deploy the model using the Monitor & Tune action button under the Hardware Tab of
your model.

7. Why does the manipulator seem to jump discontinuously when exiting the avoidance volume? Stop
the model, open the state machine and uncomment lines 51 to 53, which pause the linear trajectory
generator if it has arrived at the exit point while the physical manipulator hasn’t. Deploy the model
and comment on the difference.

8. When the model runs, the end-effector will initially move towards the first point. Then at each
sample time the state machine will determine if the end-effector should follow the original
commanded spline trajectory towards the other endpoint or follow the alternative trajectory along
the surface of the singularity avoidance cylinder. Take a moment to observe the desired,
commanded, and measured trajectories along the X, Y, and Z axes.

9. Stop the model.

10. Once again open Model Properties and select the Callbacks tab. Under InitFcn select the second set
of A and B points and repeat the previous step. What is different between this set of points and the
previous? Make note of your observations and take necessary screenshots of your results.

11. Repeat the previous step with the third set of A and B points. What is different between this set of
points and the first? Make note of your observations and take necessary screenshots of your results.

12. Repeat the previous step with the last set of A and B points. What is different between this set of
points and the first? Make note of your observations and take necessary screenshots of your results.

13. Stop the model.

14. While supporting the arm, turn OFF the manipulator using the power switch at the rear end of the
base of the manipulator, and then move it to the rest position.

You might also like