Skip to content

The goal of this application is to develop a LQR based controller to balance an inverted pendulum. This application is developed as part of the second homework assignment in the course SES 598: Autonomous Exploration Systems at Arizona State University. The LQR function is provided by the python-controls toolbox.

Notifications You must be signed in to change notification settings

Mannat-Rana/LQR-Control-For-Inverted_Pendulum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

LQR Control Application for an Inverted Pendulum SHIELD ros PYTHON

About

The goal of this application is to develop a LQR based controller to balance an inverted pendulum. This application is developed as part of the second homework assignment in the course SES 598: Autonomous Exploration Systems at Arizona State University. The LQR function is provided by the python-controls toolbox.

Code was tested on Ubuntu 20.04 running ROS Noetic.

Demonstration

py_lqr_invpend_demo(1)

To Install Python Control Toolbox

pip3 install control

To Install ROS Package

This package relies on a Gazebo simulation of an inverted pendulum. Please visit the follow repository and follow their instructions for setting up the simulation components: https://github.com/linZHank/invpend_experiment.

cd ~/catkin_ws/src
https://github.com/Mannat-Rana/LQR-Control-For-Inverted_Pendulum.git
catkin build lqr_invpend_control
sudo chmod +x LQR-Control-For-Inverted_Pendulum/lqr_invpend_control/src/lqr_invpend_control.py
cd ~/catkwin_ws
source devel/setup.bash

To Run

roslaunch lqr_invpend_control lqr_invpend_control.launch

Once the simulation opens, select the pole link, and apply forces and torques to it as desired for testing. Robustness of the controller can be tweaked by modifying the Q and R matrices in the source file.

About

The goal of this application is to develop a LQR based controller to balance an inverted pendulum. This application is developed as part of the second homework assignment in the course SES 598: Autonomous Exploration Systems at Arizona State University. The LQR function is provided by the python-controls toolbox.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published