1
00:00:00,480 --> 00:00:01,920
The third section of this course.

2
00:00:02,250 --> 00:00:09,660
In this section, we are going to be dealing with real time things, meaning we are going to first interact

3
00:00:09,660 --> 00:00:13,890
with the software that is visible and without any delay.

4
00:00:13,890 --> 00:00:14,790
Let's get into it.

5
00:00:15,120 --> 00:00:23,880
I am going to create a new launch file and name it to be gazebo dot launch start by its contents are

6
00:00:23,880 --> 00:00:24,720
already copied.

7
00:00:24,720 --> 00:00:27,360
So I would just paste it and I will explain.

8
00:00:27,360 --> 00:00:29,010
What is it containing?

9
00:00:31,350 --> 00:00:36,900
A lot of import libraries and these two are the previous launch Wild Things.

10
00:00:37,020 --> 00:00:41,670
The new things are from this point to this point.

11
00:00:42,940 --> 00:00:51,290
Oh, because he was basically just a software and gazebo and Ross needs to talk to each other with some

12
00:00:51,290 --> 00:00:52,190
sort of API.

13
00:00:52,760 --> 00:01:01,320
And Gazebo also provides a service that requires a call and it brings a robot from a USDA to a gazebos

14
00:01:01,330 --> 00:01:02,780
into gazebo simulation.

15
00:01:03,250 --> 00:01:04,160
These two things.

16
00:01:04,160 --> 00:01:09,560
First, Gazebo needs to talk to ROS, which is very important for us.

17
00:01:09,860 --> 00:01:11,840
It can automatically.

18
00:01:11,840 --> 00:01:13,340
It can without the.

19
00:01:14,370 --> 00:01:15,090
It can.

20
00:01:16,740 --> 00:01:25,650
It can bring a robot into its simulation, but without any Ross interference, without any Ross communication

21
00:01:25,650 --> 00:01:25,980
stuff.

22
00:01:26,160 --> 00:01:28,770
And we don't we don't need to do that.

23
00:01:29,900 --> 00:01:31,130
We don't need that.

24
00:01:31,520 --> 00:01:34,330
So first thing is execute command.

25
00:01:35,440 --> 00:01:36,450
Execute process.

26
00:01:36,460 --> 00:01:42,790
This is basically straight away a command which can be written in a terminal and it is just executing.

27
00:01:42,790 --> 00:01:48,010
If you write this command in the terminal, it is the same is equal minuses.

28
00:01:48,610 --> 00:01:49,440
Live busy for us.

29
00:01:49,480 --> 00:01:54,040
It's not calling any function or any node or any launch file.

30
00:01:54,040 --> 00:01:55,420
It is just a simple command.

31
00:01:56,170 --> 00:02:04,300
It is going to call this live legacy factory that will enable us to make visible and communicate with

32
00:02:04,300 --> 00:02:04,840
each other.

33
00:02:04,870 --> 00:02:15,530
Okay, then there is a next package which makes us able to spawn the robot invisible using rice stream

34
00:02:15,530 --> 00:02:20,170
for cooking, and that requires the name of the robot and the fight.

35
00:02:20,590 --> 00:02:20,960
Okay.

36
00:02:21,220 --> 00:02:28,730
This file is automatically being provided by this bot that we give it to that you you.

37
00:02:28,830 --> 00:02:37,150
If I think we did the same that yes, in our resort launch file we provided exact path to share package

38
00:02:37,750 --> 00:02:44,640
share shareholder of the package to launch files for to these join state publishing and go forward state.

39
00:02:44,950 --> 00:02:51,250
Similarly, we are going to provide that you are but in this you fold it to the spawn entity so it can

40
00:02:51,250 --> 00:02:52,780
spawn the robot in gazebo.

41
00:02:53,140 --> 00:03:01,780
And that's what the basic solution looks like, bringing the robot into gazebo right now let's perform.

42
00:03:03,690 --> 00:03:11,370
The execution of I'll close all the gazebo servers available that we're already running across to our

43
00:03:11,370 --> 00:03:17,370
before that we need to perform all can build a new gazebo that launched or firefly has been created

44
00:03:17,370 --> 00:03:21,270
in the launch folder so it needs to be copied into the shared folder.

45
00:03:21,630 --> 00:03:25,500
Rose to launch Baseboard Gazebo.

46
00:03:26,520 --> 00:03:27,480
Launched by.

47
00:03:27,510 --> 00:03:28,440
Let's take a look.

48
00:03:28,710 --> 00:03:30,180
It is going to be a little funny.

49
00:03:31,400 --> 00:03:35,120
It's sponsored and brings the robot in gazebo simulation.

50
00:03:35,130 --> 00:03:36,890
And here we have our robot.

51
00:03:37,520 --> 00:03:38,120
Whoa.

52
00:03:38,660 --> 00:03:46,910
It is flying in the simulation, although was the simulation to take a look onto the robot.

53
00:03:47,330 --> 00:03:48,530
What is the problem here?

54
00:03:51,490 --> 00:03:52,850
I have a neighbor.

