1
00:00:00,780 --> 00:00:05,670
In this lecture, we'll be installing and configuring our code editor, which we'll be using throughout

2
00:00:05,670 --> 00:00:06,720
this course.

3
00:00:06,750 --> 00:00:13,200
Now, keep in mind you can choose any code editor or ID you want to use, but my lectures will be recorded

4
00:00:13,200 --> 00:00:15,240
using Visual Studio Code.

5
00:00:15,570 --> 00:00:20,820
Now, in the past I've actually preferred code editor such as Atom or Sublime Text, but in the last

6
00:00:20,820 --> 00:00:26,220
couple of years, Microsoft has put a lot of work into Vee's code and the extensions they put out,

7
00:00:26,220 --> 00:00:29,190
which I really enjoy, especially for ROS development.

8
00:00:29,400 --> 00:00:34,470
So let's go ahead and install VS code onto our machine so I can show you the features that I'm talking

9
00:00:34,470 --> 00:00:35,010
about.

10
00:00:36,180 --> 00:00:39,820
So there are many ways to install vs code on Ubuntu.

11
00:00:39,840 --> 00:00:44,510
One of the easiest ways in my opinion is the snap store install of vs code.

12
00:00:44,520 --> 00:00:50,790
You can do this with the following terminal command, which is the same thing as going over to the Ubuntu

13
00:00:50,790 --> 00:00:51,720
Software center.

14
00:00:56,480 --> 00:00:58,790
And typing out Visual Studio code.

15
00:01:03,040 --> 00:01:04,090
And we see it here.

16
00:01:04,570 --> 00:01:10,750
So this command is the same thing as going to the software center and hitting install here in case you

17
00:01:10,750 --> 00:01:11,950
can put in your password.

18
00:01:14,230 --> 00:01:18,130
So this is one of the easiest ways to go about installing it and make sure that it stays up to date.

19
00:01:18,140 --> 00:01:23,740
We'll go ahead and clear this for now since we're installing it through the software center.

20
00:01:23,770 --> 00:01:24,130
All right.

21
00:01:24,130 --> 00:01:26,350
So it's gone ahead and installed and go ahead and close these.

22
00:01:26,650 --> 00:01:32,350
And if I head over to all apps and I type in Visual Studio Code, it will appear so we can go ahead

23
00:01:32,350 --> 00:01:33,310
and click on that.

24
00:01:33,760 --> 00:01:38,630
And I'll go ahead, right click on it and add it to my favorites so that it's easy to get to.

25
00:01:38,650 --> 00:01:40,900
Since we will be using this throughout the course.

26
00:01:42,520 --> 00:01:47,290
So here we are greeted with the welcome screen where you can configure things such as your editor theme,

27
00:01:47,290 --> 00:01:52,120
and if you plan on using VS code as your primary code editor for all your devices, I highly recommend

28
00:01:52,120 --> 00:01:58,180
linking your GitHub account to your VTS code so that whenever you set up your VTS code on different

29
00:01:58,180 --> 00:02:01,720
machines, all your settings will be set between computers.

30
00:02:01,930 --> 00:02:06,550
Now a hold off on that for right now so you can see how to get started from scratch.

31
00:02:06,550 --> 00:02:13,240
So I'll just go ahead and leave it as this default theme and I'll head over to the extensions tab,

32
00:02:13,240 --> 00:02:16,360
which is the one that kind of looks like a series of blocks.

33
00:02:16,840 --> 00:02:19,900
So here we can search for popular extensions.

34
00:02:19,900 --> 00:02:21,490
Since we're going to be coding in Python.

35
00:02:21,490 --> 00:02:27,220
I highly suggest getting the recommended Python extension here, which is by Microsoft.

36
00:02:27,220 --> 00:02:30,370
So to install it, all you have to do is hit install.

37
00:02:32,650 --> 00:02:33,040
All right.

38
00:02:33,040 --> 00:02:34,000
So let's go ahead and install it.

39
00:02:34,000 --> 00:02:38,080
And we're taken to these tabs, which have to do with getting started with Jupyter notebooks and the

40
00:02:38,080 --> 00:02:41,300
Python development environment within VS code.

41
00:02:41,320 --> 00:02:45,190
For now, we're going to ignore this, but feel free to go through them if you want to.

42
00:02:45,220 --> 00:02:46,960
So let's go ahead and close these tabs.

43
00:02:49,140 --> 00:02:51,390
And so here we see it's been installed.

44
00:02:51,390 --> 00:02:54,330
And if you ever want to configure it, you can always click on this gear icon.

45
00:02:54,330 --> 00:02:59,670
And here you can go to extension settings and configure it as you want, such as setting your desired

46
00:02:59,670 --> 00:03:01,940
path for things like CONDA environments.

47
00:03:01,950 --> 00:03:03,810
But right now we're not going to bother with that.

48
00:03:03,810 --> 00:03:05,820
So I'll go ahead and close this.

49
00:03:06,060 --> 00:03:10,560
Now you may also be interested in the C++ extension pack.

50
00:03:12,270 --> 00:03:13,830
And this comes with a series of tools.

