108
Note:
The returned value indicates the section of the armor that has been hit:
ID=1: Chassis rear
ID=2: Chassis front
ID=3: Chassis left side
ID=4: Chassis right side
ID=5: Gimbal left side
ID=6: Gimbal right side
Python API:
Function: armor_ctrl.get_last_hit_index()
Return value:
● index(int)
Function: armor_ctrl.get_last_hit_time()
Return value:
● time(float)
(1) Objective: Continuously detects hit sections on a specific armor section. When the armor is hit, “True” is
returned; otherwise, “False” is returned.
(2) Returned value: Boolean
(3) Example: Configure quick retreat
If the left side of the chassis is hit, the robot will retreat by moving to the right; if the front of the chassis is
hit, the robot will retreat by moving backward.