
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.
Summary of Contents for RoboMaster EP
Page 1: ......
Page 2: ...1 ...
Page 10: ...9 Before running the enlarge camera frame program After enlarging the camera frame ...
Page 45: ...44 Python API Function chassis_ctrl is_impact Return value impact_status bool ...
Page 53: ...52 Follow arrow markers ...
Page 67: ...66 It can be observed from the FPV window that it takes about 2 1 seconds ...
Page 76: ...75 ...
Page 78: ...77 or ...
Page 105: ...104 Function media_ctrl get_sight_bead_position Return value sight_bead_position list ...
Page 116: ...115 ...
Page 131: ...130 ...
Page 149: ...148 You can check results using the FPV window ...
Page 159: ...158 ...
Page 165: ...164 1 Objective Creates and names a list 2 Type Settings block 3 Example Name a new list ...
Page 185: ...184 Python API Class rm_ctrl PIDCtrl Function get_output Return value output float ...