1
00:00:00,090 --> 00:00:06,780
I hope that you have enough information about a positive trajectory until now, we analyze in detail

2
00:00:06,780 --> 00:00:10,260
how we can calculate the trajectory for single joint.

3
00:00:10,950 --> 00:00:17,460
But we know that robot arms don't consist of one joint, but instead of instead more than one joint.

4
00:00:18,000 --> 00:00:19,680
So what will happen in this case?

5
00:00:20,040 --> 00:00:21,930
Do we have to find new equations?

6
00:00:22,140 --> 00:00:22,890
Surely not.

7
00:00:23,370 --> 00:00:27,540
What we want is only what we want.

8
00:00:27,540 --> 00:00:34,440
Only is all the joints to start at the same time and finish at the same time because otherwise it would

9
00:00:34,440 --> 00:00:35,580
be very odd.

10
00:00:36,180 --> 00:00:40,290
Just think it like that you want to take a glass of water in front of you.

11
00:00:40,590 --> 00:00:45,810
So you first move your shoulder after you have finished, you move your elbow.

12
00:00:46,080 --> 00:00:51,510
After you have finished, you move your wrist, then your fingers and so on.

13
00:00:51,840 --> 00:00:53,880
You don't do it like that in real life.

14
00:00:54,180 --> 00:00:58,560
Instead, you move all of them together in a synchronized way.

15
00:00:59,700 --> 00:01:00,040
Yeah.

16
00:01:00,060 --> 00:01:01,860
This is called synchronization.

17
00:01:01,890 --> 00:01:04,710
So we want synchronization between joints.

18
00:01:04,980 --> 00:01:06,690
How will we achieve that?

19
00:01:07,020 --> 00:01:09,570
It's very easy and logical indeed.

20
00:01:09,750 --> 00:01:14,160
Namely, we have to determine first the joint that will move the mosque.

21
00:01:14,460 --> 00:01:16,440
So has the largest displacement.

22
00:01:16,890 --> 00:01:18,690
Let's say this is the kids joint.

23
00:01:19,200 --> 00:01:26,340
Then we will co-create acceleration, time and execution time for that joint base on the given acceleration

24
00:01:26,340 --> 00:01:27,570
and velocity values.

25
00:01:28,260 --> 00:01:34,320
Then we will use these time parameters for the whole trajectory and calculate corresponding velocity

26
00:01:34,320 --> 00:01:38,820
and acceleration values for the other joints, except Keith one.

27
00:01:39,480 --> 00:01:46,650
In this way, all the trajectories will start and end at the same time, so they will be synchronized

28
00:01:47,190 --> 00:01:54,870
after we have obtained velocity, acceleration values and also acceleration time and execution time.

29
00:01:55,110 --> 00:01:59,340
We can calculate the trajectory very easily for each joint.

30
00:01:59,850 --> 00:02:03,450
Let's jump to the math club and see how it will be done.

31
00:02:03,570 --> 00:02:03,960
OK.

32
00:02:05,430 --> 00:02:12,920
Here is how we will apply trapezoidal trajectory in six degrees of freedom robotic manipulator.

33
00:02:13,440 --> 00:02:16,890
Um, OK.

34
00:02:17,460 --> 00:02:20,910
We will just think that it's six degrees of freedom, Robert.

35
00:02:20,930 --> 00:02:21,450
Apparently there.

36
00:02:21,450 --> 00:02:28,610
Indeed, I have taken the example as you are, as you can see, you are five robotic manipulator.

37
00:02:28,620 --> 00:02:31,080
This is from Peter Cook his library.

38
00:02:31,350 --> 00:02:31,770
OK.

39
00:02:32,820 --> 00:02:34,860
So we just import this model.

40
00:02:35,410 --> 00:02:42,420
Then we are sitting for maximal velocity and maximal acceleration for each of the giants time, then

41
00:02:42,420 --> 00:02:43,910
maximal velocity.

42
00:02:43,920 --> 00:02:46,100
I found it from Datasheet Mart.

43
00:02:47,130 --> 00:02:50,100
I myself assigned for maximal acceleration.

44
00:02:50,370 --> 00:02:52,110
Anyway, it's just an example.

45
00:02:52,770 --> 00:03:01,950
Let's assume that we are given with maximum velocity and maximum acceleration that our robot's actuators

46
00:03:01,950 --> 00:03:02,790
can output.

47
00:03:03,520 --> 00:03:05,440
This is the initial OK.

48
00:03:05,790 --> 00:03:08,190
We have made it equal to the Q.

49
00:03:08,190 --> 00:03:13,080
Is it because this cuz it comes from this, then we import the model.

50
00:03:13,080 --> 00:03:13,800
You are five.

