3 Star 0 Fork 2

阿木实验室/Gimbal-SDK-Python

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
amov_gimbal_python.py 1.15 KB
一键复制 编辑 原始数据 按行查看 历史
dou 提交于 2022-07-18 10:44 . add get gimbal state
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()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/amovlab1/gimbal-sdk-python.git
git@gitee.com:amovlab1/gimbal-sdk-python.git
amovlab1
gimbal-sdk-python
Gimbal-SDK-Python
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385