古人智慧

Just Do it!
上士聞道,勤而行之;中士聞道,若存若亡;下士聞道,大笑之。不笑,不足以爲道。
~ 道德經 41

搜尋此網誌

Translation

2015年7月26日 星期日

[ArduPilot] building the Firmware


Ubuntu

regis@lemaker:~$ sudo apt-get install gawk
regis@lemaker:~$ git clone https://github.com/diydrones/ardupilot
regis@lemaker:~$ ardupilot/Tools/scripts/install-prereqs-ubuntu.sh -y
regis@lemaker:~$ cd ardupilot/ArduCopter
regis@lemaker:~/ardupilot/ArduCopter$ make

Targets
 -------
  apm1 - the APM1 board
  apm2 - the APM2 board
  px4-v1 - the PX4v1 board
  px4-v2 - the Pixhawk
  pxf - the Beagle Bone Black (BBB) + PXF cape combination
  navio - the RaspberryPi + NavIO cape combination
  linux - a generic Linux build
  flymaple - the FlyMaple board
  vrbrain - the VRBrain boards
  sitl - the SITL Software In The Loop simulation
  bbbmini - the Beagle Bone Black mini

regis@lemaker:~/ardupilot/ArduCopter$ make linux





Setting up SITL on Linux
Tool chain:
sudo apt-get install libtool automake autoconf libexpat1-dev
sudo apt-get install python-matplotlib python-serial python-wxgtk2.8 python-lxml
sudo apt-get install python-scipy python-opencv ccache gawk git python-pip python-pexpect
sudo pip install pymavlink MAVProxy
sudo pip install --upgrade pymavlink MAVProxy

source code:
git clone git://github.com/tridge/jsbsim.git

build process:
cd jsbsim/
git pull
./autogen.sh --enable-libraries
make

modify the file .bashrc 
regis@lemaker:~$ nano .bashrc

# add by Regis for SITL, 2015-06-20
export PATH=$PATH:$HOME/jsbsim/src
export PATH=$PATH:$HOME/ardupilot/Tools/autotest
export PATH=/usr/lib/ccache:$PATH

regis@lemaker:~$ . ~/.bashrc
regis@lemaker:~$ cd ardupilot/ArduCopter/
regis@lemaker:~/ardupilot/ArduCopter$ sim_vehicle.sh -w


upload the firmware to PX4 board
make px4-v2-upload


沒有留言:

張貼留言