51
00:03:14,040 --> 00:03:14,580
You will see.

52
00:03:14,610 --> 00:03:17,730
Yes, this is cuz it is for each of the joints and this is zero.

53
00:03:17,730 --> 00:03:20,100
So every joint starts from zero orientation.

54
00:03:20,100 --> 00:03:23,640
OK, get your zero angle and the final is q r.

55
00:03:23,760 --> 00:03:26,790
We want to reach this final position or orientation.

56
00:03:26,820 --> 00:03:27,210
OK.

57
00:03:28,560 --> 00:03:29,040
OK.

58
00:03:29,220 --> 00:03:37,200
What we have see there in the lesson, we have said that as we have more than one joint, we have to

59
00:03:37,200 --> 00:03:38,220
do a synchronization.

60
00:03:38,220 --> 00:03:40,470
What was the first step for synchronization?

61
00:03:40,800 --> 00:03:48,420
We have to find the maximal displacement, OK and the join with the maximal displacement, how we will

62
00:03:48,420 --> 00:03:48,870
do that.

63
00:03:49,170 --> 00:03:54,840
We first find the difference between the final position, find the orientation and the initial orientation,

64
00:03:54,840 --> 00:03:58,540
and we think it's absolutely because displacement is needed for us.

65
00:03:58,560 --> 00:03:59,050
OK.

66
00:03:59,730 --> 00:04:06,960
And then what we are doing, we find it's the maximum displacement in that displacement vector.

67
00:04:07,200 --> 00:04:09,030
OK, and tackles its index.

68
00:04:09,810 --> 00:04:17,910
Then what we are doing, we are doing synchronization v calculating acceleration time and time duration

69
00:04:17,910 --> 00:04:19,530
to execute the trajectory.

70
00:04:19,830 --> 00:04:23,290
We are calculating it for their maximal displacement.

71
00:04:23,310 --> 00:04:30,690
OK, as you can see, L Max, we have seen it in the presentation then after we have obtained T A. Acceleration

72
00:04:30,690 --> 00:04:36,870
time and execution time, we can apply these two for the whole trajectory sort.

73
00:04:37,080 --> 00:04:38,760
So for the whole other joints.

74
00:04:38,790 --> 00:04:39,270
OK.

75
00:04:39,660 --> 00:04:42,020
So what we are doing, we are first.

76
00:04:42,070 --> 00:04:43,320
So this is for sampling.

77
00:04:43,320 --> 00:04:48,620
No, because as you know, our trajectory trapezoidal trajectory consists of what?

78
00:04:48,630 --> 00:04:51,350
Three phases?

79
00:04:51,360 --> 00:04:51,720
Yes.

80
00:04:51,990 --> 00:04:52,890
Acceleration.

81
00:04:52,890 --> 00:04:54,780
Constant velocity deceleration.

82
00:04:55,140 --> 00:04:55,590
OK.

83
00:04:55,620 --> 00:04:57,660
And for each.

84
00:04:59,810 --> 00:05:07,100
For each phase, we take the time, for example, this is the time from zero to a for the first phase,

85
00:05:07,310 --> 00:05:13,280
from T to T minus to for the second phase from T minus T a two T for the third phase.

86
00:05:13,310 --> 00:05:13,700
OK.

87
00:05:14,060 --> 00:05:18,050
And then we are creating by six by.

88
00:05:19,400 --> 00:05:23,270
This is the sampling number of matrix.

89
00:05:23,840 --> 00:05:31,880
This is three dimensional Matrix Y because in each phase, OK, we will talk with four different people,

90
00:05:31,880 --> 00:05:37,400
use different formulation to calculate the Q and the same for velocity and the same for acceleration.

91
00:05:37,610 --> 00:05:41,270
This six is because we have six degrees of freedom, a robot manipulator.

92
00:05:41,270 --> 00:05:42,350
I mean, six joint.

93
00:05:42,350 --> 00:05:50,990
OK, so this matrix will have all these mattresses are three dimensional, so they have six rows and

94
00:05:50,990 --> 00:05:52,220
some called arms.

95
00:05:52,580 --> 00:05:54,810
But three of these, OK.

96
00:05:56,830 --> 00:05:59,420
I mean the dimension or does it axis also?

97
00:05:59,480 --> 00:05:59,830
OK?

98
00:06:00,320 --> 00:06:09,620
Three of these three or six by s and two Matrix City of six by S and the Q Matrix and three of six by

99
00:06:09,620 --> 00:06:12,680
S and D D Q Matrics acceleration matrix.

100
00:06:12,710 --> 00:06:16,040
Then we are doing for each phase.

101
00:06:16,070 --> 00:06:16,670
OK.

