A real-time inverted pendulum (cart-pole) simulation written in C using Raylib.
- Automatic Control: Uses an LQR controller to balance the pole upright.
- Manual Control: Apply forces manually using the keyboard.
- Physics: Implements rigid-body dynamics using semi-implicit Euler integration.
-
C- Toggle between Manual and Automatic control modes. -
Left/RightArrow keys - Move the cart or adjust the target position ($x_{ref}$ ).
Requires Raylib installed on your system.
make # Compile the project
make run # Compile and run immediately
make clean # Remove build files