Peng – A minimal Rust-based quadrotor simulation pipeline(github.com)
github.com
Peng – A minimal Rust-based quadrotor simulation pipeline
https://github.com/makeecat/Peng
19 comments
Yang, this is really well done. I work with Rust and robotics all day, and would have never imagine seeing all this in one file. It is a great learning tool. If you complete the MPC controller it can also be a great learning tool for training AI pilots.
Do you have some suggestion for me to complete the MPC controller? Anything can help! For example: reference rust repo, optimization engine, optimization algorithm (linear / nonlinear). For nonlinear I am deciding between panoc and admm.
It is hard to demonstrate MPC in a simplistic way, but I want to take the challenge!
It is hard to demonstrate MPC in a simplistic way, but I want to take the challenge!
panoc, fast, efficient, good for real-time, embedded, and adaptive control.
I’ll check what I can dig up for Rust examples.
I’ll check what I can dig up for Rust examples.
Today marks the start of my robotics phd in a lab focused on trajectory optimization and optimal control. Coincidence I came across this? Nope. Go rust for robotics!
Also want to recommend https://github.com/peterkrull/quad for quadrotor firmware and low-level implementation!
I was hoping it would be called "Peng" because the simulation is attractive
This is awesome, big fan of seeing more rust robotics happen and challenging the status quo of C/C++/Python in robotics
All this in one main.rs! Holy moly!
All this in 1200 lines! How?
It helps that they are using an external visualisation tool.
which one?
https://rerun.io/
Quite obvious, if you scroll to the "Getting Started" section.
Quite obvious, if you scroll to the "Getting Started" section.
> Why call it Peng?
> Peng (traditional Chinese: 鵬; simplified Chinese: 鹏; pinyin: péng; Wade–Giles: p'eng) or Dapeng (大鵬) is a giant bird that transforms from a Kun (鯤; 鲲; kūn; k'un) giant fish in Chinese mythology.
Just a funny coincidence, in British slang, a bird is a woman, and being peng means being attractive..
> Peng (traditional Chinese: 鵬; simplified Chinese: 鹏; pinyin: péng; Wade–Giles: p'eng) or Dapeng (大鵬) is a giant bird that transforms from a Kun (鯤; 鲲; kūn; k'un) giant fish in Chinese mythology.
Just a funny coincidence, in British slang, a bird is a woman, and being peng means being attractive..
Oh huh, my brain went to peng 碰 for 碰到 first, meaning "to collide."
[deleted]
I'd just assumed that "Ni" and "Neee-wom" were already taken.
I was curious. Seems like peng the British slang has Jamaican origins, maybe.
https://english.stackexchange.com/a/66906
https://english.stackexchange.com/a/66906
It's also the sound a gun makes when it's fired (in German). There's a pipeline-related joke in there somewhere.
In response, I set out to create a minimal example of quadrotor control and planning in Rust. I was inspired by [llm.c](https://github.com/karpathy/llm.c), which teaches complex topics with minimal code. My goal was to provide a similar experience, introducing the magic behind quadrotor autonomy with as little code as possible.
With the initial framework I developed, I am thrilled to see that my mentee is now able to work independently, experimenting with his own ideas in Rust!
I believe this codebase will be valuable for anyone who wants to:
a. Learn the principles behind quadrotor autonomy. Code robotics in Rust.
b. Explore the challenges of using Rust before incorporating it into their projects.
Throughout the development of this project, I have strived to work entirely within the Rust ecosystem. I am now convinced that Rust is ready for serious robotics development. Here are some tools I've been using:
1. [zed.dev](https://yangrobotics.com) for code editing.
2. [Rerun](rerun.io) for visualization.
3. [tokei](https://github.com/XAMPPRocky/tokei) for code line statistics.
4. [nalgebra](https://nalgebra.org) for matrix operations.
There are still a few things I'm searching for, such as a robust optimization library. Currently, I'm experimenting with [OpEn](https://alphaville.github.io/optimization-engine) for nonlinear model predictive control, but I hope to find something akin to [acados](https://github.com/acados) in Rust. Additionally, while nalgebra is solid, I believe it still doesn't outperform [Eigen](https://eigen.tuxfamily.org) in terms of performance, though Rust's language features might limit the possibility of implementing something like Eigen.
I'm open to suggestions and feedback! For instance, I’m still debating whether to modularize the pipeline and add async features, or whether to keep things simpler to avoid overwhelming beginner learners.
Current code statistics:
Rust: 1263
Markdown: 305
Comments: 19
Blanks: 44
PS: When naming the project "Peng," I had no idea that "peng" also means attractive! Well, I hope you find the project attractive too.