Skip to content

Instantly share code, notes, and snippets.

What would you like to do?

Create a ROS Noetic VM with Ubuntu 20.04

Create a VM with the Ubuntu 20.04 installer. Make sure to connect the VM to the LAN, so that any physical robots can connect to it.

Install XRDP

sudo apt install xrdp

Ensure that xrdp is enabled and running after a reboot

 sudo systemctl enable --now xrdp

If you are going to be connecting to the VM from a windows machine open the RDP port in the firewall

sudo ufw allow from any to any port 3389 proto tcp

Allow remote desktop users to handle package management. This is to prevent many, many, many authentication required dialogs from appearing. Create a file called /etc/polkit-1/localauthority/50-local.d/45-allow-package-management.pkla with the following content

[Allow Package Management all Users]

Install zsh

NOTE: Picked zsh because it has better highlighting and completion, but also catkin generates zsh scripts.

Install zsh:

sudo apt-get install zsh

Make zsh default

chsh -s /bin/zsh

Install Powerline fonts

sudo apt-get install fonts-powerline

Install oh-my-zsh

sh -c "$(wget -O -)"

Install autosuggestions

git clone git:// $ZSH_CUSTOM/plugins/zsh-autosuggestions

Install highlighting

git clone ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

Update the plugins line in the .zshrc file

plugins=(git zsh-autosuggestions zsh-syntax-highlighting)

Install VS Code

Install the MS package repository

wget -qO- | gpg --dearmor >
sudo install -o root -g root -m 644 /etc/apt/trusted.gpg.d/
sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/trusted.gpg.d/] stable main" > /etc/apt/sources.list.d/vscode.list'
rm -f

Configure apt https transport

sudo apt install apt-transport-https
sudo apt update

Install VS Code

sudo apt install code

Install ROS Noetic

Set up the apt repository for ROS

sudo sh -c 'echo "deb $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
curl -s | sudo apt-key add -

Install all the ROS base components

sudo apt install ros-noetic-desktop-full libroscpp-dev ros-cmake-modules ros-environment ros-message-generation \
ros-message-runtime ros-noetic-amcl ros-noetic-catkin ros-noetic-navigation ros-noetic-robot ros-noetic-tf2 \
ros-noetic-vision-opencv python3-catkin build-essential cmake python3-rosinstall python3-wstool \
python3-rosdep ros-noetic-teleop-twist-keyboard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment