-
Notifications
You must be signed in to change notification settings - Fork 12
Virtual Machine Setup
The instructions on this page assume you will use Oracle VM VirtualBox with a Ubuntu 14.04 operating system image. If you follow this guide, you should have a VirtualBox image with all the required software to do ROS development for our robot systems.
You can use some other virtualization software, as long as it works with the same version of Ubuntu that we're using.
The same instructions also apply if you're installing Ubuntu directly on your hardware, starting from Step 2: Installing Ubuntu
A pre-prepared version of this image can be downloaded directly from the lab's shared folder.
Important: This guide is provided with absolutely no guarantees; follow it at your own responsibility. Although we have done our best efforts to make sure the information in here is as complete, accurate, and up-to-date as possible, we do not claim that it is. By following this guide, you agree that you are doing so at your own risk, and assume full responsibility for any possible outcome.
- Download and install Oracle VM VritualBox
- You may also need the Virtual box extension pack for additional features such as usb support.
- Download the Ubuntu 14.04.3 LTS Desktop 64-bit image
Start VirtualBox, then click "New" on the toolbar to create a new virtual machine.
You can name the virtual machine anything you like; for this guide we will name it "Ubuntu 14.04 ROS". Select "Linux" for Type, and "Ubuntu (64-bit)" for Version. Click "Next".
For memory size, you will likely need at least 4 GB (4096 MB) to be able to run ROS comfortably. If your computer has 10 GB or more of RAM, you might like to increase that limit to 5 or 6 GB, depending on your usage. If your computer has less than 8 GB of RAM, you can try using less than 4 GB memory, although the virtual machine performance might be a little slow.
We will go with 4 GB for this guide. Click "Next" after specifying memory size.
When asked about the hard drive, select "Create a virtual hard drive now" and click "Create".
For hard drive file type, keep "VDI (VirtualBox Disk Image)" selected and click "Next".
For storage on physical hard drive, keep the section on "Dynamically allocated" and click "Next".
For file location and size, keep the default location selected, and pick 64 GB for the virtual hard drive size. Click "Create" to finish creating the virtual machine.
In VirtualBox, start the virtual machine that you created in the previous step. When asked for a startup disk to use, browse for the Ubuntu installation image that you downloaded earlier.
Once the virtual machine starts up, you will get a welcome screen with an option to "Try Ubuntu" or "Install Ubuntu". Select "Install Ubuntu".
Click "Continue" on the "Preparing to install Ubuntu" screen.
For "Installation type", leave "Erase disk and install Ubuntu" selected, and everything else unchecked. Click "Install Now". You will get a confirmation message; click "Continue".
When asked to select the timezone, you will typically want to select Chicago (which represents Central time). However, this should only affect the time display in your system anyway. Click "Continue" after you've selected the appropriate timezone.
Leave the default Keyboard layout selection of "English (US)" and click "Continue".
On the next screen, you are asked for your name and login information. For this guide, we will use "Ubuntu ROS" as the name, "ubuntu" as the username, and "opencv" as the password (without the quotes). You can (and probably should) use different values for your own installation.
We will also select "Log in automatically" to skip the login screen, but you might prefer not to do that for your own setup.
When you are done specifying this information, click "Continue" to start the installation procedure.
When installation is done, you will get a dialog asking you to restart to begin using the new installation. Click "Restart Now" and wait for the virtual machine to restart.
Once Ubuntu starts up in the virtual machine, you'll notice that the screen is too small. To fix that, you need to install the VirtualBox Guest Additions. In the VirtualBox window (outside the virtual machine), go to the "Devices" menu and select "Insert Guest Additions CD Image...".
This will give you a message in Ubuntu asking whether you want to allow the installation disc to run. Select "Run" and type your password to allow this administrative action. The Guest Additions installation should now start, and you will see some messages, and when it's done it will print the message "Press Return to close this window...". Press Return and restart Ubuntu one more time.
To restart Ubuntu, go to the top-right corner of the virtual machine screen, click the gear icon there, and select "Shut down..." then select the "Restart" icon on the left side of the window that appears.
When Ubuntu restarts, your virtual machine should be resizing to fill the entire window now, and you can proceed to the next step.
A great tutorial for installing ROS on Ubuntu can be found here: ROS Installation. It is suggested that you install the desktop-full version as this includes a lot of the extra packages that you will likely use in the future however if disk space is a constraint it is possible to install these packages later by hand.
This repository is currently using the LTS distribution of ROS known as ROS indigo. Please ensure that any documentation you use or follow applies to ROS indigo and also ensure that when installing new packages they are for ROS indigo (e.g. sudo apt-get install ros-indigo-joy).
Press Ctrl+Alt+T in Ubuntu to open a terminal. This will start the terminal in your home directory.
If you haven't already done so, create a directory called "workspace" under your home directory by using the command "mkdir workspace". Go into the workspace directory by using the command "cd workspace".
In your workspace directory, use the git clone command to clone the git repository that contains the code you are working on. For example, to clone the IGVC code repository, you can use the command "git clone https://github.com/MST-Robotics/IGVC.git".
Follow the instructions for Oracle Java Installation to install the Java runtime required for Eclipse.
After you finish doing that, you can follow these instructions on the ROS Wiki to download and configure Eclipse to work with ROS.
If you follow the above instructions, you should be able to start Eclipse and import the ROS project into your workspace. You will then be able to edit the code and build the project, all from within Eclipse.