-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexercise_1.m
50 lines (35 loc) · 816 Bytes
/
exercise_1.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
% Clean workspace
clear
clc
hold off
% Initial posture
L = 0.4; % [m]
q = deg2rad(80); % [rad]
phi = deg2rad(0); % [rad]
r = L./q;
x = compute_arc_points(q,r,phi);
% Draw arc
figure(1)
draw_arc(x,'c')
xlim([0 0.4])
ylim([0 0.3])
axis equal
% Write the mapping m(q) as a function
% m = TO FILL
for i = 1:15
dq = 0.1;
% Increment q
% q = TO FILL
% Get the PCC parameters to draw the arc corresponding to the current q
% (note : phi and q are known, only the radius is missing)
% r = TO FILL
% Compute points and draw
x = compute_arc_points(q,r,phi);
draw_arc(x,'r')
% Compute and draw the position of the tip of the arc given the mapping
% m(q)
% x_ee = [XX; XX];
scatter(x_ee(1),x_ee(2),'b','filled')
drawnow
pause(0.05)
end