Skip to content

Getting Started

EddieCTian edited this page Nov 17, 2020 · 22 revisions

Welcome to RSX Software Subteam! Here is a series of preliminary instructions in order to get set up to join the team. To summarize, you are expected to get Ubuntu 18.04 and then install and learn ROS. Detailed instructions are given below.

Getting Ubuntu

At RSX we use Ubuntu OS for all of our software projects. It's highly recommended that you dual boot your laptop to get Ubuntu alongside Windows for optimal speed and performance. Another option is to use a Virtual Machine, which is often recommended for Mac users. Here are the instructions depending on your laptops (select one of the following):

Dual Booting for Windows

In order to dual boot, you need to partition your laptop disk to free up space and then install the new operating system using a bootable USB. I know this might sound confusing to you but the following video has detailed instructions for all steps: https://www.youtube.com/watch?v=u5QyjHIYwTQ . There are also many written instructions available online such as https://itsfoss.com/install-ubuntu-dual-boot-mode-windows/ that you can find if you search up "Dual booting Ubuntu 18.04".

Getting it on VM for Mac

Using VM or virtual machine is a faster way to get ubuntu functionality on your laptop without the risk of wiping your hard drive. The downsides are that is can be slower than using dual booting your mac and Arduino/USB connections have to be passed through the virtual machine from your laptop to be used. First step is to download the virtual box application and the ubuntu disk image (18.04)

Virtual Box: https://www.virtualbox.org/wiki/Downloadshttps://www.virtualbox.org/wiki/Downloads Ubuntu: https://www.osboxes.org/ubuntu/

This will take a while to download. Note that the disk image file can be pretty big (1.4 GB). Next you will want to set up virtual box for ubuntu. When you've fully installed the app, click the new button and name it something like Ubuntu 18.04. Make sure the type is Linux and the version in 64 bit Ubuntu. Allocate 4096 MB for the RAM of this virtual machine. Click Continue and select use an existing virtual hard disk file by clicking on that option and then the little folder icon. The file you want is the Ubuntu file you downloaded initially. Make sure you have unzipped the file you downloaded and select the vdi file to be used (Named something like Ubuntu 18.04(64 bit).vdi). Click create.

Click on the Virtual machine that was created. It should run immediately. It will ask you to sign in using osboxes.org. The username is osboxes, the password is osboxes.org.

Dual Booting for Mac

Like Windows, you need to partition your laptop and install Ubuntu using a bootable USB. Make sure to back up your laptop before you proceed (back up instructions through Time Machine: https://support.apple.com/en-ca/HT201250). After you back up, follow the link to install Ubuntu: https://www.maketecheasier.com/install-dual-boot-ubuntu-mac/?amp

*If you cannot partition the disk and the ‘+’ option is grayed out with the error message “This container can’t be split, because the resulting containers would be too small”, check that automatic backup is disabled on Time Machine (System preference -> Time Machine -> uncheck “Back up automatically”)
*If your trackpad and keyboard do not work after installing Ubuntu, get a wired mouse, enable on-screen keyboard, and follow this: https://gist.github.com/roadrunner2/1289542a748d9a104e7baec6a92f9cd7 (for MacBook Pro)
*If you cannot connect to WiFi on Ubuntu due to “No wifi adapter found”, get ethernet adapter and follow this: https://www.youtube.com/watch?v=9YWCR0AlaJU
*Also allocate enough space for Ubuntu when partitioning - 20GB isn't quite enough, 40GB has worked.
*Do not use a corrupted USB when dual booting Ubuntu

ROS

ROS stands for Robot Operating System and is a middleware used in robotics. On our team, we use ROS Melodic distribution.

Installation

Once you have Ubuntu, install ROS on your computer following instructions on this page: http://wiki.ros.org/melodic/Installation/Ubuntu#Installation . Recommended installation is Desktop-Full.

Tutorials

Once installed, complete all Beginner Level tutorials on ROS webpage (don't worry about Intermediate Level tutorials!). The link is here: http://wiki.ros.org/ROS/Tutorials .

Other Recommended Installations

Once you have Ubuntu and ROS set up, you're ready to go! In addition, here are a couple programs that you might benefit from while working on our team.

Arduino IDE

We use Arduino on our rover and you might need the Arduino IDE in order to work on a couple of our projects. There are specific instructions on getting this IDE set up with ROS. Follow the instructions on this document: https://docs.google.com/document/d/1Jflc5y9HevGTLxkWB1UOCFADB2QL-QzW-l_LN6n3h10/edit?usp=sharing

Terminator

Using ROS means working with a million terminals open at all times (sad) but using terminator makes it all a lot more bearable! This program automatically organizes all open terminals and make navigating through multiple terminals very easy. Install by typing these commands in your terminal: sudo apt-get update sudo apt-get install terminator

Sublime Text

Although vim and gedit are nice, there are better text editors and Sublime is one of them. Follow the instructions at http://tipsonubuntu.com/2017/05/30/install-sublime-text-3-ubuntu-16-04-official-way/ in order to install this program. You can open your projects from the terminal with sublime text by typing subl

Sharing Folders Between the Host and Virtual Machines

Sometimes when working on Linux, you'll want to be able to access files on the host computer (Windows or Mac).

An easy way to do this is to enable shared folders in VirtualBox.

Follow this link for instructions on how to share folders between the host and virtual machine.

Note: Make sure to select "Make permanent" on the popup dialogue

After following those instructions, the shared folder should show up on the desktop in Ubuntu, and can be accessed in Terminal at /media/sf_(shared_folder_name).

At this point you'll be able to use the shared folders but you will have to enter your password every single time you want to use them. To permanently avoid this, type:

sudo usermod -aG vboxsf $(whoami)

into Terminal without any changes. You'll be prompted for your password once, and never again.

You can also create a symbolic link to this folder anywhere in your computer to make accessing the folder easier. Think of this as a shortcut in Windows.

To make this, navigate to the folder you want the link to be in, then type

ln -s /media/sf_(shared_folder_name) (name you want for your link)

Now you can access your shared folders from a location of your choosing.