PolyFly: Polytopic Optimal Planning for Collision-Free Cable-Suspended Aerial Payload Transportation
PolyFly is an optimal global planner for aerial transportation with a cable-suspended payload. Unlike conservative geometric over-approximations, PolyFly models each physical component - quadrotor, cable, and payload - as distinct polytopes, and incorporates orientation-aware geometry. Using duality, polytopic collision constraints are converted into smooth differentiable constraints, enabling efficient optimization and aggressive, collision-free trajectories in cluttered environments.
For the full method, results, and hardware validation, see the paper: PolyFly: Polytopic Optimal Planning for Collision-Free Cable-Suspended Aerial Payload Transportation.
- Non-conservative, orientation-aware polytopic modeling of quadrotor, cable, and payload
- Smooth differentiable collision constraints via duality for efficient optimization
- Global trajectories for maze-like, tightly constrained environments
- Real-world validation with low tracking error and agile maneuvers
src/poly_fly/optimal_planner/: Core global planner and collision constraintssrc/poly_fly/forest_planner/: Synthetic environment generation, viewers, and video utilitiesdata/params/: Parameter files for environments and studiesdata/csvs/: Generated environments produced by the codescripts/: Convenience scripts for running planner and generating environments
- By default, the code uses the MA57 solver. This is significantly faster than the default solvers. Refer to README_INSTALL_HSL on how to set this up.
Add the following to your .bashrc
export POLYFLY_DIR= <directory that points to polyfly's root>
Use Docker for the fastest setup and consistent environment:
- Build the image
docker build -t poly-fly:latest .- Start the container
./scripts/docker_run_dev.shThis mounts your workspace at /workspace inside the container so edits on your host are immediately reflected inside the container.
- Create a
.envat the project root with your OpenAI API key (optional if not using features that need it)
OPENAI_API_KEY="my-openai-api-key"- Inside the container, run commands
# Run the optimal planner (with plots)
./scripts/run_planner.sh
# Or run Python commands directly:
cd /workspace
python src/poly_fly/optimal_planner/planner.py --plot- Exit the container
exitInterested in generating trajectories through forest environments?
Run
./scripts/run_generate_forest.sh -n 1 --forest-type 0 --plot
to generate trajectories through a randomly generated forest, with different robot start and end positions
If you'd like to use PolyFly to generate a large number of trajectories (eg. for imitation learning), we offer support to run multiple solver instances in parallel.
Pass in the --mp flag to use multiprocessing, and specify the number of environments via the --n arg.
For example
./scripts/run_generate_forest.sh -n 5 --mp --forest-type 0
will run multiple solver instances (the number is determined based on the available CPU cores) for 5 randomly generated environments. This results in an effective speed up of about 5-10x. Results are saved in the associated csv directory.
The obstacles are defined through yaml files located in the data/params directory. To create a new custom environment
- Create a new directory, eg.
myexpunderdata/params. This would bedata/params/myexp - Create a
base.yamlfile, that defines the default parameters. Usingexperiments/base.yamlis a good starting point - Create a new environment yaml file, eg.
myexp/env_1.yaml. Seeexperiments/maze_1.yamlfor an example. Update theobstaclesfield to define the obstacle positions.payload_pos_initcan be set to[]ifuse_global_planner=True - Run the solver script
./scripts/run_planner.sh --yaml myexp/env_1.yaml
Want to use an LLM to generate obstacle positions?
./scripts/run_interactive_forest.shWhen prompted, enter the description of the environment you'd like to create. For example, you can say
Use 10 small obstacles to create a letter X.
Refer to compose_gpt_prompt in interactive_generate_forest.py for insight on the prompt engineering.
To visualize the results in a given csv directory, eg. csvs/experiments, run
python src/poly_fly/forest_planner/create_video.py --inspect --no-video --combined --csv_folder experiments.
This will open up a GUI to visualize all the csvs in the given directory.
- The container bind-mounts your project at
/workspacefor live-edit development.
- After planning is complete, CSVs are generated by the code and saved to
data/csvs/. - Parameter files to configure obstacles, robot, and planner are in
data/params/. - To procedurally create forests, use
./scripts/run_generate_forest.shorsrc/poly_fly/forest_planner/generate_forest.py.
If you use this repository or build on PolyFly, please cite:
@article{Sarvaiya2025PolyFly,
title = {PolyFly: Polytopic Optimal Planning for Collision-Free Cable-Suspended Aerial Payload Transportation},
author = {Mrunal Sarvaiya and Guanrui Li and Giuseppe Loianno},
journal = {arXiv preprint arXiv:2510.15226},
year = {2025},
url = {https://arxiv.org/pdf/2510.15226}
}- Mrunal Sarvaiya (Maintainer) — [email protected]
- Rohit Kulkarni (Maintainer) — [email protected]

