1
00:00:00,450 --> 00:00:07,710
In robotics, one of the most important features that everyone requires is we ordered the robot to go

2
00:00:07,710 --> 00:00:15,200
to a certain location and it X-Y to replayed meeting on the ground and the robot reaches that from that

3
00:00:15,240 --> 00:00:18,690
specific point on the ground that is known as go to goal.

4
00:00:18,900 --> 00:00:21,510
In this technique, there are two things.

5
00:00:21,600 --> 00:00:26,010
One is the distance and the second is the angle that we have to take it off.

6
00:00:26,880 --> 00:00:27,900
What do I mean by that?

7
00:00:27,900 --> 00:00:34,260
Let's understand it with a representation and then we will have a better understanding.

8
00:00:34,380 --> 00:00:43,680
Suppose we have this to display an x and y know when we have these coordinates and x and y we are in

9
00:00:43,680 --> 00:00:44,040
a 2D.

10
00:00:44,400 --> 00:00:44,700
Okay.

11
00:00:45,030 --> 00:00:48,330
And we are supposing that our robot was at Origin at first.

12
00:00:48,360 --> 00:00:54,030
Now we say that our robot is at this specific location.

13
00:00:55,140 --> 00:00:57,540
We can see at this specific location.

14
00:00:57,960 --> 00:00:58,290
Okay.

15
00:00:58,740 --> 00:01:00,270
And this is the middle point.

16
00:01:00,270 --> 00:01:03,780
We are not right now explaining the orientation of the robot.

17
00:01:03,780 --> 00:01:06,360
We are just finding the angle and the distance.

18
00:01:06,360 --> 00:01:15,150
And we will come back to the orientation point to according to the x y i robot is x one or two of x

19
00:01:15,150 --> 00:01:16,140
and one of why.

20
00:01:17,340 --> 00:01:17,700
Okay.

21
00:01:18,360 --> 00:01:24,990
The goal position that we want specifically is this specific position we want for our robot.

22
00:01:24,990 --> 00:01:26,430
This is the goal position.

23
00:01:26,880 --> 00:01:28,560
This is the initial position.

24
00:01:29,700 --> 00:01:33,200
Now goal position is three in X and three Y.

25
00:01:33,210 --> 00:01:40,890
We want the robot to move from initial position to goal position and that three three is our goal position.

26
00:01:41,490 --> 00:01:44,970
What is the process of making the robot go to that specific point?

27
00:01:45,510 --> 00:01:46,620
That's the main question.

28
00:01:46,980 --> 00:01:54,600
Coming to the answer is, first, we need to calculate the distance between these two points that is

29
00:01:54,600 --> 00:01:59,820
applied to this formula, which is known as including distance.

30
00:01:59,910 --> 00:02:01,470
You can Google about it.

31
00:02:01,470 --> 00:02:04,140
It's really interesting, including distance.

32
00:02:04,650 --> 00:02:12,280
And I think we should first calculate that due to distance online, I have all opened up the would be

33
00:02:12,310 --> 00:02:22,200
calculated match distance can that distance that's the other only calculator is the the page that is

34
00:02:22,200 --> 00:02:23,640
providing us this facility.

35
00:02:23,640 --> 00:02:32,520
So the first point is two of X and one of Y three affects entry of right is the second one.

36
00:02:33,390 --> 00:02:41,430
So in our specific example, the distance is equal to a distance, one that we are calculating is

37
00:02:43,620 --> 00:02:44,840
2.23.

38
00:02:45,300 --> 00:02:48,330
And what's the angle for our first reading?

39
00:02:49,440 --> 00:02:54,480
Because we are now applying the angle formula as well to calculate the angle.

40
00:02:54,480 --> 00:03:02,880
We just you know, we can see and find that we need to apply y2 minus y one in our case y2 three minus

41
00:03:02,880 --> 00:03:11,520
y1 one is equal to two, so that becomes two and for x it becomes three minus two, one, three by one

42
00:03:11,820 --> 00:03:29,100
and arch ten or tangent inverse of three that is going to be one of 71.56, 71.56 and in radians it

43
00:03:29,100 --> 00:03:30,390
becomes 1.24.

