Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 21 Current »

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 https://ubuntu.com/download/desktop 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:

sudo apt install chrony

5. Configure ROS2 APT Repositories

  1. Start Terminal application.

  2. Set UTF-8 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-8 && \
    export LANG=en_US.UTF-8 && \
    locale

    Output:

    LANG=en_US.UTF-8
    LANGUAGE=en_US:en
    LC_CTYPE="en_US.UTF-8"
    LC_NUMERIC="en_US.UTF-8"
    LC_TIME="en_US.UTF-8"
    LC_COLLATE="en_US.UTF-8"
    LC_MONETARY="en_US.UTF-8"
    LC_MESSAGES="en_US.UTF-8"
    LC_PAPER="en_US.UTF-8"
    LC_NAME="en_US.UTF-8"
    LC_ADDRESS="en_US.UTF-8"
    LC_TELEPHONE="en_US.UTF-8"
    LC_MEASUREMENT="en_US.UTF-8"
    LC_IDENTIFICATION="en_US.UTF-8"
    LC_ALL=
  3. Enable Ubuntu Universe repository:

    sudo apt install software-properties-common
    sudo add-apt-repository universe
  4. Download and install ROS2 GPG key:

    sudo apt update && sudo apt install curl -y
    sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /etc/apt/trusted.gpg.d/ros-archive-keyring.gpg
  5. Add the ROS2 repository to your sources list:

    echo "deb http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
  6. Update apt cache:

    sudo apt update

6. Install ROS2 Packages

Proceed typing commands in the Terminal application:

  1. Install the Rviz application:

    sudo apt install ros-humble-rviz2
  2. Install cyclonedds RMW:

    sudo apt install ros-humble-rmw-cyclonedds-cpp
  3. Install a common CLI command extension:

    sudo apt install ros-humble-ros2cli-common-extensions

7. Configure VoxeBotics APT Repository

Proceed typing commands in the Terminal application:

  1. Add VoxelBotics repository to the apt sources:

    echo "deb [trusted=yes] https://vb-files.fra1.digitaloceanspaces.com/debian/ jammy voxelbotics" | sudo tee /etc/apt/sources.list.d/vb.list > /dev/null
  2. Update apt cache:

    sudo apt update

8. Install Package with SLAM Demo Rviz Configuration

Proceed typing command in the Terminal application:

sudo apt install ros-humble-create3-slam-launch 

9. Test Rviz

  1. Open the Terminal application.

  2. Run Rviz in 3D mode:

    /opt/ros/humble/share/create3_slam_launch/scripts/start_rviz
  3. Close Rviz.

  4. Run Rviz in flat mode:

    /opt/ros/humble/share/create3_slam_launch/scripts/start_rviz -flat
  5. Close Rviz.

  6. 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

  • No labels