Ubuntu+DroneKit Python配置
来源:互联网 发布:android股票k线图源码 编辑:程序博客网 时间:2024/06/10 18:16
安装
sudo apt-get install python-py python-dev
用pip来安装dronekit和dronekit-sitl
#如果没有pip ,先安装python-pip#如果用的是Anaconda,需要把第三方包从Ubuntu自带的地方移到Anaconda下,先删掉,然后直接在普通用户下pip installsudo apt install python-pipsudo pip install dronekitsudo pip install dronekit-sitl
- Dronekit 不支持Python3.0
- DroneKit-SITL 是一种模拟器,通过本地IP网络使用MAVLink进行通信,
- DroneKit-SITL目前仅为Mac,Linux和Windows提供x86二进制文件。您不能在像RaPi(树莓派)这样的ARM平台上运行它。
运行示例
获取DroneKit-Python示例源代码到本地计算机上
git clone http://github.com/dronekit/dronekit-python.git
运行显示车辆状态示例(链接模拟器)
cd dronekit-python / examples / vehicle_state /python vehicle_state.py
在DroneKit脚本中可以设置与无人机的连接,导入脚本并调用connect()
方法。连接后,返回一个Vehicle
对象,可以从中获取或者设置无人机的参数和属性,控制无人机移动。
- 调用示例如下
from dronekit import connect# Connect to the Vehicle (in this case a UDP endpoint)vehicle = connect('127.0.0.1:14550', wait_ready=True)参数一:目标地址参数二:wait_ready用于确定连接是立即返回与否。默认Ture
【连接字符串选项】
上面的字符串与连接MAVProxy GCS时使用的字符串相同,可连接到多个车辆。
- 如果想要用示例连接一个指定的无人机,例如Solo的无人机
python vehicle_state.py --connect udpin:0.0.0.0:14550
64位的ubuntu运行不了示例,很气
1 0
- Ubuntu+DroneKit Python配置
- Ubuntu Python 环境配置
- ubuntu 配置python环境
- Ubuntu配置python
- 树莓派+dronekit
- Ubuntu安装配置Python.pyDev
- ubuntu 下vim 配置python
- 初用ubuntu配置python环境
- Ubuntu下python 配置mysql
- ubuntu 14.04 Python 配置MySQL
- ubuntu sublime text3 python 配置
- ubuntu uwsgi nginx Python 配置
- linux(ubuntu)安装python配置
- ubuntu sublime text3 python 配置
- Ubuntu 16.04 下配置Python
- Windows10+DroneKit+Python2.7
- Django + Python环境配置(Ubuntu)
- Ubuntu 下 vim 搭建python 环境 配置
- kmp模板
- 发布到Maven仓库
- 分数的四则运算
- 如何从100万个数中找出最大的前100个数
- iOS-苹果应用商店审核指南中文翻译
- Ubuntu+DroneKit Python配置
- IT自学干货
- C语言异常处理
- OpenGL ES总结(六)OpenGL ES中EGL
- 如何优雅的为你的app添加启动引导页
- 关于fopen函数中的打开模式(以写的方式总是打开失败)
- Linux下which、whereis、locate、find命令的区别
- PAT-A 1081. Rational Sum (20)
- openmp简单介绍以及使用实例(整理)