This project shows integrating a RealSense camera with a LiveKit room and recording the data to an MCAP file using Foxglove Protobuf schemas.
NOTE: This project has only been tested on MacOS and Linux.
This repo does not use ROS.
Generate the protobuf sources and fetch the non-LiveKit dependencies:
./setup_realsense.shUse the project build helper:
./build.shYou can also pin a specific prebuilt LiveKit SDK version:
./build.sh -DLIVEKIT_SDK_VERSION=0.3.0Use a locally built LiveKit SDK when no prebuilt release exists for your platform.
First, install the SDK into a local prefix from the SDK build tree:
cmake --install <sdk-build-dir> --prefix ~/livekit-sdk-localThen point this project at that prefix:
./build.sh -DLIVEKIT_LOCAL_SDK_DIR=$HOME/livekit-sdk-localrealsense_to_mcap: standalone test utility that records RGB + depth directly from a RealSense camera torealsense_to_mcap.mcap. It is useful for verifying the RealSense capture path and MCAP serialization without using LiveKit.realsense_publisher: main publisher participant. It captures RealSense RGB + depth, publishes RGB as a LiveKit video track, and publishes depth data as a LiveKit data track.mcap_recorder: subscriber/recorder participant. It connects to the same room, subscribes to the published RGB + depth tracks, and writes the received data back out to an MCAP file.
NOTE: On macOS you may need to run executables with sudo