#drone #simulation #aerospace #unmanned-aerial-vehicles #quadrotor #quadcopter

bin+lib peng_quad

Peng is a minimal quadrotor pipeline including quadrotor dynamics, IMU simulation, various trajectory planners, PID controller and depth map rendering

14 releases (4 breaking)

0.5.3 Nov 7, 2024
0.5.2 Oct 30, 2024
0.5.1 Sep 8, 2024
0.4.2 Sep 4, 2024
0.1.0 Aug 27, 2024

#25 in Robotics

Download history 424/week @ 2024-08-24 666/week @ 2024-08-31 229/week @ 2024-09-07 65/week @ 2024-09-14 48/week @ 2024-09-21 28/week @ 2024-09-28 1/week @ 2024-10-05 135/week @ 2024-10-26 127/week @ 2024-11-02 21/week @ 2024-11-09

283 downloads per month

MIT/Apache

140KB
1.5K SLoC

Peng

License Crates.io Downloads Docs CI dependency status Gitter

🔍 Overview

Peng is a minimal quadrotor autonomy framework written in Rust that provides real-time dynamics simulation, trajectory planning, and control with modern visualization capabilities.

rerun demo

🎯 Key Features

  • 🚁 Real-time Simulation
    • High-fidelity quadrotor dynamics with configurable parameters
    • IMU and depth sensor simulation
    • Optional RK4 integration for accurate dynamics
  • 🎮 Advanced Control
    • PID control for position and attitude with tunable gains
    • Integral windup prevention
    • Support for different control frequencies
  • 📍 Rich Trajectory Planning
    • Minimum jerk line trajectory planner
    • Lissajous curve planner
    • Circular trajectory planner
    • Obstacle avoidance planner
    • Waypoint navigation planner
    • Landing planner
  • 📊 Visualization & Debug
    • Real-time 3D visualization via rerun.io
    • Depth map rendering
    • State telemetry logging
    • Configurable logging frequencies
  • Performance
    • Memory-safe and Efficient Rust implementation
    • Multi-threaded depth rendering

🚀 Getting Started

Prerequisites

Installation from Crates.io

# Install rerun-cli (ensure version >= 0.19.0)
cargo install rerun-cli
cargo install peng_quad
peng_quad config/quad.yaml

Installation from Source

# Install rerun-cli (ensure version >= 0.19.0)
cargo install rerun-cli
git clone https://github.com/makeecat/Peng.git
cd Peng
cargo run --release config/quad.yaml

⚙️ Configuration

  • You can configure the simulation through config file, see quad.yaml for example.
  • Configure simulation parameters such as mass, inertia, and control gains.
  • Configure control parameters such as PID gains.
  • Configure trajectory planner parameters such as waypoints, obstacles, and trajectory type.
  • Configure visualization parameters such as camera intrinsics and depth rendering.

🔧 Troubleshooting

If you encountered any issue with the rerun:

  1. Verify rerun-cli version matches rerun version in Cargo.toml:
rerun --version
  1. For Linux/WSL2 users, consult the rerun troubleshooting.

🗺️ Roadmap

  • Wind field and environmental effects
  • Motor dynamics simulation
  • Multi-quadrotor simulation
  • Model Predictive Control (MPC)

🤝 Contributing

We welcome contributions of all kinds! Please check out the Contributing Guidelines for more details.

📄 License

Peng is free, open source and permissively licensed! Except where noted (below and/or in individual files), all code in this repository is dual-licensed under either:

This means you can select the license you prefer!

🐦 Why call it Peng?

Peng (鵬/鹏, péng), or Dapeng (大鵬), represents a mythical Chinese bird that transforms from a giant Kun (鯤/鲲) fish. This name reflects our framework's adaptability and transformative capabilities.

📝 Blog Posts

📚 Citation

If you use this project in your research or work, please cite it as follows:

@software{peng_quad,
  author       = {Yang Zhou},
  title        = {Peng: A Minimal Quadrotor Autonomy Framework in Rust},
  year         = {2024},
  publisher    = {GitHub},
  journal      = {GitHub repository},
  howpublished = {\url{https://github.com/makeecat/peng}},
}

Dependencies

~25–56MB
~1M SLoC