fix: up
This commit is contained in:
		
							parent
							
								
									84cca7b2b6
								
							
						
					
					
						commit
						ae8e12bf74
					
				
							
								
								
									
										22
									
								
								main.py
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								main.py
									
									
									
									
									
								
							@ -60,31 +60,12 @@ def main():
 | 
			
		||||
    msg = robot_control_cmd_lcmt()
 | 
			
		||||
    print('2')
 | 
			
		||||
    try:
 | 
			
		||||
        # TEST
 | 
			
		||||
        # print('yuyin')
 | 
			
		||||
        # cv_image = Ctrl.image_processor.get_current_image('ai')
 | 
			
		||||
        # print('111')
 | 
			
		||||
        # cv2.imwrite(f"saved_images/firstai.jpg", cv_image)
 | 
			
		||||
        # print('try out')
 | 
			
		||||
        # speak('nihao')
 | 
			
		||||
 | 
			
		||||
        # TEST
 | 
			
		||||
        # go_straight_with_enhanced_calibration(Ctrl, msg, distance = 5, speed=0.5, observe=False, mode=11, gait_id=3, step_height=[0.21, 0.21])
 | 
			
		||||
        # pass_up_down(Ctrl, msg)
 | 
			
		||||
        # pass_bar(Ctrl, msg)
 | 
			
		||||
        # run_task_2(Ctrl, msg)
 | 
			
		||||
 | 
			
		||||
        # INFO Real Task
 | 
			
		||||
        # TAG task - 0
 | 
			
		||||
        info("Recovery stand", "info")
 | 
			
		||||
        Ctrl.base_msg.stand_up()
 | 
			
		||||
        Ctrl.base_msg.stop()  # BUG 垃圾指令 for eat # INFO 但是正式比赛或许也有用
 | 
			
		||||
        
 | 
			
		||||
        # image = Ctrl.image_processor.get_current_image('ai')
 | 
			
		||||
        # timestamp = datetime.now().strftime("%Y%m%d_%H%M%S_%f")
 | 
			
		||||
        # filename = f"saved_images/rgb_{timestamp}.jpg"
 | 
			
		||||
        # cv2.imwrite(filename, image)
 | 
			
		||||
 | 
			
		||||
        if TASK == TaskType.PASS_BAR:
 | 
			
		||||
            from task_4.pass_bar import pass_bar
 | 
			
		||||
            # TEST #1: pass-bar
 | 
			
		||||
@ -108,9 +89,6 @@ def main():
 | 
			
		||||
        elif TASK == TaskType.CENTER_ON_DUAL_TRACKS:
 | 
			
		||||
            from base_move.center_on_dual_tracks import center_on_dual_tracks
 | 
			
		||||
            center_on_dual_tracks(Ctrl, msg, max_deviation=10.0, observe=False, detect_height=0.3)
 | 
			
		||||
        else:
 | 
			
		||||
            return
 | 
			
		||||
        
 | 
			
		||||
        if TASK != TaskType.TASK:
 | 
			
		||||
            # 如果不是 task 类型,直接返回
 | 
			
		||||
            return
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user