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.
XRDP
Install 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]
Identity=unix-user:*
Action=org.debian.apt.*;io.snapcraft.*;org.freedesktop.packagekit.*;com.ubuntu.update-notifier.*
ResultAny=no
ResultInactive=no
ResultActive=yes
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 https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
Install autosuggestions
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
Install highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${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- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -o root -g root -m 644 packages.microsoft.gpg /etc/apt/trusted.gpg.d/
sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/trusted.gpg.d/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
rm -f packages.microsoft.gpg
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 http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | 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