Metadata-Version: 2.4
Name: lw-egosuite-devkit
Version: 0.1.2
Summary: Lightwheel Egosuite DevKit - MCAP conversion and visualization pipeline
License: Apache-2.0
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: mcap==1.3.1
Requires-Dist: mcap_protobuf_support==0.5.4
Requires-Dist: numpy
Requires-Dist: opencv_python==4.13.0.90
Requires-Dist: pypcd4==1.4.3
Requires-Dist: scipy==1.17.0
Requires-Dist: setproctitle==1.3.7
Requires-Dist: tqdm==4.67.1
Requires-Dist: typing_extensions==4.15.0
Requires-Dist: tyro==1.0.5
Requires-Dist: tornado==6.5.4

#  LW-Egosuite-DevKit

## Backend Installation

### Prerequisites

* **Operating System:** Ubuntu 20.04 or higher

### Install

```bash
cd lw_egosuite_devkit

conda create -n lw_egosuite_devkit python=3.11 -y
conda activate lw_egosuite_devkit
pip3 install -e .
```

## Usage

### 1. Conversion for Visualization

Generate visualization-ready MCAP files from raw egosuite MCAP data.

#### 1.1 Single File Conversion

```bash
cd lw_egosuite_devkit
mkdir output
lwviz convert --path $input_mcap_path --writer.path $mcap_for_vis_path
```

* `$input_mcap_path`: The path to the source MCAP file.
* `$mcap_for_vis_path`: (Optional) The destination path for the generated MCAP file. Default is `./output/${input_mcap_filename}_vis.mcap`.

#### 1.2 Batch Conversion

```bash
cd lw_egosuite_devkit
mkdir -p output

data_path="/path/to/your/data"

for input_mcap_path in "$data_path"/*.mcap; do
    [ -e "$input_mcap_path" ] || continue

    base_name=$(basename "$input_mcap_path" .mcap)

    mcap_for_vis_path="./output/${base_name}_vis.mcap"

    echo "Processing: $base_name ..."

    # process the file
    lwviz convert --path "$input_mcap_path" --writer.path "$mcap_for_vis_path"
done
```

* `$data_path`: The directory containing the source MCAP files. Each file will be converted and saved with a `_vis.mcap` suffix in the `./output/` directory.

### 2. Visualization with Foxglove Studio

Follow these steps to visualize the processed data in [Foxglove Studio](https://app.foxglove.dev/):

1. **Launch Foxglove**: Open the Foxglove Studio desktop application or web version.
2. **Import Layout**: Load the recommended configuration file: `assets/default_layout.json`.
3. **Load Data Streams**: Simultaneously load the source file `mcap_filename.mcap` and the generated visualization file `./output/{mcap_filename}_vis.mcap`.

Once loaded, the visualization will appear in the Foxglove Studio dashboard as shown below:

![image](assets/demo.jpg)

## License

This project is licensed under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).

Copyright 2026 Lightwheel Team
