Git Product home page Git Product logo

riddle911 / ardupilot-raspilot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kaiqzhan/ardupilot-raspilot

0.0 2.0 0.0 67.56 MB

APM Plane, APM Copter, APM Rover source

Home Page: http://ardupilot.com/

License: GNU General Public License v3.0

C++ 54.07% Makefile 1.57% Processing 0.26% C 36.20% Shell 0.81% Pascal 0.36% Objective-C 0.21% Lua 0.76% OpenEdge ABL 0.11% Batchfile 0.07% Python 3.81% C# 0.09% Perl 0.12% CSS 0.04% HTML 0.07% MATLAB 1.30% CMake 0.01% EmberScript 0.17%

ardupilot-raspilot's Introduction

#树莓派飞控RasPilot#

###RasPilot硬件参数### 特性

  • 支持树莓派1 A+/B+;树莓派2 B+
  • STM32F103 failsafe co-processor
  • ardupilot飞控代码
  • pixhawk接口兼容
  • USB(RPi) / Servo Rail BEC / Power Module三路电源输入

传感器

  • ST Micro L3GD20H 16位陀螺仪
  • ST Micro LSM303D 14位加速度计/磁力计
  • Invensense MPU 6000 3轴陀螺仪/加速度计
  • MEAS MS5611 气压计

接口

  • 2x UART
  • 1x CAN
  • 8x PWM
  • Spektrum DSM / DSM2 / DSM-X® Satellite 兼容接收机
  • Futaba S.BUS® 兼容输入输出
  • PPM sum 接收机
  • RSSI(PWM或电压)输入
  • 1x I2C
  • 3.3V & 6.6V A/D输入
  • 安全开关
  • 蜂鸣器接口
  • 板载三色LED

###硬件安装和接线### 1 安装外壳。如下图,用铜柱和螺母将树莓派固定在底壳上。插上飞控扩展板,再用螺丝固定上壳。


2 接口说明:


3 减震安装
震动对飞控的定高性能影响很大,安装时需注意对飞控做好减震处理。

###写入系统镜像到树莓派SD卡### 树莓派官方的Linux系统实时性不适合运行飞控程序,因此要使用打了RT-patch的系统镜像。
首先下载和解压Linux系统的镜像文件。从以下网盘链接下载,树莓派1代和2代都可以使用。

 百度网盘:http://pan.baidu.com/s/1bnHd1TH
 Mega网盘:https://mega.co.nz/#!UFY12ThQ!DdoBzoeMr_CxjWLAkw0coiKxN1D_Q3OuNje-NBegYcQ

然后按照树莓派的官方教程将镜像文件写入SD卡:

 Linux:https://www.raspberrypi.org/documentation/installation/installing-images/linux.md
 Mac OS:https://www.raspberrypi.org/documentation/installation/installing-images/mac.md
 Windows:https://www.raspberrypi.org/documentation/installation/installing-images/windows.md
 其它帮助文档:https://www.raspberrypi.org/documentation/

或者可以百度,有很多中文教程。

###安装和设置飞控程序### 1 下载飞控程序
 ArduCopter.elf 百度网盘下载地址:http://pan.baidu.com/s/1pJ3hQNT (2015—07-27更新)(1、2代树莓派均可使用)
 下载后放到树莓派用户根目录,即/home/pi目录中。
 然后,修改ArduCopter.elf可执行权限:
 chmod +x ArduCopter.elf

2 运行飞控程序
 sudo ./ArduCopter.elf -B /dev/ttyAMA0
 ArduCopter.elf可以带-A -B -C -E四个参数,其中:
 * -A primary数传接口
 * -B primary GPS接口
 * -C secondary数传接口
 * -E sencondary GPS接口
 raspilot中:-B 即GPS的串口使用树莓派自带的串口/dev/ttyAMA0,波特率自适应;
 -C 默认是STM32扩展的串口,作为数传接口。波特率默认为57600,可以在Mission Planner界面中进行配置。

 如果要使用WiFi的udp作为数传的话,可以输入:
 sudo ./ArduCopter.elf -A udp:192.168.1.100:14550 -B /dev/ttyAMA0
 其中192.168.1.100改为PC端的IP地址

3 设置开机自动运行
 修改/etc/rc.local文件,在exit 0前加入:
 sudo ./home/pi/ArduCopter.elf -B /dev/ttyAMA0 > /home/pi/startup_log &
 重新启动后飞控程序就会自动运行

###编译飞控代码### 从Copter-3.3开始,ardupilot的编译需要使用4.7版本以上的gcc。而树莓派系统上还是4.6版本的gcc,所以建议在Ubuntu下面交叉编译代码。 这里使用树莓派官方提供的交叉编译工具

1 下载树莓派编译工具,例如这里放到/opt目录下
 sudo git clone --depth 1 https://github.com/raspberrypi/tools.git /opt/tools

2 设置环境变量
 32位系统输入:export PATH=/opt/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin:$PATH
 64位系统输入:export PATH=/opt/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin:$PATH

3 编译ardupilot

  • 从GitHub上获取源代码:
     git clone https://github.com/raspilot/ardupilot-raspilot.git
  • 进入ArduCopter目录后编译:
     cd ardupilot-raspilot/ArduCopter
     make raspilot
  • 通过WiFi同步到树莓派:
     rsync -avz /tmp/ArduCopter.build/ArduCopter.elf [email protected]:/home/pi/
     其中192.168.1.100改为树莓派的实际IP地址

ardupilot-raspilot's People

Contributors

a432511 avatar aantonop avatar akdslr avatar amilcarlucas avatar arthurbenemann avatar bugobliterator avatar chapman avatar dougweibel avatar emilecastelnuovo avatar geeksville avatar gmorph avatar jason4short avatar jgoppert avatar johnarnebirkeland avatar jschall avatar lthall avatar lukemike avatar mday299 avatar meee1 avatar mikemccauley avatar neurocopter avatar pchickey avatar priseborough avatar r-lefebvre avatar raspilot avatar rmackay9 avatar staroselskii avatar tridge avatar vmayoral avatar zlite avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.