Course computer environments

This page describes how to set up your computer for this course.

Alt 1: Virtual machine on your own computer

We have prepared a VirtualBox virtual machine that allows you to run Ubuntu 16.04 inside Windows, Mac or Linux. This is a great way to get access to Linux and it allows you to experiment with things in a very safe environment where you can try lots of stuff and cannot really break anything. Worst thing you just install the virtual machine again in a couple of minutes and you are back to the same state again. This makes a virtual machine very handy when doing certain type of development work. The major downside is that you need to assign a certain part of your actual hardware resources to the machine which means that your host computer will suffer and the virtual machine will never be able to use all resources of the host. So, resources are not used to the max. This means that some more demanding tasks may not really run in the virtual machine, this is especially true if you do not have a very powerful machine.

  1. Ensure that you have a 64-bit OS installed and that that you have more than 4GB of RAM and at least a dual-core processor.
  2. Download VirtualBox.
  3. Install VirtualBox
    1. If you use a Mac you might want to look at this LinkLinks to an external site. if you have problems.
  4. Install the VirtualBox extension package for your OS. You find the file to install at the end of the list of files to download on the download page above.
  5. Download the WASP VM image from box.comLinks to an external site.. The image file is called WASP Ubuntu 1604 ... and is about 8GB big, in compressed form. When it is expanded it it will consume almost 40G. If you have problems hosting such a large virtual machine on your computers hard drive, you could put it on an external drive instead. Avoid a simple flash drive because it will be too slow.
  6. Open VirtualBox and choose "Import Appliance" from the File menu (see details here)
  7. Start the virtual machine by selecting the newly imported virtual machine and clicking the green arrow marked Start.
    1. If the virtual machine starts in Full screen mode you will get a message about this ("Cancel" to not use full screen and "Switch" to use full screen mode) when you start the machine.
  8. If all goes well you should see a login prompt for the user wasp (password same as user name). 
  9. Log in and make sure that the machine starts up. 
  10. Make sure that the wasp user is part of the vboxsf group (to be able to write to shared folders). Open a terminal (the Terminator application) and execute
    sudo adduser wasp vboxsf
    Log out and in (there a hidden menu in the upper right corner, the cogwheel)
  11. Move the mouse to the top of the desktop to the Virtual VM menu. Select item Devices and "Insert Guest Additions CD image..."
    guest additions.png
    Press Run. This will open up a window and the guest additions are installed. When this is down, right-click on the CD-icon down left above the trashbin and select Eject.
  12. Reboot and ensure that you can copy and paste both to and from the VM and the host computer. Ensure that bidirectional is selected under Devices (where you found the entry to insert Guest Additions CD). 

The virtual machine is setup to emulate one processor. Performance is much likely going to be much better if you give it at least one more. Go into Settings before starting your virtual machine and select the "System" tab and Processors as the image below shows. If you have plenty of RAM on your machine you might want to increase the amount of RAM that you assign your virtual machine as well. This is done under the  "Motherboard" tab. (You might want to turn off 3D acceleration if you want to run rviz from ROS.)VM add processors.png

You probably want to set up a Shared Folder between your host and guest OS. When you have booted into the VirtualMachine, move the mouse to the top of the desktop to activate the VirtualBox VM menu. Select Devices menu item and Shared Folders and Shared Folders Settings... Click the add folder icon to the right and specify a folder on your host (the machine running the virtual machine) that you want to share with your virtual machine. Check the box Auto-mount. Click OK and then reboot your virtual machine. You should find the shared folder mounted in Ubuntu under /media/sf_Shared (in the case shown in the image below where the shared Folder Name in our WASP Ubuntu system was named Shared).

VM shared folder.png

 

Troubleshooting

If the virtual machine is not behaving well there are a few things that you can try

  • If you have an external monitor connected, try to remove that

 

Alt 2: Native Linux installation