44
00:03:30,390 --> 00:03:39,090
So our robot what this is actually represent if I draw the axis here a robot is saying that the angle

45
00:03:39,090 --> 00:03:48,060
to this goal keeping the X on the horizontal axis and Y on the vertical axis and putting the robot on

46
00:03:48,060 --> 00:03:59,880
the origin, it makes an angle of 71.56 and if we visually see it, it is convincing that this calculation

47
00:03:59,880 --> 00:04:00,390
is correct.

48
00:04:00,690 --> 00:04:06,480
So when we want to calculate the distance, so when we want to make the robot go to the distance, you

49
00:04:06,480 --> 00:04:08,490
first calculate the distance and the angle to it.

50
00:04:08,490 --> 00:04:11,100
Then we apply some control algorithms to make it move.

51
00:04:11,700 --> 00:04:13,320
Let's do one more example.

52
00:04:13,320 --> 00:04:20,670
In this specific case, it is now one in X and three in Y, and this is going to number two.

53
00:04:20,700 --> 00:04:24,600
Now, this is the goal and we are saying that initial position is still the same.

54
00:04:25,620 --> 00:04:31,590
So what is going to be the distance and the angle let's compute?

55
00:04:32,490 --> 00:04:39,660
In our case, we are now at a point that let me compute the distance first to it, going to the initial

56
00:04:39,660 --> 00:04:40,980
position and

57
00:04:43,590 --> 00:04:49,920
the now second position for the X is one and for Y is three.

58
00:04:49,920 --> 00:04:50,310
Okay.

59
00:04:50,730 --> 00:04:56,130
It is saying the distance is again 2.236.

60
00:04:57,060 --> 00:04:57,690
Fair enough.

61
00:04:58,260 --> 00:04:59,870
Because visually you can.

62
00:05:00,140 --> 00:05:04,040
The nation is in the middle, 2.3 on this side, 2.3 on this side.

63
00:05:05,240 --> 00:05:12,650
Coming to the angle thing, what is going to be the angle for why to make this vibrant?

64
00:05:13,250 --> 00:05:16,280
Why is actually why two is three.

65
00:05:16,520 --> 00:05:19,720
So three minus one, it becomes two.

66
00:05:20,420 --> 00:05:21,390
And why one?

67
00:05:22,250 --> 00:05:27,500
And for the x part, it is one minus two, which is minus one.

68
00:05:27,980 --> 00:05:32,330
So argent of minus one is required.

69
00:05:33,020 --> 00:05:36,290
Our tangent of minus one is the required calculation we want.

70
00:05:36,290 --> 00:05:41,240
So are tangent minus three minus two.

71
00:05:42,020 --> 00:05:49,010
Let's calculate and it is saying you need to apply -63 degrees.

72
00:05:49,880 --> 00:05:54,770
This is making -63 degrees with this specific goal.

73
00:05:54,780 --> 00:05:55,220
Number two.

74
00:05:55,790 --> 00:05:57,310
My calculation can go wrong.

75
00:05:57,320 --> 00:05:58,650
I've made some mistakes.

76
00:05:59,210 --> 00:06:02,840
But the point is, this is how you calculate distance and angle.

77
00:06:03,050 --> 00:06:03,440
Okay?

78
00:06:04,400 --> 00:06:10,320
And when we talk about the distance and angle, the next thing that we need to do in general specific

79
00:06:10,370 --> 00:06:19,250
is of for the linear of X, the command velocity, linear x is going to be given the distance, the

80
00:06:19,250 --> 00:06:27,230
distance that we have calculated from one point to the goal point and Angular Z is going to be the angle.

81
00:06:28,340 --> 00:06:34,550
That's what it is going to be simple, but we have to apply some major conditions to keep in mind that

82
00:06:34,850 --> 00:06:37,130
if it is negative, what is the initial point?

83
00:06:37,310 --> 00:06:44,480
Because we were just assuming the initial point is at Origin for for first example, in reality that's

84
00:06:44,480 --> 00:06:47,360
not the case and we have to take care of a lot of things.

85
00:06:47,750 --> 00:06:55,550
And you'll see in the court that there are a lot of things to think about and we will solve it in a

86
00:06:55,550 --> 00:06:56,810
very simple manner.
