Figure 5-4 LED7 lights on
5.4 Attitude Control
The robot can perform posture recognition in real time through the acceleration sensor and
the gyroscope, and achieve balance by controlling the motors and adjusting the posture.
For example, pick up the robot, it will detect that its current state is not in a horizontal state,
when the robot is placed on a horizontal plane, the robot will access its current balance
status and adjust accordingly and keeping it in balanced state without any external help. If
an external force causes the robot to tilt forward, the motors will quickly produce the
forward motion torque to compensate for the angle of the tilt and maintain the balance of
the robot. If an irregular object is placed on the robot, the robot body willmaintain balance.
12
Self-Balancing Robot_Getting_Started_Guide
www.terasic.com.cn