Building for Erle-Brain 2



Building for Erle-Brain 2

These instructions explain how to build ArduPilot on board the Erle-Brain 2.

Note:
Alternatively you can follow Erle-Robotics’s instructions on how to build from source on your PC.

Connection and setup

Give Erle-Brain Internet access by plugging the Ethernet wire into the RJ-45 connector.

Connect to Erle-Brain 2:

$ ssh erle@erle-brain-2.local
Tip:
More info about connection methods in manufacturers documentation

Clone the source:

#Move to home
cd ~/
#Clone the repository in home
git clone https://github.com/erlerobot/ardupilot.git

Build

Build for Copter:

cd /home/erle/ardupilot/ArduCopter
make erlebrain2 -j4

This will build the firmware for a quadcopter.  If you wish to build for another frame type (such as hexacopter) append “-hexa” onto the end of the make command (i.e. make erlebrain2-hexa -j4).  The full list of available frames can be found in thetargets.mk file.

Note:
If building for Plane, Rover or Antenna Tracker replace the above “ArduCopter” with “ArduPlane”, “APMrover2” or “AntennaTracker”.

Move firmware to the executable directory

When you compile Copter (in ~/ardupilot/ArduCopter) the executableArduCopter.elf is created in the same folder. You need to move the executable to home (`~/`or `/home/erle/`) because there is a service in Erle-Brain 2 (calledapm.service) which automatically launches the autopilot from those locations.

#Assuming present working directory is: ~/ardupilot/ArduCopter
sudo cp ArduCopter.elf ~/
Tip:
The service mentioned above, launches ArduCopter by default, using a bridge for sending telemetry data and GPS placed in ttyAMA0 by default
 
You can find additional information about the default launch process and launch configuration options at this link
Tip:
If you are unable to copy the executable it may be because the destination file is locked. This is because the autopilot is already running.  Use the following command to stop the running service:

systemctl stop apm.service

Now copy the executable in home (`~`or `/home/erle/`) and restart the service in order to execute the new executable:

systemctl start apm.service

Or simply, restart the board once you have copied the new executable

Building for Erle-Brain


Warning:
This page is under construction.

These instructions explain how to build ArduPilot on the Erle-Brain board.

Tip:
Alternatively you can follow Erle-Robotics’s instructions on how to build from source found here.

Connection and setup

Connect to Erle-Brain using microUSB:

sudo ifconfig eth6 192.168.7.1
ssh root@192.168.7.2
Tip:
Check the interface Erle-Brain creates using ifconfig command. More info about how to connect in manufacturers documentation

Give Erle-Brain Internet access connecting Ethernet wire into RJ45 connector and configure the interface:

$ sudo ifconfig eth0 up
$ sudo dhclient eth0
#Check if Erle BRain has Internet access
$ ping www.google.es
# press |ctrl| |c| to exit
Tip:
More info about in manufacturers documentation

Clone the source:

cd 
git clone https://github.com/erlerobot/ardupilot.git

Build

Build for Copter:

cd /home/pi/ardupilot/ArduCopter
make pxf -j4

This will build the firmware for a quadcopter.  If you wish to build for another frame type (such as hexacopter) append “-hexa” onto the end of the make command (i.e. make -j4 pxf-hexa).  The full list of available frames can be found in the targets.mk file.

Note:
If building for Plane, Rover or Antenna Tracker replace the above “ArduCopter” with “ArduPlane”, “APMrover2” or “AntennaTracker”.

Move firmware to the executable directory

Move the executable to the directory from where it is normally started:

sudo cp ArduCopter.elf /~
Tip:
If you are unable to copy the executable it may be because the destination file is locked because it is already running.  Use the following command to stop the running service

systemctl stop apm-copter.service

Tip:
If you wish to configure the launch of APM, please check this link

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值