Integrated Development Environment
Set up your IDE/workspace with helpful extensions.
Table of contents
Download IDE
Visual Studio Code is a great IDE where you can develop your code and edit many kinds of files. Download VS Code from here.
- If you have a Mac with an M1 chip, download the
.deb
file for ARM 64. - Otherwise, download the
.deb
file for 64 bit.
After downloading, at the bottom of your browser it might say “This type of file can harm your computer.” You should select “Keep”. Then go to your Downloads in your Files and right click on the file and select “Open with Software Install”. Then you should just install VS Code.
Alternatively, to install VS code in Terminal once you’ve downloaded the .deb
file, you can follow these steps:
- Go to the downloads folder:
cd ~/Downloads
- Then install VS code, replacing
<code.deb pkg>
with the name of the.deb
file you downloaded:sudo apt install ./<code.deb pkg>
- If you get a broken install error run:
sudo apt --fix-broken install
- Now run VS Code by either looking for it using the super (window/cmd) key or by opening a terminal and running
code
Important Extensions
We recommend you get the Python extension for VS code with this link. You can also search for the extension with the id: ms-python.python
in VS Code’s extension search bar.
There is also an extension for the Robot Operating System (ROS), a tool we will using often in this course. You can get it with this link.
This isn’t an extension but while you’re writing code, it’s helpful to enable auto save by going to File -> Auto Save
.
Fun Extensions
If you want to customize your IDE, check out the Material Theme. In VS Code, use this link to install the extension. Alternatively, you can search for the extension ID Equinusocio.vsc-material-theme
. Once installed, type Ctrl + Shift + P
and search for “Preferences: Color Theme”. You will then be able to choose from all the Material themes.
Another nice extension is the VS Code Icons. The extension ID is vscode-icons-team.vscode-icons
.
Important Packages
Don’t worry about installing Python 3. It should already be installed along with Ubuntu 20.04. You can check the version in Terminal with:
python3 --version
However, we do need to install pip, which is a package installer for Python:
sudo apt install python3-pip
Using pip, we will install a python library for the Tello:
pip install djitellopy
When installing djitellopy
, you may encounter the following error:
The error says we currently have numpy
version 1.17.4
, but because we have a later version of opencv-python
, we need at least version 1.19.3
for numpy
. So, we will reinstall numpy with the compatible version like so:
pip install numpy=1.19.3
We also need to install pep8:
pip install pep8