UAV-5--链接飞控以及配置SITL以及ardupilot环境

linux系统链接飞控以及配置SITL以及ardupilot环境

先更改本机host到对象的ip

image-20220506142641457

再进行ssh的链接

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-meuTGFrN-1651933771950)(https://s2.loli.net/2022/05/07/eY3L84RVOZF6MrS.png)]

链接成功进入系统

image-20220506142746742

链接飞控

image-20220506143036254

from dronekit import connect 

# Connect to the Vehicle (in this case a UDP endpoint) 后边那个baud是波特率
vehicle = connect('/dev/ttyUSB0', wait_ready=True, baud=921600) 

# vehicle is an instance of the Vehicle class

print "Autopilot Firmware version: %s" % vehicle.version

print "Autopilot capabilities (supports ftp): %s" % vehicle.capabilities.ftp

print "Global Location: %s" % vehicle.location.global_frame

print "Global Location (relative altitude): %s" % vehicle.location.global_relative_frame

print "Local Location: %s" % vehicle.location.local_frame    #NED

print "Attitude: %s" % vehicle.attitude

print "Velocity: %s" % vehicle.velocity

print "GPS: %s" % vehicle.gps_0

print "Groundspeed: %s" % vehicle.groundspeed

print "Airspeed: %s" % vehicle.airspeed

print "Gimbal status: %s" % vehicle.gimbal

print 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值