Skip to content

Latest commit

 

History

History
37 lines (30 loc) · 950 Bytes

README.md

File metadata and controls

37 lines (30 loc) · 950 Bytes

Linear Quadratic Regulator (LQR) Optimal Control of a Differential Drive Robot

The LQR control algorithm was used to generate optimal control input to send a Husarion robot to a goal pose by minimizing the state and input cost function. The desired goal was set to (x=1.0, y=1.0, theta=1.57).

Setup

  • Get the robot
mkdir -p ~/robot_ws/src
cd ~/robot_ws/src
git clone -b foxy https://github.com/husarion/rosbot_description.git
  • Get the LQR
cd ~/robot_ws/src
git clone https://github.com/siksal/control.git
  • Build the packages
cd ~/robot_ws
colcon build
source install/setup.bash

Simulation

  • Run the LQR for Rosbot
## Launch robot
ros2 launch rosbot_description rosbot_sim.launch.py

## Run LQR in another terminal/tab (remember to source the new terminal/tab)
ros2 run control lqr

Result:

lqr.mp4