Many of you will already be seasoned Linux users and then you can probably quite easily install everything yourself on your machine natively. Not that we use a specific version of ROS in the course and this is the only one that is supported. It might not be possible to install it on all versions of Linux so you might be best off with a dual boot solution even if you already had Linux installed rather than trying to make things (assignments and project) work with a different version of ROS.

Testing your Linux machine

If you are completely new to Linux you might want to take a look at the following page first. The rest of this section is meant to give a quick tour of some of the tools that you may or may not use.

You probably also wants to take a look at this page for some Linux good to know things

If you are using a Mac you might also want to take a peak at Linux Mac

Boot your Linux machine and log in with password "wasp". You should now see something like this

WASP Ubuntu desktop.png

 

Terminal

Open the terminator terminal program. If you have a full WASP Ubuntu 16.04 installation you should be abe to click on the red/black icon under the Settings icon on the left hand side taskbar. Test the following commands

ls
ls -l
ls -a
less SOME_FILE
more SOME_FILE
cd SOME_RELATIVE_PATH
cd SOME_ABSOLUTE_PATH
cd
top
ps auxww
locate *.png

and make sure you understand what they do. For "top" you press the key q to exit. For "locate" to work you might need to first execute

sudo updatedb

sudo is a command used to perform another command as superuser, i.e., with higher privileges. You will be promoted for your password again. This will update the database of where files are stored. 

Open a web browser and make sure that you can copy text in both directions between the browser and the terminal. Remember the browser requires you to press ctrl+c/v for copy/paste and the terminal wants shift+ctrl+c/v for the same effect. 

 

Change your password

One of the first things you want to do is to change your password so that logging in to your computer is not so easy. Remember that it is not only what is on your computer that is at risk. Getting into your computer means someone has gained access into your network as well.

Open a terminal and type (followed by ENTER)

passwd

This will prompt you for a password and ask you to repeat it. The password has to fulfill some minimum safety requirements. "wasp" does not cut it for example.

 

Text editor

We have installed a few different text editors for you. Use the terminal window to try the following and see if one of them suits you

  • gedit
  • subl
  • xemacs
  • gvim 

The latter three of them can be set up to do various degrees of spell checking, code completion, etc.

If you want, you can have a look in the Ubuntu Software folder, the orange icon to the left, for alternative applications to install. 

Octave ("Matlab")

There is Matlab for Linux and if you have access to it to install it that is great but you can do many of the things also in the open source version called Octave. You should be able to figure out how to start it by now. If you not, go back up and make sure you actually understood what you did.

Play around with octave for a bit. If you have used matlab before you should see that it behaves quite similar. The graphics is not so fancy and all the toolboxes that you probably have access to under Matlab are not there.

If you have not used octave before try the following

x=1:10
y = rand(1,10)
plot(x,y)
plot(x,y,'.')
plot(x,y,x,y,'.')

 

Screenshot

Now make a screenshot: Click on the Ubuntu icon in the top left corner. This brings up a search window where you can type parts of program names and the system will look for them. Type screenshot and click the icon. Note that when you order the program to take the screenshot you will be prompted to give the file a name. The file will end up on the Pictures directory which you find in the home directory.

You can navigate there graphically by clicking the icon that looks like a file drawer under the Ubuntu icon in the top left corner. This will start the file handler / explorer / finder program.

Save a screenshot of your entire desktop and be ready to upload it in the Quiz belonging to this material.

 

Image editing

Navigate to the screenshot you just took. Right-click on the file and select Open with "Gimp image editor". Select the "selection rectangle in gimp's Toolbox window and mark a section of the image. Go to the Image menu in the top left corner (will only appear when you move the mouse there) and then select "crop to selection". Then go into the File menu and select "Export as" and export the file as a png file with a name you find good for what you cropped out. Exit Gimp.

 

Screen capture video

Sometimes it is good to be able to capture what goes on on the screen. Run the program vokoscreen. Make a screen capture of you opening the text editor of you choice and then closing it again. Produce an m4v file from it and be ready to upload it in the Quiz belonging to this material. Exit vokoscreen.