[HN Gopher] Peng - A minimal Rust-based quadrotor simulation pip...
       ___________________________________________________________________
        
       Peng - A minimal Rust-based quadrotor simulation pipeline
        
       Author : Tycho87
       Score  : 127 points
       Date   : 2024-08-21 14:13 UTC (5 days ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | high_priest wrote:
       | All this in one main.rs! Holy moly!
        
         | stavros wrote:
         | All this in 1200 lines! How?
        
           | dragonelite wrote:
           | It helps that they are using an external visualisation tool.
        
             | ustad wrote:
             | which one?
        
               | filmor wrote:
               | https://rerun.io/
               | 
               | Quite obvious, if you scroll to the "Getting Started"
               | section.
        
       | dj_mc_merlin wrote:
       | > Why call it Peng?
       | 
       | > Peng (traditional Chinese: Peng ; simplified Chinese: Peng ;
       | pinyin: peng; Wade-Giles: p'eng) or Dapeng (Da Peng ) is a giant
       | bird that transforms from a Kun (Kun ; Kun ; kun; 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..
        
         | soylentcola wrote:
         | I'd just assumed that "Ni" and "Neee-wom" were already taken.
        
         | unclad5968 wrote:
         | I was curious. Seems like peng the British slang has Jamaican
         | origins, maybe.
         | 
         | https://english.stackexchange.com/a/66906
        
         | nescioquid wrote:
         | It's also the sound a gun makes when it's fired (in German).
         | There's a pipeline-related joke in there somewhere.
        
         | faitswulff wrote:
         | Oh huh, my brain went to peng Peng  for Peng Dao  first,
         | meaning "to collide."
        
       | bbno4 wrote:
       | I was hoping it would be called "Peng" because the simulation is
       | attractive
        
       | yangrobotics wrote:
       | I am the author of this toy project. My personal website is
       | [here]((https://yangrobotics.com). Thank you all for your
       | interest! This project began as an effort to mentor a talented
       | high school student in learning Rust and robotics. During the
       | process, I realized that there was a lack of educational
       | materials available online.
       | 
       | 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.
        
         | simojo wrote:
         | 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!
        
         | rozgo wrote:
         | 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.
        
           | yangrobotics wrote:
           | 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!
        
             | rozgo wrote:
             | panoc, fast, efficient, good for real-time, embedded, and
             | adaptive control.
             | 
             | I'll check what I can dig up for Rust examples.
        
       | kosvke wrote:
       | This is awesome, big fan of seeing more rust robotics happen and
       | challenging the status quo of C/C++/Python in robotics
        
       | yangrobotics wrote:
       | Also want to recommend https://github.com/peterkrull/quad for
       | quadrotor firmware and low-level implementation!
        
       ___________________________________________________________________
       (page generated 2024-08-26 23:00 UTC)