代码拉取完成,页面将自动刷新
import amov_gimbal_sdk_python
amov_gimbal=amov_gimbal_sdk_python.GimbalInterface()
amov_gimbal.OpenSerial("/dev/ttyUSB0",115200)
roll_rate=50
pitch_rate=50
yaw_rate=50
roll=30
pitch=30
yaw=30
while True:
input_data=input("Please enter a number: ")
if input_data=='1':
amov_gimbal.CameraControl(1)
print("Camera take photo")
elif input_data=='2':
amov_gimbal.CameraControl(2)
print("Camera start/stop record")
elif input_data=='3':
amov_gimbal.GimbalAngleControl(roll_rate,pitch_rate,yaw_rate,roll,pitch,yaw)
print("Gimbal Angle Control \n \t Gimbal roates to :\n \t ROLL 10°\n \t PITCH 10°\n \t YAW 10°")
elif input_data=='4':
amov_gimbal.GimbalAngleRateControl(roll,pitch,yaw)
print("Gimbal Angle Rate Control \n \t Gimbal roates to :\n \t ROLL 10°\n \t PITCH 10°\n \t YAW 10° by rate 5°/s")
elif input_data=='5':
amov_gimbal.GetHome()
print("Gimbal Get Home")
elif input_data=='6':
print("Get Gimbal State:")
GetGimbalState=amov_gimbal.GetGimbalState()
print(GetGimbalState)
amov_gimbal.CloseSerial()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。