Skip to content

Commit d051b13

Browse files
committed
Update readme
1 parent d4f7e92 commit d051b13

10 files changed

Lines changed: 30288 additions & 12563 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.vscode
22
*.pyc
33
*/**__pycache__
4-
swarm_gpt.egg-info
4+
*.egg-info
55
saves
66
# !saves/sim2real.bag*
77
#!saves/.gitkeep

README.md

Lines changed: 25 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,26 @@
77

88
SwarmGPT integrates large language models (LLMs) with safe swarm motion planning, providing an automated and novel approach to deployable drone swarm choreography. Users can automatically generate synchronized drone performances through natural language instructions. Emphasizing safety and creativity, the system combines the creative power of generative models with the effectiveness and safety of model-based planning algorithms. For more information, visit the [project website](https://utiasdsl.github.io/swarm_GPT/) or read our [paper](https://ieeexplore.ieee.org/document/11197931/).
99

10-
- [Installation](#installation)
11-
- [How to run SwarmGPT](#how-to-run-swarmgpt)
12-
- [Deployment](#deployment)
13-
- [Citing](#citing)
10+
- [SwarmGPT](#swarmgpt)
11+
- [Installation](#installation)
12+
- [Prerequisites](#prerequisites)
13+
- [Setting up SwarmGPT](#setting-up-swarmgpt)
14+
- [How to run SwarmGPT](#how-to-run-swarmgpt)
15+
- [Prerequisites](#prerequisites-1)
16+
- [Launching the Interface](#launching-the-interface)
17+
- [Citing](#citing)
1418

1519
## Installation
1620

1721
[![Pixi Badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/prefix-dev/pixi/main/assets/badge/v0.json)](https://pixi.sh)
18-
[![Python 3.11](https://img.shields.io/badge/python-3.11-blue.svg)](https://www.python.org/downloads/)
19-
[![ROS Noetic](https://img.shields.io/badge/ROS-Noetic-blue.svg)](http://wiki.ros.org/noetic)
22+
[![Python 3.12](https://img.shields.io/badge/python-3.12-blue.svg)](https://www.python.org/downloads/)
23+
[![ROS Noetic](https://img.shields.io/badge/ROS2-Kilted-blue.svg)](https://docs.ros.org/en/kilted/index.html)
2024

2125
SwarmGPT uses [Pixi](https://pixi.sh) for dependency management and environment setup. Pixi provides a fast, reliable package manager that handles both conda and PyPI dependencies seamlessly.
2226

2327
### Prerequisites
2428

25-
- Linux x64 system (required for ROS Noetic support)
29+
- Linux x64 system
2630
- [Pixi package manager](https://pixi.sh) - see [installation instructions](https://pixi.sh/latest/installation/)
2731

2832
### Setting up SwarmGPT
@@ -31,60 +35,16 @@ Clone the repository and activate the environment:
3135
```bash
3236
git clone git@github.com:utiasDSL/swarmGPT.git
3337
cd swarmGPT
34-
pixi shell
38+
pixi install
3539
```
3640

37-
Note: You will see an error message, that `setup.sh` and `openai_api_key.sh` were not found. This is fine and fixed in the next steps.
38-
39-
This project is build on crazyswarm. Since the original (legacy) version is broken, please use our fork:
40-
```bash
41-
git clone --recurse-submodules git@github.com:utiasDSL/crazyswarm.git submodules/crazyswarm
42-
cd submodules/crazyswarm && ./build.sh
43-
exit # to force sourcing of setup.sh
44-
```
45-
46-
To test the crazyswarm installation, you can try to run the unit tests after reactivating the shell with `pixi shell`:
47-
```bash
48-
cd submodules/crazyswarm/ros_ws/src/crazyswarm/scripts
49-
python -m pytest
50-
```
51-
Note: Those tests will fail after completion of the installation, since they require `numpy<2`.
52-
53-
Crazyswarm needs tracking information (for **deployment only**). At the Learning Systems Lab, we use a Vicon motion capture and therefore need this `vicon_bridge` package:
54-
```bash
55-
git clone git@github.com:ethz-asl/vicon_bridge.git submodules/catkin_ws/src/vicon_bridge
56-
cd submodules/catkin_ws && catkin_make -DCMAKE_POLICY_VERSION_MINIMUM=3.5
57-
exit # to force sourcing of setup.bash
58-
```
59-
You need to set the IP in `submodules/catkin_ws/src/vicon_bridge/launch/vicon.launch` (`datastream_hostport`) and in `submodules/crazyswarm/ros_ws/src/crazyswarm/launch/hover_swarm.launch` (`motion_capture_host_name`).
60-
6141
Lastly, we rely on the VLC media player to play the music. In case you don't have it installed, run:
6242
```bash
6343
sudo apt install vlc
6444
```
45+
Your setup is ready now.
6546

66-
Next we can install axswarm and swarmGPT, given an active environment, with:
67-
```bash
68-
git clone git@github.com:utiasDSL/axswarm.git submodules/axswarm
69-
pip install -e .
70-
pip install -e ./submodules/axswarm
71-
```
72-
73-
Note: We are installing axswarm last to force `numpy>=2.0`, which is needed for some of our packages.
74-
75-
Your setup is ready now. If you are unsure if the installation was successful, you can run tests after exporting the API key (see below).
76-
```bash
77-
python -m pytest tests
78-
```
79-
80-
The environment includes:
81-
- **Python 3.11** with essential scientific computing packages
82-
- **ROS Noetic Desktop** for robot communication and control
83-
- **Build tools** (cmake, ninja, catkin_tools) for ROS workspace compilation
84-
- **Development tools** (ruff for linting, uv for fast Python package management)
85-
- **Point Cloud Library (PCL)** for 3D processing
86-
87-
### Documentation Environment
47+
<!-- ### Documentation Environment
8848
8949
To work with documentation, use the docs environment:
9050
@@ -94,32 +54,28 @@ pixi run -e docs docs-serve
9454
9555
# Build documentation
9656
pixi run -e docs docs-build
97-
```
57+
``` -->
9858
## How to run SwarmGPT
9959

10060
### Prerequisites
10161

102-
Before running SwarmGPT, start your pixi shell with `pixi shell`. Then, ensure you have:
62+
Before running SwarmGPT, ensure you have:
10363

10464
1. **OpenAI API Key**: Set your OpenAI API key as an environment variable:
10565
```bash
10666
export OPENAI_API_KEY="your-api-key-here"
10767
```
108-
For convinience, you can create a `key.sh` with the command above, which is automatically executed whenever you start you `pixi shell`.
68+
For convinience, you can create a `openai_api_key.sh` script in the swarmGPT root directory containing the command above, which is automatically executed whenever you start you start your pixi environment.
10969

110-
2. **Crazyswarm Configuration**: Configure your drone swarm by editing the `crazyflies.yaml` file in your Crazyswarm installation. SwarmGPT automatically locates this file at:
111-
```
112-
submodules/crazyswarm/ros_ws/src/crazyswarm/launch/crazyflies.yaml
70+
2. **Configuration**: Configure your drone swarm by editing the settings. SwarmGPT automatically locates the files at:
71+
```bash
72+
swarmGPT/data/drones.toml # Contains the drone URIs and home positions
73+
swarmGPT/data/settings.yaml # Contains the environment and safety filter settings
11374
```
114-
115-
This file defines:
116-
- Drone IDs and radio addresses
117-
- Initial positions for each drone in the swarm
118-
- Flight area boundaries
11975

12076
### Launching the Interface
12177

122-
1. **Activate the Pixi environment** (if not already active):
78+
1. **Activate the Pixi environment**:
12379
```bash
12480
pixi shell
12581
```
@@ -160,11 +116,11 @@ Once you're happy with your generated choreography, you can proceed to deploy it
160116
161117
## Deployment
162118
163-
To deploy the generated choreography on your physical drone swarm, crazyswarm has to be running **before** starting the SwarmGPT interface!
119+
Use the deploy environment (`pixi shell -e deploy`) to run the following code. You need to start two terminals.
164120
165-
1. **Start the Crazyswarm server**:
121+
1. **Start the motion_capture_tracking lib**:
166122
```bash
167-
roslaunch crazyswarm hover_swarm.launch
123+
ros2 launch motion_capture_tracking launch.py
168124
```
169125
2. **Launch SwarmGPT** as described in the [Launching the Interface](#launching-the-interface) section.
170126
3. **Generate and preview choreography** using the web interface.

0 commit comments

Comments
 (0)