Skip to main content

LiveKit Portal for ROS quickstart

Build and run the LiveKit Portal for ROS with Docker or from source.

Overview

Run the LiveKit Portal for ROS with the Docker image or build it from source. Both options require a LiveKit URL and a token. A LiveKit Portal for ROS configuration file is optional: if you don't provide one, the LiveKit Portal for ROS forwards all ROS topics bidirectionally between the local ROS graph and the LiveKit room.

Create an all-topics configuration

The following config is equivalent to the default behavior. Create /tmp/all_topics.yaml if you want an explicit starting point to edit.

echo 'ros_portal:
version: "0.0.1"
topics:
- topic: ".*"
direction: "bidirectional"' > /tmp/all_topics.yaml

For production, configure only the topics and directions your app needs.

Run with Docker

The Docker command uses host networking so DDS can discover the host ROS graph on Linux:

docker pull livekit/ros-portal:<ros_distro>
docker run --rm \
--network host \
--env LIVEKIT_URL=<url> \
--env LIVEKIT_TOKEN=<token> \
--volume /tmp/all_topics.yaml:/config/ros_portal.yaml:ro \
livekit/ros-portal:<ros_distro> \
ros2 launch ros_portal ros_portal.launch.py \
config_path:=/config/ros_portal.yaml

Build and run from source

To build the LiveKit Portal for ROS from source, install ROS 2 , colcon , and vcstool .

Clone the repository, import its external dependencies, and build:

git clone https://github.com/livekit/ros-portal.git
cd ros-portal
mkdir -p src/externals/
vcs import --recursive --skip-existing src/externals < external.repos
colcon build --packages-up-to ros_portal

Source the workspace, set the LiveKit connection environment variables, and launch the LiveKit Portal for ROS:

source install/setup.bash
export LIVEKIT_URL=<url>
export LIVEKIT_TOKEN=<token>
ros2 launch ros_portal ros_portal.launch.py config_path:=/tmp/all_topics.yaml

Additional resources

The following resources provide more information about configuring and operating LiveKit Portal for ROS.