102
00:06:17,710 --> 00:06:24,590
What we are doing for each phase we are calculate and for each this is for each joint.

103
00:06:24,620 --> 00:06:24,980
OK.

104
00:06:25,730 --> 00:06:31,550
We are looping in each phase and in each phase.

105
00:06:31,550 --> 00:06:37,370
We calculate for all the joints what except the joint keys joint.

106
00:06:37,670 --> 00:06:43,220
Do you remember the one with the maximum maximum

107
00:06:45,530 --> 00:06:46,210
displacement?

108
00:06:46,220 --> 00:06:48,200
OK, except this what we are doing.

109
00:06:48,200 --> 00:06:54,050
We are calculating for the others the velocity and acceleration from their calculated T.

110
00:06:54,050 --> 00:06:55,880
A. A. From here.

111
00:06:55,910 --> 00:06:56,420
OK.

112
00:06:56,720 --> 00:07:02,990
And if it is phase one, we apply the formulation for phase one velocity and acceleration.

113
00:07:02,990 --> 00:07:04,880
We have seen this from the presentation.

114
00:07:04,880 --> 00:07:07,190
You can revise it.

115
00:07:07,790 --> 00:07:08,540
You can check it.

116
00:07:08,540 --> 00:07:16,370
Or for the second phase, if you remember, this was the, um uh, for the cure and for this velocity

117
00:07:16,370 --> 00:07:17,930
and for this acceleration.

118
00:07:17,930 --> 00:07:21,950
As you can see, the velocity is constant and acceleration is zero in the first phase.

119
00:07:22,220 --> 00:07:27,080
This is the acceleration, OK, because it's positive in this case, as you can see this variation because

120
00:07:27,080 --> 00:07:29,610
it's negative or constant deceleration.

121
00:07:29,630 --> 00:07:29,960
OK.

122
00:07:30,560 --> 00:07:34,670
And uh, for the doing, this is the joint.

123
00:07:34,670 --> 00:07:37,160
This is the case joint key for case joint.

124
00:07:38,090 --> 00:07:48,320
We assign in the velocity and, um, acceleration as maximum as maximum.

125
00:07:48,380 --> 00:07:51,860
And then in the first phase, we are doing calculation.

126
00:07:52,040 --> 00:07:52,490
OK.

127
00:07:52,730 --> 00:07:56,510
In the second phase, we are doing calculation and for the third phase.

128
00:07:56,700 --> 00:07:58,100
OK, I think this is easy.

129
00:07:59,940 --> 00:08:03,160
The important thing is how we have done the synchronization.

130
00:08:03,170 --> 00:08:10,310
As you can see, if you want a maximal displacement joint, if you calculated for it, from it to A..

131
00:08:10,550 --> 00:08:18,890
And we apply this to A. For all their joints except case joint OK, and find velocity and acceleration

132
00:08:18,890 --> 00:08:19,430
for them.

133
00:08:19,430 --> 00:08:26,210
And then what we have done, we calculated for maximal maximum acceleration for them and we have calculated

134
00:08:26,450 --> 00:08:27,740
the trajectory for them.

135
00:08:29,150 --> 00:08:29,510
OK.

136
00:08:30,830 --> 00:08:34,250
This is for concurrent creating the time vector.

137
00:08:34,250 --> 00:08:37,250
OK, let's do it in this way.

138
00:08:37,250 --> 00:08:38,750
So you can see first.

139
00:08:38,750 --> 00:08:40,070
Let's do that part.

140
00:08:40,570 --> 00:08:41,990
Uh, run on advanced.

141
00:08:42,020 --> 00:08:48,340
OK, let's if you run this again, if you run this, you will see.

142
00:08:48,920 --> 00:08:50,340
Indeed, I can do that.

143
00:08:50,360 --> 00:08:56,330
Let me just to evaluate in this way, in order to show you evaluate this section, this whole could,

144
00:08:56,330 --> 00:08:59,810
as you can see, what is the dimension of T?

145
00:08:59,810 --> 00:09:07,720
Let's let's see size of T size of T size of T is three by one end.

146
00:09:07,880 --> 00:09:08,200
Yeah.

147
00:09:08,540 --> 00:09:11,570
Well, what I want to do is I want to make it.

148
00:09:11,960 --> 00:09:15,720
I want to control the get all the time slices.

149
00:09:15,740 --> 00:09:21,710
OK, so our time thesis into one vector so we can plot all of them in one plot.

150
00:09:21,920 --> 00:09:27,810
So I want to make it, what, three thousand by one or one by three thousand?

151
00:09:27,830 --> 00:09:28,080
OK.

152
00:09:28,100 --> 00:09:30,920
And I'm doing it in this way first and transposing it.