51
00:03:13,830 --> 00:03:18,210
So it comes with a lender for C, slash C plus plus C, make tools.

52
00:03:19,750 --> 00:03:26,500
See slash C++ themes and this will be of use if you ever run into ROS packages which utilize C++ as

53
00:03:26,500 --> 00:03:32,050
well as when we're configuring our C make lists text file so I can go ahead and install this as well.

54
00:03:34,010 --> 00:03:35,480
Then last but not least.

55
00:03:35,480 --> 00:03:36,440
Well, let's installing.

56
00:03:36,440 --> 00:03:39,110
We can also look up the Ross extension.

57
00:03:41,340 --> 00:03:47,100
So this one is also by Microsoft, and this gives us a few extra tools to help us when we're developing

58
00:03:47,100 --> 00:03:48,210
our Ross code.

59
00:03:48,210 --> 00:03:52,860
And you can check out all the features here in the extension summary.

60
00:03:54,180 --> 00:03:57,240
And this extension works for both Ross one and Ross two.

61
00:03:57,270 --> 00:03:59,550
All you have to do is configure it as such.

62
00:03:59,550 --> 00:04:01,200
So we'll go ahead and hit install.

63
00:04:03,810 --> 00:04:04,080
Great.

64
00:04:04,080 --> 00:04:08,400
So that's gone ahead and installed and it's automatically detected that I have Ros too humble since

65
00:04:08,400 --> 00:04:09,570
we installed that earlier.

66
00:04:09,570 --> 00:04:14,670
But in case yours doesn't automatically detect that, simply head over to the extension settings.

67
00:04:14,760 --> 00:04:18,270
Now, if you ever needed to get here manually, you can simply head over to the gear icon, go over

68
00:04:18,270 --> 00:04:24,030
to settings and head over to the extensions tab, where you can then select your desired extension,

69
00:04:24,030 --> 00:04:24,930
which you want to edit.

70
00:04:24,930 --> 00:04:29,100
And here you can just select the Ross distro, which you want to be sourced.

71
00:04:29,100 --> 00:04:35,580
So in this case, if I just type in humble like so it'll go ahead and configure everything for me.

72
00:04:35,580 --> 00:04:38,070
So it automatically detected it since we have it installed.

73
00:04:38,070 --> 00:04:44,220
And all this does is automatically source your opt Ross humble setup bash file, which we've been doing

74
00:04:44,220 --> 00:04:46,350
in our batch RC file.

75
00:04:46,350 --> 00:04:50,910
If you ever wanted to use a different version such as Ross one, you could simply type in that particular

76
00:04:50,910 --> 00:04:51,900
version if you had it installed.

77
00:04:51,900 --> 00:04:53,460
So for instance, noetic.

78
00:04:55,800 --> 00:04:57,190
And here you see you can say could not source.

79
00:04:57,210 --> 00:05:02,910
Ross setup script opt Ross noetic setup dot bash because I don't have no edit currently installed on

80
00:05:02,910 --> 00:05:06,870
this machine so I'll just go ahead and change that back to the default, which was humble.

81
00:05:11,520 --> 00:05:14,790
And we see it's taken effect here in the lower sidebar.

82
00:05:15,270 --> 00:05:20,850
Last but not least, you may notice that my color scheme may be different from yours when going on with

83
00:05:20,850 --> 00:05:22,620
the future lectures.

84
00:05:22,710 --> 00:05:25,970
That's because I will have certain themes activated.

85
00:05:25,980 --> 00:05:28,790
This is purely for my personal preference.

86
00:05:28,800 --> 00:05:33,210
If you want to use the same themes that I will use throughout this course, head over to the gear icon.

87
00:05:33,630 --> 00:05:37,710
Head over to themes and then we can go over to Color Theme.

88
00:05:38,820 --> 00:05:41,580
And here I'll select Browse additional Color themes.

89
00:05:42,920 --> 00:05:47,420
And I will find community material theme darker higher contrast.

90
00:05:52,370 --> 00:05:55,090
So that'll go ahead and set my theme for me.

91
00:05:55,100 --> 00:06:00,650
Then I'll head over to the gear icon one more time, go back to themes, go to file icon theme.

92
00:06:01,950 --> 00:06:07,860
Then install additional file icon themes, which will open it up in the sidebar here and I will be using

93
00:06:07,860 --> 00:06:09,930
this material icon theme.

94
00:06:10,320 --> 00:06:15,990
So this just changes what the icons look like when we're viewing files here in the sidebar.

95
00:06:20,370 --> 00:06:20,820
All right.

96
00:06:20,820 --> 00:06:25,620
With that, you have successfully installed Visual Studio Code, which is the code editor I will be

97
00:06:25,620 --> 00:06:27,210
using throughout this course.

98
00:06:27,420 --> 00:06:30,930
As I said earlier, you are more than welcome to use your own code editor.

99
00:06:30,930 --> 00:06:36,690
But later on in this course, I'll be showing you how you can configure VS code to help us with our

100
00:06:36,690 --> 00:06:43,320
ROS development, such as automatically configuring our workspace, compiling our code and utilizing

101
00:06:43,320 --> 00:06:45,870
some of the other ROS extension features.
