TeeterBot is a self-balancing robot simulation model for ROS / Gazebo. The dimensions and mass of each component are easily configured using launch file arguments, so it is easy to adjust physical parameters to test robustness of control algorithms.
This repository is modified from the original teeterbot repository to implement a sel-balancing controller.
Please note that the robot is purposely made to lose balance by driving it at high velocities or suddenly changing velocities -- this causes large deviations from the linear approximation and leads to loss of balance
out2.mp4
- Clone this repository to your workspace
git clone [email protected]:othayoth/teeterbot.git
- Install the ROS Package
teleop_twsit_keyboard
. Follow instructions here - Build your catkin workspace using command
$ catkin_make
- Source your
setup.bash
file from your catkin workspace
source devel/setup.bash
- Run the following launch file
roslaunch teeterbot_gazebo teeterbot_control.launch
- In a separate terminal, start the teleoperation node
rosrun teleop_twist_keyboard teleop_twist_keyboard.py
- Use the instructions in terminal in which
teleop_twist_keyboard
is running to change the forward and turning speed of the robot. - At the default turning and forward speeds specified by the node, the robot moves stably, even when directions are changed.
- Sudden stops and starts become unstable at pure forward translation beyond ~4.5 m/s (this may reduce when the robot simultaneously turns and translates)
Because the two wheeled inverted pendulum (TWIP) is a standard control problem and has been solved previously, I consulted existing solutions to implement the self- balancing for the robot. The specific solution is borrowed from the undergraduate thesis of Ashish Katariya. The document is available online.