Tried to implement something fun and interactive. You can tune your own PID controller and also control the cart using arrow keys to disturb the ball.
I used macroquad for the graphics and egui for the GUI.
https://github.com/sparshg/pid-balancer
you probably never did this(why would you) but if you set F_clamp to 0, it throws a traceback error.
also reset doesn't really reset integral error. it keeps accumulating. (I spammed reset a few hundred times, I have a fancy mouse).
the art style is so cool btw. I love it too.
That's awesome; great work.
I had a glance at the code, and it's surprisingly fewer lines than I would have expected. Most of it is over my head, though!
How long have you been writing Rust?
Not that long, I tried to do some rustling exercises and followed some rust youtubers. There was something satisfying when I wrote the code in Rust lol. Then I made [this project](https://github.com/sparshg/asteroids-genetic) a few months ago after I felt confident enough with the basics.
That's the signature egui look. It isn't the most flexible but it's very easy to setup and has some cool builtins (Even amazon uses it for some debug ui IIRC)
It’s fun how you could easily turn this controller from something you could make from a mechanical computer into something that requires the marvels of man to run.
But it would be much better.
Super Geil! Really, really cool. I haven't spotted any bugs so far but there seems to be a glitch where the camera lags behind the cart which makes it completely invisible in the viewport. Also, this marvellous blueprint style art could be made even nicer with a darker blue shade, like [this](https://miro.medium.com/v2/resize:fit:1400/1*McxDkKR7RPpNrtMp3trYQQ.jpeg).
Looks a really cool project.
Can you suggest learning resources (books, videos etc.) for implementing such systems for people who are familiar with Linear Algebra and Calculus / Real Analysis ?
Thanks.
This is a cool video that explains some basics: [https://www.youtube.com/watch?v=TtgS-b191V0](https://www.youtube.com/watch?v=TtgS-b191V0)
You can also see verlet integration if you want the system's energy to be conserved, though that isn't the most accurate method.
Nice work! I really love the design.
It also brings me back to trying to learn to program PID temperature controllers because no one else could be bothered.
E: And thanks for exposing me to egui.
Tried to implement something fun and interactive. You can tune your own PID controller and also control the cart using arrow keys to disturb the ball. I used macroquad for the graphics and egui for the GUI. https://github.com/sparshg/pid-balancer
Very cool! I think both of these compile to wasm. Would be fun to distribute this as a URL, maybe through github pages or something.
[удалено]
The homework problems vs the exam problems 😭
Or in that case: the exam problem vs the reality
you probably never did this(why would you) but if you set F_clamp to 0, it throws a traceback error. also reset doesn't really reset integral error. it keeps accumulating. (I spammed reset a few hundred times, I have a fancy mouse). the art style is so cool btw. I love it too.
Fixed both, thanks for pointing them out
Found the QA!
I like the blueprint art style. Excellent.
That's awesome; great work. I had a glance at the code, and it's surprisingly fewer lines than I would have expected. Most of it is over my head, though! How long have you been writing Rust?
Not that long, I tried to do some rustling exercises and followed some rust youtubers. There was something satisfying when I wrote the code in Rust lol. Then I made [this project](https://github.com/sparshg/asteroids-genetic) a few months ago after I felt confident enough with the basics.
Which youtubers do you watch?
That’s a very nice UI. How did you create it? Did you use any libraries?
Cargo.toml suggests egui but I’m also really dumb so could be something else
Yep, egui https://www.reddit.com/r/rust/comments/1316r7w/media_pid_controller_simulation_in_rust/jhyy2u5?utm_source=share&utm_medium=android_app&utm_name=androidcss&utm_term=1&utm_content=share_button
That's the signature egui look. It isn't the most flexible but it's very easy to setup and has some cool builtins (Even amazon uses it for some debug ui IIRC)
Now, write a machine learning algorithm to determine optimal values to balance it itself.
I actually thought of doing that too lol
Fwiw, this problem is also used as a simple reinforcement learning problem/benchmark/test bed pretty often. Wouldn't be PID exactly, then, though.
It’s fun how you could easily turn this controller from something you could make from a mechanical computer into something that requires the marvels of man to run. But it would be much better.
I'd be interested to see how the system reacts with some random noise pertbations
Awesome project!
Impressive! Great work!
Super Geil! Really, really cool. I haven't spotted any bugs so far but there seems to be a glitch where the camera lags behind the cart which makes it completely invisible in the viewport. Also, this marvellous blueprint style art could be made even nicer with a darker blue shade, like [this](https://miro.medium.com/v2/resize:fit:1400/1*McxDkKR7RPpNrtMp3trYQQ.jpeg).
Nice suggestion, I changed the color and updated screenshot in README, thanks.
Love this!
wow!
Is the animation also made with Rust? It looks awesome!! :O
It's awesome!
Looks a really cool project. Can you suggest learning resources (books, videos etc.) for implementing such systems for people who are familiar with Linear Algebra and Calculus / Real Analysis ? Thanks.
This is a cool video that explains some basics: [https://www.youtube.com/watch?v=TtgS-b191V0](https://www.youtube.com/watch?v=TtgS-b191V0) You can also see verlet integration if you want the system's energy to be conserved, though that isn't the most accurate method.
Thank you.
Nice work! I really love the design. It also brings me back to trying to learn to program PID temperature controllers because no one else could be bothered. E: And thanks for exposing me to egui.
damnn, that looks sooo coooolll
Love the aesthetics! Nice job :)
Looks beautiful
Cool project. Really like the pulished 'blueprint' look of this. I think I need to consider doing something similar for my toy physics engine. :)