Setup Linux Host for Running Rviz
- 1 1. Overview
- 2 2. Install Ubuntu 22
- 3 3. Configure bash as the System-Wide Shell
- 4 4. Install chrony Time Service
- 5 5. Configure ROS2 APT Repositories
- 6 6. Install ROS2 Packages
- 7 7. Configure VoxeBotics APT Repository
- 8 8. Install Package with SLAM Demo Rviz Configuration
- 9 9. Test Rviz
- 10 10. What’s next
- 11 11. Related Topics
1. Overview
The iRobot Create3 ROS2 navigation and SLAM examples imply watching/controlling of the mobile platform via Rviz running on a separate host.
The Rviz software stands for “3D robot visualizer” which is a part of ROS2 distribution. It provides a GUI with a set of tools to visualize and control the robot using the ROS2 communication protocols.
This application note provides steps needed to setup a Linux host for that purpose.
NOTE: ROS2 does not provide out-of box support for installation on Windows machines. For those who interested in compiling ROS2 distribution for Windows 10 can look into https://docs.ros.org/en/humble/Installation/Alternatives/Windows-Development-Setup.html for instructions.
2. Install Ubuntu 22
Proceed with Download Ubuntu Desktop | Ubuntu for downloading link and installing instructions. Make sure you download and install 22.04 LTS version.
If you are not sure which Ubuntu version your Linux desktop runs, start Terminal application and use the following shell command:
cat /etc/os-release
Output:
PRETTY_NAME="Ubuntu 22.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
3. Configure bash as the System-Wide Shell
Rviz relies on the bash-type shell scripts that don’t work with the default Ubuntu shell dash
. Run the commands below to set up bash
as the system shell:
sudo dpkg-reconfigure dash
(Say No
to the Use dash as the default system shell (/bin/sh)?
question.)
4. Install chrony Time Service
For the precise time synchronization between the robot and the host we need the chrony
package:
5. Configure ROS2 APT Repositories
Start Terminal application.
Set UTF-8 locale:
Output:
Enable Ubuntu Universe repository:
Download and install ROS2 GPG key:
Add the ROS2 repository to your sources list:
Update
apt
cache:
6. Install ROS2 Packages
Proceed typing commands in the Terminal application:
Install the Rviz application:
Install
cyclonedds
RMW:Install a common CLI command extension:
7. Configure VoxeBotics APT Repository
Proceed typing commands in the Terminal application:
Add VoxelBotics repository to the apt sources:
Update apt cache:
8. Install Package with SLAM Demo Rviz Configuration
Proceed typing command in the Terminal application:
9. Test Rviz
Open the Terminal application.
Run Rviz in 3D mode:
Close Rviz.
Run Rviz in flat mode:
Close Rviz.
Close the Terminal application.
10. What’s next
Proceed to Launching SLAM for launching LIDAR-only navigation, or proceed to PMD Flexx2 SLAM Setup to setup PMD Flexx2 camera for enhanced object avoidance.
11. Related Topics
Introduction to ROS2 Navigation and SLAM quick introduction to the ROS2 navigation concepts.
iRobot Create3 SLAM Setup application note for preparing iRobot Create3 for ROS2 navigation and SLAM.
PMD Flexx2 SLAM Setup application note form mounting the PMD ToF camera.
Launching SLAM application note on launching ROS2 navigation on iRobot Create3.