SVL Simulator ROS 2 Bridge

The SVL Simulator can publish and subscribe to ROS 2 messages by connecting to the ROS2 LGSVL Bridge. This custom, native ROS2 bridge yields higher performance than the previously used ros2-web-bridge.

This document describes the installation process.

Installing Dependencies top#

The ROS2 LGSVL Bridge requires the following packages to be built: - ROS2 (rcutils and rcl) - colcon - boost

Installing ROS 2 top#

See the official ROS 2 installation guide to install ROS 2. The choice of the distribution will somewhat depend on the Ubuntu version installed. Ubuntu 18.04 supports Dashing Diademata (dashing) and Eloquent Elusor (eloquent), with dashing being the LTS distro. Ubuntu 20.04 only supports Foxy Fitzroy (foxy), which is also an LTS distro.

The ROS 2 LGSVL Bridge supports Dashing Diademata and newer distributions. For Ubuntu versions older than 18.04, which would require older ROS 2 distributions, we suggest using ROS 2 docker images.

Installing Colcon top#

Colcon is a command line tool that facilitates building ROS packages. To install:

sudo apt update
sudo apt install python3-colcon-common-extensions

Installing Boost top#

To install boost run:

sudo apt install libboost-all-dev

Installing the ROS 2 LGSVL Bridge top#

There are two ways of installing ros2-lgsvl-bridge:

  • Using the Package Manager
  • Building source code

1. Using the Package Manager top#

source /opt/ros/(name\of\ros2\distro)/setup.bash
sudo apt update
sudo apt install ros-$ROS_DISTRO-lgsvl-bridge

2. Building source code. top#

Follow these steps to install the ROS2 LGSVL Bridge:

  • Clone the ros2-lgsvl-bridge repository from github:
    git clone
  • Source the installed ROS2 distribution in the terminal window:
    source /opt/ros/(name\of\ros2\distro)/setup.bash
  • Switch to the correct devel branch for the installed ROS 2 distribution:
    cd ros2-lgsvl-bridge
    git checkout ${ROS_DISTRO}-devel
  • Build using colcon:
    colcon build --cmake-args '-DCMAKE_BUILD_TYPE=Release'

Running the ROS2 LGSVL Bridge top#

If the Bridge is already built, to run ROS2 bridge:

    source (path\to\bridge\repository)/install/setup.bash