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 Parameters: msg – Message parameter in the function Returns: 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 Parameters: condition_enum – Event type, ``rm_define.cond_ir_hit_detection’’ indicates that the robot is under attack by infrared beams Returns: 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 Parameters: condition_enum – Event type, ``rm_define.cond_ir_hit_detection’’ indicates that the robot is under attack by infrared beams Returns: Whether the robot is under attack by infrared beams. If yes, true is returned. If no, false is returned. Return type: 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