- Go to the workspace and source the project;
pendubot_ws
source install/setup.bash
- Launch the simulated gazebo robot;
ros2 launch pendubot_description gazebo_complete.launch.xml
- The run the controller on another bash:
colcon build --symlink-install
ros2 launch pendubot_lypunov_lqr lqr_swinger.launch.py
The symlink install allows for changing the gain parameters in the yaml file and them taking effect in real time:
/**:
ros__parameters:
K: [ -141.4214, -77.6558, -238.7684, -36.5906]
kd: 1.0 #||
ke: 0.001 #<-- <--
kp: 100.0 #--> -->
# 0.0 angle - upward position. When absolute angle is less than this threshold
# transition from swing up to LQR
lqr_transition_angle: 0.523599
- I can also have the following plotter:
ros2 run plotjuggler plotjuggler
Here are some dependancies you will need.
sudo apt-get install gazebo
sudo apt install ros-humble-gazebo-ros-pkgs
sudo apt install ros-humble-gazebo-ros2-control
TODO: I might add an initializer where I have a force to one direction at first to have a large initial oscillation before starting the project or I might just start at an angle to save time.