For all remote projects this semester we will be using ROS Noetic on a virtual machine (VM) running an instance of Ubuntu 20.04. You must complete Project 0A before starting Project 0B as you will be unable to begin work on Project 0B if your VM is not yet properly set up.

NOTE: Even if you created a VM during a previous offering of C106A, it is HIGHLY RECOMMENDED that you create a new VM by following the instructions in this document. We will be using newer versions of Ubuntu and ROS.

Table of Contents

Create Your Virtual Machine

A virtual machine allows you to take a small chunk of your computer's processing power and memory to emulate a separate machine, isolated from the rest of the processes on your computer. This new virtual machine can then be running any operating system and processes you want without interacting with the rest of your computer, allowing you to use ROS even if you don't have a Linux computer.

When you create a virtual machine, you can stop and start the same VM with the same files still saved on it, but be aware that if you delete a VM, you also delete any files you have saved on it. We highly recommend you use some sort of version control such as Github just in case you accidentally delete your VM (just make sure your repo is private!).

To create your virtual machine:

  1. Go to https://releases.ubuntu.com/20.04/ and download the 64-bit PC (AMD64) desktop image. You should now have a .iso file.

  2. Go to https://software.berkeley.edu/vmware and acquire a suitable version of VMWare using the Berkeley institutional license. For MacOS you can use VMWare Fusion 11.

  3. Install VMWare, and launch a new virtual machine from the .iso file you downloaded in step 1. You can use the "easy install" set up with the default settings. Boot the virtual machine and follow the set up instructions. Create a user account.

  4. Open up a terminal window in your VM (right click anywhere → Open Terminal) and in it run

    echo "export SVGA_VGPU10=0" >> ~/.profile
    
  5. Now shut down the virtual machine (shut down, not pause. Please be sure you are aware of the difference). Next we want to allocate an appropriate amount of RAM to the VM. With the machine shut down, from the menu go to Virtual Machine → Settings → Processors & Memory. Use the slider to allocate at least 5GB of RAM. On a 16GB machine, you should be able to easily allocate over 8GB, but 5GB should be sufficient for our purposes, and you should be able to allocate that much RAM even on 8GB systems. You will not be able to edit this if your VM is not shut down.

Option 1: Install Software and Packages with a Bash Script

The easiest way to install the necessary packages for our projects is with the bash script we provide. Start up your VM, log in, open up a terminal window, and run the commands below.

yes | sudo apt install git
cd
git clone <https://github.com/ucb-ee106/software_install.git>
cd ~/software_install
chmod +x .*
./ros_install.bash
source ~/.bashrc
./package_install.bash
source ~/.bashrc

If the bash script worked for you, you may skip the next section and move on to Check the Simulations.

Option 2: Install Software and Packages Manually

If the bash script did not work for you, install the necessary packages for our projects manually. Start up your VM, log in, and open up a terminal window.

Install ROS