Getting started


In this section you will find materials and first instructions on how to prepare your computer to run the practical lessons of the robotics course. By the first session of the course, it is expected that you have followed all the instructions in this section and already have a computer that is ready to work.

If you have difficulties, the teacher and the teaching assistant will be happy to assist you—their contact information is available in the section Contact.

Note: in this section, the command lines to be introduced in the terminal of Ubuntu are presented in blocks, however, you must introduce them one by one. DO NOT copy and paste the whole block.


Installing the OS: Ubuntu 20.04.5 LTS (Focal Fossa) 64bit

To develop this course, you will need a fresh installation of Ubuntu 20.04 in your computer. Unfortunately, some simulations might be computationally heavy and cannot be run on Virtual Machines.

It is recommended that you use a fresh installation to avoid conflicts between the software that you might have pre-installed in your computer and the software that you will use in the practical sessions. For example, it is known that environments such as miniconda and anaconda might cause those issues.

The following tutorials will guide you step by step to install Ubuntu on your computer.

1 - Download the desktop image file for Ubuntu 20.04.5 LTS 64bit.

If you want to completely format your computer and only keep Ubuntu, follow the tutorial below.

2A - Install Ubuntu desktop without Windows.

If, on the contrary, you want to keep a Windows instalation alongside your new Ubuntu installation, follow the tutorial below.

2B - Install Ubuntu desktop with Windows (dual boot).

I recommend to use at least 60 GB for your Ubuntu installation.

If you have a NVIDIA grahics card

If you have an NVIDIA graphics card and you are experiencing graphics issues, it might be necessary to switch the driver you are using. To do this process, open the Additional drivers window with the commmand

software-properties-gtk --open-tab=4

Select the driver provided by NVIDIA for your specific graphics card, the (proprietary) version that does not indicate (open kernel); and then apply the changes

NVIDIA

Reboot your computer and open a terminal. The following command should display the settings of your graphics card, where you can verify that it is operating normally. If so, quit the window without modifying anything.

nvidia-settings

A crash tutorial to Linux Systems

The second step to get ready for the course is to follow the tutorial The Linux command line for beginners. It will introduce you the basic usage of the terminal in Linux, and how to navigate and work using the command line.

If you have previous experience with Unix systems, you can skip this step.


Installing an useful terminal manager

During the first part of the course, you might need to use many instances of the terminal at the same time. In particular, you will use them to initialize, monitoring and stopping the simulations and the software you will produce. Therefore, it can be convenient to install a manager that can facilitate the managing of a large number of terminals at the same time. I suggest terminator, and you can install it by opening a terminal and entering the command below.

sudo apt install terminator

You can find documentation and a short introduction to the manager here.


Downloading the course materials

Open a terminal and enter the following commands to download the course materials. The course materials will be placed in your home directory.

cd
wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1KH09zEF8CcjES86J0XA5Ys8YfhwnboMN' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=1KH09zEF8CcjES86J0XA5Ys8YfhwnboMN" -O course_materials.tar.xz && rm -rf /tmp/cookies.txt

You can know that the download process has finished when the terminal shows you an output similar to the one below.

2022-10-18 00:34:26 (597 KB/s) - ‘course_materials.tar.xz’ saved [54243716/54243716]

Once the download finishes, decompress the file using the command

tar -xvf course_materials.tar.xz

The following directories must be available now in your $HOME directory.

swarm_robotics
catkin_ws

Preparing the simulators - Part 1: Mobile robotics

You will use the Robot Operating System (ROS) and the Gazebo simulator in the first part of the course. ROS and Gazebo will be installed simultaneously and both are available in the repositories of Ubuntu. During this course, you will use ROS Noetic and Gazebo 11.0. Below, you are given with steb-by-step instructions for installing and configuring the files required for the practical sessions.

Open a terminal and enter the following commands in the command line to enable the ROS repositories

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt install curl
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -

Enter the following commands to start the installation

sudo apt update
sudo apt install ros-noetic-desktop-full

After the installation finishes, setup your environment with the following commands

echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
source ~/.bashrc

Install dependencies for building software packages

sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential
sudo rosdep init
rosdep update

Install dedendencies to run the simulation of the robot Summit-XL HL

sudo apt install ros-noetic-robot-localization
sudo apt install ros-noetic-mavros-msgs
sudo apt install ros-noetic-gmapping
sudo apt install ros-noetic-map-server
sudo apt install ros-noetic-amcl
sudo apt install ros-noetic-velocity-controllers
sudo apt install ros-noetic-twist-mux
sudo apt install ros-noetic-ros-control

Configure your ROS workspace

cd ~/catkin_ws/
catkin_make
echo "source $HOME/catkin_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc

You can verify that your workspace is successfully installed. To do so, enter the command

echo $ROS_PACKAGE_PATH

The workspace was configured correctly if it prints the following information

/home/yourname/catkin_ws/src:/opt/ros/noetic/share

Finally, test that you are able to run the simulator by entering the command

roslaunch sandbox_summit_xl sandbox.launch

The simulator might take several minutes to start the first time. If the interface displays correctly, you can close it by pressing Ctrl + C in the terminal until all processes stop.

Gazebo interface

Troubleshooting

If the terminal takes too long to start or the window does not start correctly, restart and close the simulation a few times. Gazebo will try to download missing assets every time it is launched.


Preparing the simulators - Part 2: Swarm robotics

You will use the ARGoS simulator in the second part of the course. To install the simulator on its current version (3.0.0-beta56), open a terminal and enter the following commands in the command line

sudo apt update
sudo apt upgrade
sudo apt install build-essential
sudo apt-get install cmake libfreeimage-dev libfreeimageplus-dev qt5-default freeglut3-dev libxi-dev libxmu-dev liblua5.3-dev lua5.3 doxygen graphviz libgraphviz-dev asciidoc
cd ~/swarm_robotics/
chmod a+x install_argos3.sh
./install_argos3.sh
source ~/.bashrc

After the installation process finishes, verify that you are able to run an experiment by entering the following commands in the command line.

cd ~/swarm_robotics/sandbox/
argos3 -c sandbox.argos

If the installation was successful, the ARGoS interface will spawn. If the interface displays correctly, you can close it by pressing the icon in the top right corner of the visualization window of the interface.

ARGoS interface