Ready to run Thor and Asgard on Ubuntu? Just follow these steps, grab your terminal and let the penguin do the heavy lifting!
Start with a fresh install of Ubuntu 22.04.
If you’re already running it, you’re good to go!
We recommend following the official ROS2 documentation:
👉 ROS2 Humble Installation Guide
Here’s a quick summary of the steps:
Set locale
sudo apt update && sudo apt install locales
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8Setup sources
sudo apt install software-properties-common
sudo add-apt-repository universe
sudo apt update && sudo apt install curl -y
export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}')
curl -L -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo ${UBUNTU_CODENAME:-${VERSION_CODENAME}})_all.deb"
sudo dpkg -i /tmp/ros2-apt-source.debInstall ROS2 packages
sudo apt update
sudo apt upgrade
sudo apt install ros-humble-desktop
sudo apt install ros-dev-toolsSource the ROS2 setup script
echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc
source ~/.bashrcLet’s get all the extra goodies for Thor-ROS and Asgard:
ros2-control
sudo apt install ros-humble-ros2-control ros-humble-ros2-controllersGazebo
sudo apt install ros-humble-gazebo-ros-pkgs ros-humble-gazebo-ros2-controlMoveIt2
sudo apt install ros-humble-moveit-ros-control-interface ros-humble-moveit ros-humble-moveit-resourcesrosbridge
sudo apt install ros-humble-rosbridge-suiteSerial and JSON libraries
sudo apt install libserial-dev nlohmann-json3-devLet’s get the code!
cd ~/
git clone https://github.com/AngelLM/Thor-ROSTime to compile:
cd ~/Thor-ROS/ws_thor
colcon buildLet’s get Asgard ready to shine:
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo bash -
sudo apt install -y nodejs
cd ~/Thor-ROS/asgard
npm installStart the simulated robot or connect to your real one!
cd ~/Thor-ROS/ws_thor
source install/setup.bash
ros2 launch thor_bringup simulated_robot.launch.pyOpen a second terminal and start the web interface:
cd ~/Thor-ROS/asgard/
npm run devCopy the URL shown in Terminal #2 after running npm run dev (usually something like http://localhost:5173) and enjoy controlling Thor from your browser!
You’re all set!
If you run into trouble or want to join the community, don’t forget to visit our Discord.