29 lines
		
	
	
		
			616 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			616 B
		
	
	
	
		
			Python
		
	
	
	
	
	
import openapi
 | 
						|
 | 
						|
hr = openapi.hr
 | 
						|
 | 
						|
# 一、设置/检测机器人状态:
 | 
						|
#   1. 上电
 | 
						|
#   2. 软限位打开
 | 
						|
#   3. 示教器断开
 | 
						|
#   4. 操作模式
 | 
						|
#   5. 控制器状态/工作任务控件/机器人动态
 | 
						|
 | 
						|
# 二、加载RL程序开始运行
 | 
						|
 | 
						|
 | 
						|
# 三、运行过程中,收集数据,并处理出结果
 | 
						|
 | 
						|
# 四
 | 
						|
 | 
						|
 | 
						|
# _id = hr.excution("state.get_state")
 | 
						|
# print(hr.get_from_id(_id))
 | 
						|
# _id = hr.excution('state.set_tp_mode', tp_mode='without')
 | 
						|
# print(hr.get_from_id(_id))
 | 
						|
 | 
						|
_id = hr.excution('device.get_params')
 | 
						|
print(hr.get_from_id(_id))
 | 
						|
# _id = hr.excution('state.switch_motor_on')
 | 
						|
# print(hr.get_from_id(_id))
 |