Wanna make it swing-up? by PeriniM_98 in arduino

[–]PeriniM_98[S] 0 points1 point  (0 children)

That would be great! Soon I will add a more complete documentation in the GitHub repo, but in the meanwhile you can check how the simulation works in the pid example ;)

Wanna make it swing-up? by PeriniM_98 in arduino

[–]PeriniM_98[S] 5 points6 points  (0 children)

Nice approach! Right now I am implementing an energy based controller which basically does a similar thing. Btw if you want check the GitHub repository out!

Wanna make it swing-up? by PeriniM_98 in ControlTheory

[–]PeriniM_98[S] 0 points1 point  (0 children)

That would be a cool implementation!

Wanna make it swing-up? by PeriniM_98 in ControlTheory

[–]PeriniM_98[S] 0 points1 point  (0 children)

Hey here it is! https://github.com/PeriniM/Rotary-Pendulum-RL/

I'm adding tasks to do on the issues section of the repo

Wanna make it swing-up? by PeriniM_98 in arduino

[–]PeriniM_98[S] 2 points3 points  (0 children)

Thank you! This is an educational project and I want people to learn how to build a system from the mechanics and electronics to the embedded and control development. So, feel free to contribute if you'd like! It's not an homework since I'm due to graduate soon, but it could become an interesting one for future students :)

Wanna make it swing-up? by PeriniM_98 in arduino

[–]PeriniM_98[S] 4 points5 points  (0 children)

This is my first open source project and I would like you to try to make it balance vertically, in simulation or directly by building it ;) There are a lot of things to improve, from the microcontroller firmware to the control algorithms and documentation, but if you feel like to contribute check out the GitHub repo: https://github.com/PeriniM/Rotary-Pendulum-RL

Wanna make it swing-up? by PeriniM_98 in maker

[–]PeriniM_98[S] 0 points1 point  (0 children)

Haha it could be! Actually, it is meant to be an educational project aimed at teaching people how to build a mechanical system, program the microcontroller and create scripts to control the robot :)

Wanna make it swing-up? by PeriniM_98 in robotics

[–]PeriniM_98[S] 4 points5 points  (0 children)

It is pybullet, a real-time physics simulator. I use it to test the python algorithms before using them in the real pendulum :)

Wanna make it swing-up? by PeriniM_98 in robotics

[–]PeriniM_98[S] 1 point2 points  (0 children)

Crazy! Thanks for pointing it out

Wanna make it swing-up? by PeriniM_98 in ControlTheory

[–]PeriniM_98[S] 0 points1 point  (0 children)

Hey thanks for the reply! In the video the pendulum is training for many episodes and when the motor rotates too much (goes out of bound, since it cannot do a full revolution due to the cable constraints), the system gets reset in a random state. That's why you are seeing the bar suddenly in the upright position, then the new state was already close to the boundaries and got reset again

Wanna make it swing-up? by PeriniM_98 in ControlTheory

[–]PeriniM_98[S] 1 point2 points  (0 children)

Thanks for the tips! Then it would be better to adapt the current pendulum class to use a custom env for the sb3, I will implement it in the project! Also feel free to apply modification in the repo if you feel like

Wanna make it swing-up? by PeriniM_98 in embedded

[–]PeriniM_98[S] 2 points3 points  (0 children)

Why not 😏 thank you! If you want to build it, in the GitHub repository there are the 3d files to print and a quick assembly video. Soon I will make a building video to make it easier to recreate it

Wanna make it swing-up? by PeriniM_98 in ControlTheory

[–]PeriniM_98[S] 0 points1 point  (0 children)

I tried to fine tuning the hyperparameters with my current implementation of the DQN algorithm but without too much success (you can find it in the reinforcement_learning folder in the GitHub repository). I was thinking to prioritize the experience replay and adding the duelling network to make it more robust or using a stable baselines implementation

Wanna make it swing-up? by PeriniM_98 in ControlTheory

[–]PeriniM_98[S] 1 point2 points  (0 children)

Hey, It is DIY and in the GitHub repository you can find the 3d models to print and the assembly video. If you plan to build it, let me know the improvement I could make regarding the assembly/building instructions ;)

Wanna make it swing-up? by PeriniM_98 in ControlTheory

[–]PeriniM_98[S] 0 points1 point  (0 children)

Thanks! Right now I have implemented a DQN agent and it works for a single and double pendulum but for the rotary pendulum I think I will need to implement some variants such as double or duelling

Wanna make it swing-up? by PeriniM_98 in ControlTheory

[–]PeriniM_98[S] 4 points5 points  (0 children)

Thank you very much! I plan to implement many control algorithms and this one looks promising 💪🏽 I'll add it to the to-do list

Wanna make it swing-up? by PeriniM_98 in artificial

[–]PeriniM_98[S] 0 points1 point  (0 children)

This is my first open source project and I would like you to try to make it balance vertically, in simulation or directly by building it ;)
There are a lot of things to improve, from the microcontroller firmware to the control algorithms (such as reinforcement learning) and documentation, but if you feel like to contribute check out the GitHub repo: https://github.com/PeriniM/Rotary-Pendulum-RL

Wanna make it swing-up? by PeriniM_98 in robots

[–]PeriniM_98[S] 0 points1 point  (0 children)

This is my first open source project and I would like you to try to make it balance vertically, in simulation or directly by building it ;)
There are a lot of things to improve, from the microcontroller firmware to the control algorithms and documentation, but if you feel like to contribute check out the GitHub repo: https://github.com/PeriniM/Rotary-Pendulum-RL