Skip to main content

A Simulation Toolkit for the Kinematics of Flapping-Wing Micro Aerial Vehicles

Project description

FlapKine Logo


FlapKine – A Simulation Toolkit for the Kinematics of Flapping-Wing Micro Aerial Vehicles

Platform Repo Size Build Status PyPI version GitHub License GitHub Release Docs

Overview

FlapKine is a modular, PyQt5-based application designed for 3D visualization of forward and inverse kinematics in flapping-wing systems. Its hybrid architecture allows it to operate as both an intuitive graphical user interface (GUI) and a Python library, enabling researchers to simulate and animate flapping-wing motion either interactively or through code using FlapKine’s core classes.

The GUI is built to assist researchers who may not be proficient in programming, offering an accessible platform for scientific exploration and analysis.

FlapKine is lightweight and relies on a few essential libraries:

Key Features:

  • Inverse Kinematics Engine — Compute and visualize 3D joint trajectories using custom analytical models.
  • Control timelines, playback speed, and rendering in real time.
  • Import and display STL files with real-time transformation tracking.
  • Project Setup Panel — Configure video, camera paths, STL export, lighting, and reflections.
  • Optimized Performance — Built on VTK + PyQt5 with multithreaded rendering for speed.

For the full documentation, tutorials, and API reference, visit the FlapKine Docs!

The source code can be found in the GitHub repository and is fully open source under MIT license. Consider starring FlapKine to support its development.

Installation

🔹 Option A: Windows Installer

Download the latest release from the Releases Page and run the installer. This will install Flapkine on your system with optional desktop shortcuts.

🔹 Option B: Developer Mode (Python)

Set up FlapKine locally for development using the steps below:


  1. Clone the Repository

    git clone https://github.com/ihdavjar/FlapKine.git
    cd FlapKine
    
  2. (Recommended) Create a Conda Virtual Environment

    conda create -n flapkine-env python=3.10.3
    
  3. Activate the Virtual Environment:

    conda activate flapkine-env
    
  4. Install Required Dependencies:

    pip install -e.
    
  5. Launch the Application:

    python -m FlapKineLauncher.py
    

Note: For proper video rendering support, you must install the K-Lite Codec Pack (Basic or Standard version is enough). Without it, some video player features may not work, due to missing codec issues.


Example

Get started with FlapKine using ready-to-run example projects. Each example showcases a different kinematic configuration and demonstrates how to:

  • Set up and simulate motion
  • Visualize results using the FlapKine interface
  • Reproduce the setup entirely from scratch

Each project includes:

  • A pre-configured scene file (scene.pkl)
  • A complete simulation config (config.json)
  • Required resources to build the project from scratch
  • Instructions to both run and rebuild the project

For detailed insights into the project structure and usage patterns, check out the Examples section in the FlapKine documentation. It showcases practical implementations and helps you understand how the components fit together seamlessly.

1-DOF Flapping Wing System

Download the project.zip

This example simulates a wing structure undergoing:

  • Rotation about a single axis (z-axis)
  • Visualization of a 3D wing mesh loaded from an STL file

It includes all necessary configuration settings, time-varying angle inputs, and STL files required to run and reproduce the simulation in FlapKine.

Files Included

  • project.zip: A compressed archive containing both the full simulation project and the necessary resource files.

Upon extraction, the contents of project.zip are organized into two main folders:

  • 1_DOF_1/: Contains the actual project setup, which can be loaded into FlapKine.
  • resources/: Contains supporting files required for reproducing the project from scratch, such as STL meshes, angle time series, and plots.

resources/ Contents

resources/
âœâ”€â”€ angles/
│ âœâ”€â”€ alpha_data.csv             # Rotation about the x-axis (all zeros)
│ âœâ”€â”€ beta_data.csv              # Rotation about the y-axis (all zeros)
│ └── gamma_data.csv             # Rotation about the z-axis (time-series values)
│
âœâ”€â”€ stl/
│ └── wing.stl                   # 3D mesh of the wing
│
└── angle_plot.png               # Plot of the rotation angles over time

