Installing MDK on your own PC¶
On this page we explain how to install the MDK environment on your own devices, so that you're not tied to any particular University machine in your work. You can follow the steps described here both on Ubuntu systems, and on Windows machines running WSL. The resulting environment will be almost exactly the same as we use in COM2009 and COM3528, just without the Diamond hardware specifics.
Tip
WSL-ROS environment cannot easily interface with the physical robots, due to how the networking is done on virtual machines. If you think that at some point you might want to use your own laptop to control physical MiRos, then you'd need to install MDK natively on Ubuntu 20.04
Installing on Ubuntu 20.04¶
In this section we describe how to install ROS and MDK on a machine running Ubuntu 20.04. To ease the process, we've prepared a couple of scripts that will (hopefully) do the all heavy lifting for you.
Main script: full_install
¶
The main script is called full_install.sh
, and it should set everything up for you.
Info
If you've done a manual ROS installation process for COM2009, then running the script will install the missing MDK parts
Abstract
Keep an eye on terminal output, as there will be a few prompts that will require your input. You will need sudo
rights for some operations.
The script does the following:
- Update existing packages and system time
- Install ROS and pre-requisites
- Install TB3 package and its catkin_ws (
~/catkin_ws
) - (Optionally) Install MDK, its pre-requisites and extras
- (Optionally) Build the MDK catkin_ws (
~/mdk/catkin_ws
) - (Optionally) Set up TUoS robot switching scripts and useful aliases
- (Optionally, only on WSL) Set up VcXsrv settings for graphical output
- (Optionally) Download COM3528 and COM2009 main repos in their respective catkin_ws
To download and run this script use the following commands:
wget https://raw.githubusercontent.com/tom-howard/tuos_robotics/main/students/full_install.sh
chmod +x full_install.sh && ./full_install.sh
Script for MDK-only installation: mdk_only
¶
To install/update the MDK only, we've prepared a second script, called mdk_only.sh
. Note that this does not install MDK dependencies, nor does it install robot switching scripts.
Note
COM3528 students should use the main script in the first instance, and use this one when repairing/updating MDK
This script can be run with the following commands:
wget https://raw.githubusercontent.com/tom-howard/tuos_robotics/main/students/mdk_only.sh
chmod +x mdk_only.sh && ./mdk_only.sh
Installing on Windows using WSL¶
Refer to the Windows Subsystem for Linux Documentation for instructions on how to install and use WSL on Windows 10 or 11.
Ubuntu 20.04 should be installed by default when you install WSL but if not, or if you want to create an additional WSL distribution then see here.
We'd also recommend installing the Windows Terminal App.
Launch your Ubuntu 20.04 distro and then follow the steps above.
Graphical Applications are only supported natively in WSL when running on Windows 11 so if you're running Windows 10, then you will need to follow the additional steps below to get GUI apps (such as Gazebo and RViz) working...
Running Graphical Applications in WSL on Windows 10¶
First, you'll need to install the VcXsrv Windows X Server. You'll need to make sure you have this running before trying to launch any GUI applications from WSL (Gazebo simulations etc.) To make this easier, we've created a configuration file. Download this file, save it on your desktop and double click it to launch an X Server on your machine with the appropriate configurations. Once launched, an icon should be visible in your notification tray in the bottom right-hand corner of the Windows Desktop:
In Ubuntu, you'll need to then add the following lines to your ~/.bashrc
:
Success
If you've selected the option to set up VcXsrv settings for graphical output when running full_install
, these lines should already be in your ~/.bashrc