153
00:09:31,220 --> 00:09:34,310
Then I'm doing to control communication.

154
00:09:35,720 --> 00:09:39,950
OK, let's run it again around the section, around this section also.

155
00:09:39,980 --> 00:09:40,340
OK.

156
00:09:40,550 --> 00:09:43,460
As you can see now, we can check the size of T.

157
00:09:44,510 --> 00:09:47,140
OK, as you can see one by three thousand.

158
00:09:47,150 --> 00:09:54,480
Yeah, then what we are doing this will make for us if this will make for us easier, uh, for plotting.

159
00:09:54,500 --> 00:09:59,690
OK, but then you are plotting the position velocity and.

160
00:09:59,950 --> 00:10:07,860
Acceleration for each axis, OK, for each of you will draw for old accesses, OK?

161
00:10:08,400 --> 00:10:12,420
Let's do this plotting around and advance.

162
00:10:12,450 --> 00:10:14,220
Okay.

163
00:10:14,490 --> 00:10:17,730
I think we have to see the plots, OK?

164
00:10:17,760 --> 00:10:19,740
As you can see, this is position plot.

165
00:10:20,910 --> 00:10:21,480
Yes.

166
00:10:21,750 --> 00:10:22,830
You can see that.

167
00:10:23,550 --> 00:10:29,160
First of all, let me show you that as you can see from Let Me Just We started from Q.

168
00:10:29,160 --> 00:10:33,600
Is it OK you initial was this one from zero zero zero zero?

169
00:10:33,610 --> 00:10:35,130
What the hell is that?

170
00:10:35,910 --> 00:10:38,130
Why does I dad queue initial?

171
00:10:38,250 --> 00:10:41,750
Is he OK?

172
00:10:41,760 --> 00:10:42,870
Excuse me, it's cute.

173
00:10:42,900 --> 00:10:44,100
I yeah.

174
00:10:44,130 --> 00:10:46,530
Four Q Initial what we have done.

175
00:10:47,070 --> 00:10:47,910
Q Zero.

176
00:10:48,000 --> 00:10:49,950
Oh yeah, it's Q zero.

177
00:10:51,090 --> 00:10:52,950
We will start from this configuration.

178
00:10:53,310 --> 00:11:00,060
And Q R, as you can see on the first and fifth joint, are moving.

179
00:11:00,060 --> 00:11:03,420
So that's why only we can see a position in first and fifth.

180
00:11:03,420 --> 00:11:06,180
Um, excuse me, first and fifth.

181
00:11:07,740 --> 00:11:08,360
Yeah.

182
00:11:08,370 --> 00:11:10,020
Which one was three point?

183
00:11:10,020 --> 00:11:12,170
OK, then this is the first one.

184
00:11:12,180 --> 00:11:14,920
This is the fifth one fifth.

185
00:11:14,940 --> 00:11:17,200
Stewart and all others are zero.

186
00:11:17,250 --> 00:11:18,630
As expected, OK?

187
00:11:18,870 --> 00:11:21,090
You can see the trapezoidal trajectory.

188
00:11:21,090 --> 00:11:24,570
You can see blends, OK?

189
00:11:24,780 --> 00:11:27,910
And you can see a linear segment and you can see deceleration.

190
00:11:27,930 --> 00:11:28,890
That's perfect.

191
00:11:29,280 --> 00:11:30,300
Then let's see it.

192
00:11:30,330 --> 00:11:35,460
As you can see, this is totally the trapezoidal velocity profile.

193
00:11:35,700 --> 00:11:37,460
You can see a linear segment.

194
00:11:37,470 --> 00:11:41,970
Excuse me, you can see, yeah, linear function.

195
00:11:41,970 --> 00:11:45,670
This is constant function and this is the deceleration phase.

196
00:11:45,690 --> 00:11:46,110
OK.

197
00:11:46,860 --> 00:11:49,920
And you can see the beautiful acceleration.

198
00:11:49,920 --> 00:11:57,450
Yeah, this is just because as as you can see, as you can see here, the synchronization, all of the

199
00:11:57,660 --> 00:12:01,930
acceleration time is the same for both of the joints.

200
00:12:01,930 --> 00:12:09,030
So for the first one and the fifth one, the same is deceleration phase as you can see as T A and T

201
00:12:09,300 --> 00:12:12,630
I mean s acceleration time and deceleration time are the same.

202
00:12:13,140 --> 00:12:14,850
The figures are symmetric.

203
00:12:14,920 --> 00:12:22,470
OK, and as you can see, the acceleration profile is discontinuous, which is not desired too much.

204
00:12:22,470 --> 00:12:26,100
But for that simple trajectory, we can accept it.
