Create a VM with the Ubuntu 22.04 installer. Make sure to connect the VM to the LAN, so that any physical robots can connect to it.
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 192.168.0.0/16 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
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 git
sudo apt install git
Install oh-my-zsh
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
Install autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions.git $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 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
sudo apt install python3-pip
Install argument completion so that we can use it with the ROS2 command line
pip3 install argcomplete
Install the ROS packages
Install at least the following packages:
- ros-humble-desktop
- ros-humble-simulation
- ros-humble-navigation2
- ros-humble-octomap
- ros-humble-controller-manager
- ros-humble-ros-environment
- ros-humble-tf2
- ros-humble-xacro
- python3-rosinstall
- python3-wstool
- python3-rosdep
Install the build tools
sudo apt install python3-colcon-common-extensions
Source the colcon autocomplete script (in /usr/share/colcon_argcomplete/hook/colcon-argcomplete.zsh) in your .zshrc file
Install some of the tools
sudo apt-get update
sudo apt-get install lsb-release wget gnupg
Then install Ignition (example given for installing the 'Fortress' version)
sudo wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null
sudo apt-get update
sudo apt-get install ignition-fortress
We may also need to install the
ign_ros2_control
package so that Gazebo can interact with ROS2 controls: https://github.com/ros-controls/gz_ros2_control