3.9. Armor Plate¶
-
def ir_hit_detection_event(msg):
Description: After detecting the robot is under attack by infrared beams, run the program in the function 参数: msg – Message parameter in the function 返回: None Example:
1 2 3 4 | #After detecting that the robot is under attack by infrared beams, run the program in the function.
def ir_hit_detection_event(msg):
pass
|
-
armor_ctrl.
cond_wait
(condition_enum)¶ Description: When the waiting robot is under attack by infrared beams, execute the next instruction 参数: condition_enum – Event type, ``rm_define.cond_ir_hit_detection’’ indicates that the robot is under attack by infrared beams 返回: None Example: armor_ctrl.cond_wait(rm_define.cond_ir_hit_detection)
Example description: When the waiting robot is under attack by infrared beams, execute the next instruction
-
armor_ctrl.
check_condition
(condition_enum)¶ Description: Determine whether the robot is under attack by infrared beams 参数: condition_enum – Event type, ``rm_define.cond_ir_hit_detection’’ indicates that the robot is under attack by infrared beams 返回: Whether the robot is under attack by infrared beams. If yes, true is returned. If no, false is returned. 返回类型: bool Example: if armor_ctrl.check_condition(rm_define.cond_ir_hit_detection):
Example description: If the robot is under attack by infrared beams, execute the next instruction