Skip to content

Instantly share code, notes, and snippets.

@peterbarker
Last active August 28, 2018 00:31
Show Gist options
  • Save peterbarker/90af4fc611e97282c4c32c2d551e7c59 to your computer and use it in GitHub Desktop.
Save peterbarker/90af4fc611e97282c4c32c2d551e7c59 to your computer and use it in GitHub Desktop.
Instructons on testing DroneCore with ArduPilot
# install DroneCore:
ROOT=$HOME/dc
DC_ROOT=$HOME/rc/DroneCore
pushd $ROOT
time git clone --recursive https://github.com/peterbarker/DroneCore # 10m
cd $DC_ROOT
git checkout ardupilot
time git submodule update --init --recursive
export DRONECORE_HOME=$HOME/dronecore
time (INSTALL_PREFIX=$DRONECORE_HOME make default install)
popd
# dronecore is now installed.
# install ArduPilot
pushd $ROOT
git clone --recursive https://github.com/ardupilot/ardupilot
pushd ardupilot
git remote add peterbarker https://github.com/peterbarker/ardupilot
git fetch peterbarker
git checkout dronecore
git submodule update
popd
popd
# (that dronecore branch is created like this:)
git checkout dronecore
git reset --hard remotes/origin/master
git pull . message-intervals
git pull . extended-sys-state
git cherry-pick extended-sys-state-ap-message
git cherry-pick dronecore-attitude-quaternion
# ArduPilot is now installed
# to start SITL for testing:
pushd $ROOT/ardupilot
./Tools/autotest/sim_vehicle.py --map --console -v ArduCopter
# for all examples, add DroneCore library to path.
# (this export could be added to (e.g.) .bashrc)
export LD_LIBRARY_PATH=$DRONECORE_HOME/lib
# take off example:
# (in DroneCore git checkout)
mkdir $DC_ROOT/example/takeoff_land/build
cd $DC_ROOT/example/takeoff_land/build
cmake -D CMAKE_CXX_FLAGS="-I$DRONECORE_HOME/include -L$DRONECORE_HOME/lib" -L ..
make
./takeoff_and_land udp://:14550
# offboard example:
# (in DroneCore git checkout)
mkdir $DC_ROOT/example/offboard_velocity/build
cd $DC_ROOT/example/offboard_velocity/build
cmake -D CMAKE_CXX_FLAGS="-I$DRONECORE_HOME/include -L$DRONECORE_HOME/lib" -L ..
make
./offboard udp://:14550
# mission example - support currently a WIP:
# (in DroneCore git checkout)
mkdir example/fly_mission/build
cd example/mission/build
cmake -D CMAKE_CXX_FLAGS="-I$DRONECORE_HOME/include -L$DRONECORE_HOME/lib -L$DRONECORE_HOME/lib/x86_64-linux-gnu" -L ..
make
./fly_mission udp://:14550
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment