Metadata-Version: 2.4
Name: spark_dsg
Version: 1.1.3
Summary: Library for representing 3D scene graphs
Author-Email: Nathan Hughes <na26933@mit.edu>, Yun Chang <yunchang@mit.edu>
Maintainer-Email: Nathan Hughes <na26933@mit.edu>
License-Expression: BSD-3-Clause
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3
Project-URL: Repository, https://github.com/MIT-SPARK/Spark-DSG
Requires-Python: >=3.8
Requires-Dist: click
Requires-Dist: numpy
Requires-Dist: seaborn
Requires-Dist: shapely
Requires-Dist: zmq
Provides-Extra: viz
Requires-Dist: trimesh; extra == "viz"
Requires-Dist: viser; extra == "viz"
Description-Content-Type: text/markdown

[![Spark-DSG Build and Test](https://github.com/MIT-SPARK/Spark-DSG/actions/workflows/ci.yaml/badge.svg)](https://github.com/MIT-SPARK/Spark-DSG/actions/workflows/ci.yaml)

## Spark-DSG

This is the core c++ library that contains the dynamic scene graph data-structure used by Hydra. It also has python bindings.

### Change Notes

- 4/22/24: Python bindings and unit tests are built by default. You will need to install relevant dependencies (via `sudo apt install python3-dev` or `rosdep`) or disable the bindings and tests via cmake options.
- 3/16/24: Updated dependencies to use system libraries for `nlohmann_json`. You will need to install it either via `sudo apt install nlohmann-json3-dev` or use `rosdep` to update dependencies.

### Acknowledgements and Disclaimer

**Acknowledgements:** This work was partially funded by the AIA CRA FA8750-19-2-1000, ARL DCIST CRA W911NF-17-2-0181, and ONR RAIDER N00014-18-1-2828.

**Disclaimer:** Research was sponsored by the United States Air Force Research Laboratory and the United States Air Force Artificial Intelligence Accelerator and was accomplished under Cooperative Agreement Number FA8750-19-2-1000. The views and conclusions contained in this document are those of the authors and should not be interpreted as representing the official policies, either expressed or implied, of the United States Air Force or the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for Government purposes notwithstanding any copyright notation herein.

### Building for Python

  1. Install requirements and make a virtual environment:

```bash
sudo apt install python3-venv libzmqpp-dev nlohmann-json3-dev
mkdir /path/to/environment
cd /path/to/environment
python3 -m venv dsg  # or some other environment name

# you may also want to upgrade pip, though it shouldn't be necessary
# source dsg/bin/activate
# pip install --upgrade pip
```

  2. Install the python package
```bash
source /path/to/dsg/environment/bin/activate
git clone git@github.com:MIT-SPARK/Spark-DSG.git
pip install ./Spark-DSG
```

### Python Bindings Usage

See [this notebook](examples/python_api.py) for some examples for the bindings (you'll want to clone the repo, even if you installed from github).
You'll want to install `jupyter` and `jupytext` if you want to run it as a notebook, though you can also just run it directly as a python script.
You can find an example scene graph [here](https://drive.google.com/file/d/1jwcjrE4-6PvOgEgJipETkQaLgC43biFT/view?usp=sharing).

### Python API documentation

Generating the python documentation should be as simple as:

```
source /path/to/dsg/environment/bin/activate
cd doc
pip install sphinx  # if you haven't already
make html
python -m http.server  # to serve them locally
```

### Building For ROS

This repository is a valid ROS package and should build if placed in a workspace.
