Skip to content

Control feedback with linearization and neural network for an inverted pendulum (single and on a cart)

License

Notifications You must be signed in to change notification settings

azimonti/inverted-pendulum

Repository files navigation

Inverted pendulum

Control feedback with linearization and neural network for an inverted pendulum (single and on a cart)

Required Tools

  • Git
  • CMake
  • clang
  • curl
  • Fortran
  • HDF5
  • OpenGL
  • GLEW
  • GLFW
  • Dear ImGui
  • implot

Getting Started

To get started with the control feedback:

  1. Clone the repository:
    git clone https://github.com/azimonti/inverted-pendulum
    
  2. Navigate to the repository directory:
    cd inverted-pendulum
    
  3. Initialize and update the submodules:
git submodule update --init --recursive

Further update of the submodule can be done with the command:

git submodule update --remote
  1. Compile the libraries in ma-libs
cd externals/ma-libs
# optional steps if dependencies are not installed globally
# ./manage_dependency_libraries.sh -d
# ./manage_dependency_libraries.sh -b
./cbuild.sh --build-type Debug --cmake-params "-DCPP_LIBNN=ON -DCPP_LIBGRAPHIC_ENGINE=ON"
./cbuild.sh --build-type Release --cmake-params "-DCPP_LIBNN=ON -DCPP_LIBGRAPHIC_ENGINE=ON"
cd ../..

If any error or missing dependencies please look at the instructions here

  1. Compile the binaries
./cbuild.sh -t Release (or -t Debug)
  1. Run the programs
./build/Release/pendulum_cart
./build/Release/pendulum

Screenshot 2 dimensional

Pendulum

Pendulum Cart

Screenshot 3 dimensional

Pendulum

Pendulum Cart