A multi-camera streaming application that captures data from Stereolabs ZED cameras and streams it to Foxglove for real-time visualization and recording. The project includes both Python and C++ implementations for maximum flexibility.
-
Install ZED SDK following the official installation guide
-
Navigate to the Python directory:
cd python/
-
Install Python dependencies using Poetry:
# Install Poetry if you haven't already curl -sSL https://install.python-poetry.org | python3 - # Install dependencies poetry install
Or using pip:
pip install foxglove-sdk>=0.4.0 numpy>=2.0 opencv-python>=4.10 requests>=2.31
-
Install ZED Python API: The project includes
pyzed-5.0-cp310-cp310-linux_x86_64.whl
. Install it with:pip install pyzed-5.0-cp310-cp310-linux_x86_64.whl
-
Install ZED SDK as above
-
Navigate to the C++ directory:
cd cpp/
-
Build the project:
mkdir build && cd build cmake .. make -j$(nproc)
cd python/
# Stream to Foxglove Studio via WebSocket
poetry run python main.py --ws
# Record to MCAP file
poetry run python main.py --mcap output.mcap
# Both streaming and recording
poetry run python main.py --ws --mcap output.mcap
cd cpp/build/
# Stream to Foxglove Studio via WebSocket
./zed_foxglove --ws
# Record to MCAP file
./zed_foxglove --mcap output.mcap
# Both streaming and recording
./zed_foxglove --ws --mcap output.mcap
Option | Description | Default |
---|---|---|
--ws |
Enable WebSocket server for live streaming | Disabled |
--mcap <file> |
Output MCAP file name | output.mcap (C++), disabled (Python) |
--help , -h |
Show help message | - |
-
Start Foxglove Studio
-
Connect to live stream:
- Click "Open connection"
- Select "Foxglove WebSocket"
- Use URL:
ws://localhost:8765
-
Open recorded data:
- Click "Open local file"
- Select your
.mcap
file
-
Add panels to visualize:
- Image Panel: Subscribe to
/image_0
,/image_1
, etc. for camera images - Image Panel: Subscribe to
/depth_0
,/depth_1
, etc. for depth maps - 3D Panel: Subscribe to
/point_cloud_0
,/point_cloud_1
, etc. for point clouds
- Image Panel: Subscribe to