-
Notifications
You must be signed in to change notification settings - Fork 2
Getting Started
Every version of ROS is tied to a particular version of Ubuntu (a Linux-based operating system). Throughout this course you will be working with "ROS Melodic Morenia" (or ROS Melodic for short) and Ubuntu 18.04 (Bionic Beaver).
Not used Ubuntu/Linux before? Don't worry, Part 1 will cover all the basic tools that you'll need to interact and work with ROS and Linux.
We will also be programming robots using Python, but again, we'll help you out with this too if you haven't used Python before.
Note: ROS Melodic only (officially) supports Python 2, so we will be working with this version of Python here.
We'll be accessing the ROS Training Environment on University of Sheffield Desktop Computers (in The Diamond Building). While you won't be able to visit the Diamond building physically, you will be able to access the university machines remotely using the University Remote Desktop Service.
If you are already a student at the University of Sheffield then you will need to use your university account credentials to access this service (and make sure that you have already set up MFA). If you aren't a member of the university then you should have already been provided with a temporary computing account for this ROS training day, and you should use this to access the remote machines (in this case, have a look at these instructions for setting up MFA on the temporary account).
Note: If you are having trouble accessing the remote desktop service then the training team will do their best to help you with this on the day.
The University Desktop Machines run on Windows 10, and we'll be using the Windows Subsystem for Linux (WSL) to run a customized Ubuntu/Linux environment within this. We'll refer to this ROS Training Environment as WSL-ROS throughout this Wiki.
You may need to enable multi-factor authentication on your account in order for the remote desktop service to work. For details on enabling MFA on your account, please see the following links:
- To access a University Remote Desktop Machine head to Virtual Classroom 1 of the University's Find a PC page. You will need to sign in using your University account credentials to access this page. Only the computers in Virtual Classroom 1 have the WSL-ROS environment installed, so don't bother trying any other rooms!
- You should see a long list of PCs. Any that have a blue "Connect" button next to them are available to use.
- Click on the "Connect" button next to an available machine. This will download a
.rdp
file to your computer. - Once downloaded, double click on the
.rdp
file and log in to the PC using your university account credentials (you may need to look out for an MFA notification on your MFA-linked device). - Once you are logged into the remote machine follow the steps in the Launching WSL Section below to launch the WSL-ROS environment for these training sessions.
- At the end of the session, close the RDP connection and then close the Remote Desktop Connection app on your own machine.
Click the Windows Start Menu button and navigate to the WSL-ROS application shortcut in the application list, or just start typing "wsl-ros" and the shortcut should appear:
If you are accessing this for the first time then you will be presented with the following screen:
The Ubuntu OS image is now being installed, which may take a couple of minutes to complete. Once it's done, the Windows Terminal should automatically launch:
The tab that is opened when the Windows Terminal app launches is an Ubuntu Terminal Instance, giving us access to the Linux operating system that has just been installed. This is the WSL-ROS Environment that you will be using for this training course! The Ubuntu installation that you are now accessing already has ROS Melodic installed along with all the additional ROS & Linux packages that you will need to complete the exercises in this Wiki.
You are all set up and ready to go!
It's a good idea to make sure that you back up any work that you do in this environment regularly and before you close down the WSL-ROS environment. Make sure that you run the following backup script so that any work that you have done is not lost and can be accessed again from a different university computer. Running the backup script is easy, simply run the command below from any WSL-ROS Terminal Instance:
$ rosbackup.sh
This will create an archive of your Linux Home Directory.
Simply launch the WSL-ROS environment again if you happen to have closed it down. You will be presented with the following message:
Enter Y
to continue where you left off earlier, or N
to start from a fresh installation.
Note: If you select
N
then any work that you have created in the existing environment will be deleted! Always make sure you backup your work using the procedure outlined above!
If you want to resume on a different university machine then hopefully you backed up your work as above before logging off earlier. Once you have launched the WSL-ROS environment on the new machine, then you can run a restore script to populate the fresh environment with the ROS files that you have created previously:
$ rosrestore.sh
As explained earlier, you will be working extensively with the Linux Terminal for this work. An idle terminal will look like this:
Here, the presence of the $
symbol indicates that the terminal is ready to accept a command. Text before the $
symbol has two parts separated by the :
symbol:
-
Text to the left of the
:
tells us the name of the current user ("student" in this case) followed by the name of the computer that we are currently working on (also known as the "hostname"). The hostname will vary based on which University machine you happen to be logged into. -
Text to the right of the
:
tells us where in the Linux Filesystem we are currently located (~
means "The Home Directory", which is shorthand for the path:/home/student/
).
If you don't see the $
symbol, then this means that the terminal is actively running a command or process. To stop any running process enter Ctrl+C
simultaneously on your keyboard.
Navigating This Wiki:
← Welcome |
Part 1: Getting to Grips with ROS (and Linux) →
ROS Training
UK-RAS Manufacturing Robotics Challenge 2021
Tom Howard & Alex Lucas | The University of Sheffield