55
00:03:53,790 --> 00:04:01,710
Inertia from this view drop down and we can see there are a lot of lines, but no inertia boxes being

56
00:04:01,710 --> 00:04:02,370
represented.

57
00:04:02,370 --> 00:04:03,390
Oh.

58
00:04:04,380 --> 00:04:08,100
You know, Showbox is being applied on to these bodies.

59
00:04:08,100 --> 00:04:09,620
Let's zoom out and.

60
00:04:09,650 --> 00:04:10,380
Oh, my God.

61
00:04:11,970 --> 00:04:19,920
You see, this is the size of the mesh and the inertia for this mesh is this much bigger.

62
00:04:21,050 --> 00:04:22,640
And this is a huge problem.

63
00:04:22,820 --> 00:04:24,950
They actually forces are applied on the road.

64
00:04:24,950 --> 00:04:29,870
And for this reason, this robot is behaving in such a manner.

65
00:04:30,230 --> 00:04:33,560
The base inertia box is very small.

66
00:04:33,560 --> 00:04:36,230
The wheels and the caster inertia is huge.

67
00:04:36,530 --> 00:04:37,760
We have to fix that.

68
00:04:38,120 --> 00:04:45,410
And I'll show you the simplified form in which the robot does not floats in the air or acts weirdly.

69
00:04:45,890 --> 00:04:49,940
So let me unpause the simulation and let's see what it looks like.

70
00:04:50,590 --> 00:04:51,230
Okay.

71
00:04:52,480 --> 00:04:53,790
It is spinning very fast.

72
00:04:53,800 --> 00:04:59,650
If we disable inertia and see the robot and it is going away just like a ball.

73
00:05:00,170 --> 00:05:00,700
Whoa.

74
00:05:01,790 --> 00:05:03,950
And I have lost it all.

75
00:05:03,980 --> 00:05:05,720
It is going so.

76
00:05:06,820 --> 00:05:09,550
We have some serious problems in our.

77
00:05:11,160 --> 00:05:12,000
You are fine.

78
00:05:12,300 --> 00:05:13,450
We have to fix them.

79
00:05:13,470 --> 00:05:15,770
Okay, let's get to the audio file.

80
00:05:16,320 --> 00:05:19,710
And I have removed the bass frame.

81
00:05:20,040 --> 00:05:20,490
Wow.

82
00:05:21,960 --> 00:05:23,930
Let's start with the first link.

83
00:05:25,700 --> 00:05:27,020
In inertial values.

84
00:05:27,020 --> 00:05:29,450
There are some inertial values randomly given.

85
00:05:29,660 --> 00:05:32,180
Let's not come to the initial value directly.

86
00:05:32,480 --> 00:05:37,670
First, we will take a look into the collision properties which are again, very important.

87
00:05:38,240 --> 00:05:39,740
Now collision properties.

88
00:05:41,000 --> 00:05:44,660
Should be exactly the same as the visual geometric.

89
00:05:44,660 --> 00:05:50,090
In visual geometry, we are providing a mesh and in collision we are providing a box.

90
00:05:50,630 --> 00:05:52,280
So they are very different.

91
00:05:52,290 --> 00:05:57,980
Now I am providing collision for visual and collision same geometries.

92
00:05:57,990 --> 00:06:01,610
Okay, let's check the other things again.

93
00:06:02,240 --> 00:06:04,940
Mesh is provided in visual and in collision.

94
00:06:04,940 --> 00:06:05,960
This is provided.

95
00:06:06,140 --> 00:06:10,780
I'm showing you this for only one reason so you can debug your idea.

96
00:06:10,780 --> 00:06:11,600
ADF issues as well.

97
00:06:11,900 --> 00:06:20,300
I've created many, many, many many you ideas but many of the time in initial stages I was not clear

98
00:06:20,300 --> 00:06:21,440
why this is happening.

99
00:06:21,440 --> 00:06:25,850
So first we will solve the collision issues, visual and collision tags.

100
00:06:25,850 --> 00:06:26,800
Geometry should be same.

101
00:06:26,810 --> 00:06:31,340
Let's take a look on its output as it affects the simulation or not.

102
00:06:33,590 --> 00:06:34,010
Okay.

103
00:06:34,010 --> 00:06:34,580
Logic.

104
00:06:35,890 --> 00:06:39,550
And I think I should keep my mouth on the pause button.

105
00:06:40,600 --> 00:06:45,960
And still we have some serious problems with our robot, if I can posit.

106
00:06:45,970 --> 00:06:46,670
Whoa.

107
00:06:47,470 --> 00:06:50,740
Okay, so are you are if is not ready right now.

108
00:06:51,010 --> 00:06:54,280
So as we have seen, collision properties are safe.

109
00:06:54,430 --> 00:06:57,400
Visual properties are safe, but our robot is not sick.

110
00:06:57,880 --> 00:07:01,780
We need to fix the main thing that is inertial matrix.

111
00:07:02,050 --> 00:07:07,120
And in the next video we are going to see how we are going to utilize MATLAB to solve this problem.
