Environment Setup


Setup Environment and Desktop

Command Prompt - Terminal

If there are no shortcuts on your remote session’s desktop for Xfce Terminal that look like the one shown in , add the Xfce Terminal shortcut which is necessary for the following steps.

Xfce Terminal Desktop Shortcut.
Xfce Terminal Desktop Shortcut.

The terminal can be found in ….

ROS Environment

Study the lectures, and other sources before approaching the coursework.

If you are not familiar with Linux OS follow tutorials and familiarise with the shell environment.

For any command that you do not know, please research what it does and when to use it e.g. source

It is important to understand why commands are entered and what is the expected outcome as part of your learning.

Some machines might have some of the following elements installed, check before proceeding.

The Console to use is the Xfce Terminal, which will be referred to as terminal for the rest of the document.

Create ROS Workspace

Read the appropriate sources before proceeding; two key links are listed below, but you should extend your research to other sources too.

  1. Tutorial on how to create a workspace from the ROS wiki.

  2. Tutorial on how to create a package from the ROS wiki.

Todo: Create a folder within /rosdata which will serve as your workspace. Name it e.g. ros_ws_loc (any name will do).

Try: Initialize the workspace. Use catkin_make command which would allow you to compile, develop and run the ROS project(s).

Todo: source the workspace if catkin_make command is not found.

Todo: Create your first ROS package.

Todo: Use the example provided to test if all works (available on Moodle).

Make Your Life Easier by Changing the bashrc File

This action is optional but recommended (check if these lines already exist).

This modification allows you to avoid having to source and set environment variables each and every time you open a terminal window (you will open many - so this can save a lot of time).

Open ~/.bashrc file with a text editor e.g. mousepad that can be found in the start menu on your remote machine.

The correct bashrc file to change is the one in your home folder indicated by the symbol ~.

To open the file via shell you need command + file_name, for example:

mousepad .bashrc
Code snippet

Add these two lines at the end of the file:

export COPPELIASIM_ROOT_DIR=/opt/CoppeliaSim_Edu
source /opt/ros/noetic/setup.bash
Code snippet

The first line recreates a specific environment variable. Please research the use of the export command yourself.

The second line source’s the overall ROS framework setup file.


This last section might not be clear until you read and experiment with your first ROS package and it’s compilation, and are familiar with the workspace concept. Therefore, you might want to apply these changes later.

After these lines, add the source to the specific workspace you are working in (the local folder of your ROS workspaces).

If you want, you could use a folder within your H drive. Feel free to do so but be aware;

  1. the behavior might vary
  2. you will need to adapt the following as needed
source [the local/current workspace/devel/setup.bash]
Code snippet

This will select the #workspace you are working in.

Work With Two ROS Workspaces