Build your own low-cost motion capture system using ROS 2 and the Valve Lighthouse Positioning system.
Lighthouse is a localization system developed by Valve for the HTC Vive VR system. It uses a combination of infrared-emitting base stations and sensors to track the position and orientation of objects in 3D space with excellent accuracy and low latency.
The Lighthouse Positioning Deck is a small receiver board originally designed for the Crazyflie nano drone from Bitcraze. It contains an FPGA and four infrared sensors that can track the deck's position and orientation relative to one or more Lighthouse base stations.
This repository provides ROS 2 packages that interface with the Lighthouse Positioning Deck through a simple USB-to-serial adapter, enabling you to build a low-cost motion capture system for robotics applications. The packages handle protocol decoding, station calibration, and real-time pose tracking.
lighthouse_ros_full_cycle.-.improved.small.mp4
To build the adapter and use these packages, you will need the following hardware:
-
Lighthouse Base Stations: Up to four V2 Lighthouse base stations are supported. Notice that V1 base stations are not supported at this time.
-
Lighthouse Positioning Deck: Bitcraze Lighthouse Positioning Deck
-
USB-to-Serial Adapter: Any common USB-to-serial adapter (FTDI FT232, CP2102, CH340, etc.)
-
Electronic Components (for the adapter):
- Resistors: 3x 10kΩ
- XBee breakout board (e.g., SparkFun BOB-08276)
- Breadboard or perfboard
- Jumper wires and basic soldering tools
Build the USB-to-serial adapter following the instructions in the Building the Hardware Adapter section below.
Connect your assembled adapter to the computer via USB. The deck should appear as a serial device (e.g., /dev/ttyUSB0 or /dev/ttyACM0 on Linux).
Verify the connection:
ls /dev/tty* | grep -E "(USB|ACM)"Build and run the development docker container:
./docker/run.sh --buildOnce inside the docker container, build the workspace:
colcon build --symlink-install
. install/setup.bashLaunch the interactive mapper to calibrate your Lighthouse base stations:
ros2 launch lighthouse_station_mapper interactive_mapping.launch.py device:=/dev/ttyACM0See the lighthouse_station_mapper README for detailed workflow instructions.
This repository provides three main ROS 2 nodes that work together to enable lighthouse-based tracking:
The driver node interfaces with the Lighthouse Positioning Deck hardware via USB-to-serial connection. It handles the low-level protocol decoding and publishes raw angle measurements from the deck's sensors.
Key features:
- Communicates with the deck's FPGA over serial
- Decodes binary lighthouse protocol
- Publishes raw azimuth/elevation measurements for each base station
See the lighthouse_deck_driver README for detailed node documentation, including published topics, parameters, and usage examples.
An interactive terminal-based calibration tool that computes the 3D geometry of your lighthouse base stations. You move the deck to multiple positions while the tool collects measurements and solves for station poses using nonlinear optimization.
Key features:
- Interactive TUI for guided calibration workflow
- Real-time RViz visualization of stations and sample positions
- Exports calibrated station geometry to CSV
- Sends station poses to the localization node
See the lighthouse_station_mapper README for detailed node documentation, including the calibration workflow, topics, and parameters.
The localization node computes real-time 6-DOF pose estimates of the lighthouse deck using the calibrated station geometry. Once the stations are mapped, this node provides continuous pose tracking at high rates with low latency.
Key features:
- Real-time pose optimization using Ceres Solver
- Configurable solver rate and time synchronization
- Loads pre-calibrated station maps from file
- Service interface for dynamic station pose updates
See the lighthouse_localization README for detailed node documentation, including subscribed/published topics, services, and parameters.
The Lighthouse deck requires a USB-to-serial adapter to interface with a computer. The adapter circuit requires voltage level shifting to protect the deck's FPGA, which operates at 3.0V logic levels.
Important: While the deck's TX pin can safely connect to most USB-to-serial adapters, the RX pin must be protected with a voltage divider to prevent damage from higher voltage levels (5V or 3.3V) output by typical USB-to-serial adapters.
The recommended adapter circuit is shown in the wiring diagram below:
Contributions are welcome! This implementation provides a foundation with many opportunities for improvement.
Please open issues for bug reports or feature requests, and submit pull requests for improvements.
- Lighthouse Positioning System: Dataset, Accuracy, and Precision for UAV Research
- Repurposing Valve's SteamVR 2.0 Technology to Develop an Open-Source, Low-Cost Motion Capture System for Robotics - FOSDEM 2025 talk with low-level system details
- Lighthouse deck product page
- Lighthouse positioning accuracy analysis
- Improved geometry estimation
- Lighthouse documentation
- ROSCon 2024 presentation
This project builds upon extensive work by the Lighthouse community, but especial thanks to the following community members for their contributions:
- Bitcraze for creating and open-sourcing the Lighthouse deck hardware and firmware
- Said Alvarado-Marin for the excellent FOSDEM presentation and slides
- The broader Crazyflie and VR communities for documentation and support
See LICENSE for details.