Simulation Details

This is a single degree-of-freedom system, where only the rotation about the z-axis (gamma_data.csv) is active. The alpha and beta angles (which can also be verified by visualizing the CSV files in resources/angles) remain zero throughout the simulation.

Below is a plot showing the time-series data for each rotation angle given in the angles/ folder:

Angle Plot

Figure: Time-series plot of the rotation angles (alpha, beta & gamma) used in this example.

Running the Example

  1. Extract the project.zip archive to your desired directory.
  2. Launch the FlapKine application and select Load Project.
  3. Navigate to the 1_DOF_1/ folder and select the directory.
  4. The project will load with a pre-configured scene. Below is a video of the simulation output:

Flapping Wing Render Preview

Figure: Animation showing the flapping wing simulation rendered by FlapKine.

For more examples and detailed steps to rebuild the project from scratch, please visit the official documentation: FlapKine Examples and Tutorials

Acknowledgements

FlapKine has been developed as part of an undergraduate research initiative with strong interdisciplinary underpinnings spanning mechanical design, computer vision, and computer graphics. Special thanks to:

  • Professors and Mentors at IIT Jodhpur for their constant guidance and feedback during the development of the analytical models and kinematic pipelines.
  • The open-source communities behind VTK, PyQt5, and Others, whose robust libraries form the backbone of this simulation toolkit.
  • Researchers and users of DLTdv software for inspiring the need for a modern, standalone 3D tracking solution tailored to flapping-wing MAVs.
  • ChatGPT by OpenAI, for serving as an AI assistant in drafting high-quality documentation, generating professional Sphinx-style docstrings, and assisting with the creation of the FlapKine logo.

Contributing and Future Roadmap

Contributions to FlapKine are welcome and encouraged! Whether it's code, bug reports, feature suggestions, or documentation improvements — feel free to open a GitHub Issue or submit a Pull Request.

Planned Enhancements

  • Flexible Wing Models (in progress): Enable simulation of deformable and compliant wing structures, moving beyond rigid-body assumptions.
  • Multi-View Calibration System: Integrate multi-stereo camera calibration tools natively within the GUI for seamless experimental video setup.
  • DLTdv Replacement Pipeline: Implement a modern Direct Linear Transform-based module to reconstruct 3D points from video footage, eliminating reliance on software like DLTdv.
  • Plugin Architecture: Enable external researchers to contribute new kinematic models or analysis tools as plug-and-play modules.

The long-term goal is to position FlapKine as a self-sufficient, GUI-driven alternative to legacy motion tracking tools used in flapping-wing biomechanics and robotics, while retaining code-level access for power users.

If you're passionate about bio-inspired flight, computer vision, or robotics — your contribution can shape the next chapter of FlapKine.

Contributers

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flapkine-1.0.0.tar.gz (88.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flapkine-1.0.0-py3-none-any.whl (103.3 kB view details)

Uploaded Python 3

File details

Details for the file flapkine-1.0.0.tar.gz.

File metadata

  • Download URL: flapkine-1.0.0.tar.gz
  • Upload date:
  • Size: 88.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.3

File hashes

Hashes for flapkine-1.0.0.tar.gz
Algorithm Hash digest
SHA256 b5ba7b02190e7efb157e50257aad7f4d68d376697d161c787e21fab0fdc747c3
MD5 0a27497ebc47d6330ab3e9435798d2a3
BLAKE2b-256 e370e1a597d5eb5da22c5954c540f2814b416d37c6ebc463726a8f057d9cd89d

See more details on using hashes here.

File details

Details for the file flapkine-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: flapkine-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 103.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.3

File hashes

Hashes for flapkine-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 682f0e95db41110380a9ac66c360a135bb6e7e6a50a29dc999ec43280080967a
MD5 f158bdf024e5d8e610cb28bcbce57b87
BLAKE2b-256 c1c80a28c2f4d691ba8e24ac9025e62db2bfef6b63dfead8578889d50c3e50e0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page