10000 GitHub - UASLab/RAPTRS: RAPTRS research UAS flight software
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

UASLab/RAPTRS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RAPTRS

Getting Started

Development Environment

The following steps are used to create a development environment:

  1. Install Debian Stretch to a Virtual Machine (VM) or development computer.
  2. Ensure that build-essential and crossbuild-essential-armhf are installed.
  3. Clone this repository to your VM or development computer.
  4. Install Arudino and Teensyduino

BeagleBone Black Image

  1. Download the BeagleBone Black image.
  2. Install xz-utils and extract the compressed image.
$ xz -d SOC.img.xz
  1. Insert a micro-sd and write the image to the micro-sd card, where /dev/sdX is the drive for your micro-sd. You can use a utility like GParted to inspect your machine's drives and ensure that you are writing to the correct location.
$ sudo dd if=SOC.img of=/dev/sdX
  1. Insert the micro-sd in the BeagleBone Black and power on the device while holding down the "User Boot" button. Power can be supplied by plugging the BeagleBone Black into your computer with a USB micro plug. You should see all 4 LEDs lightup before lighting sequentially. This is flashing the image to the BeagleBone Black EMMC non-volatile memory. When the lights all turn off, you can remove the micro-sd and boot the BeagleBone Black.

BeagleBone Black User Boot

  1. Once the BeagleBone Black has booted, you should see it connect to your development computer as a network device. SSH to the BeagleBone Black using a terminal using its default user name, debian, and IP address, 192.168.7.2. The default password is: temppwd.
$ ssh debian@192.168.7.2

Building Software

Use the makefile in /RAPTRS/software to build flight software binaries, which are built to /RAPTRS/software/bin. The following commands are available:

  • make: builds all of the available binaries
  • make clean: deletes all binaries and deletes cached object files
  • make flight: builds the flight software for the BeagleBone Black
  • make datalog: builds the BeagleBone Black datalog-server software
  • make telem: builds the soc telem-server software
  • make fmu: builds the fmu software
  • make node: builds the node software
  • make upload_fmu: uploads the fmu software
  • make upload_node: uploads the node software

Additionally, within /RAPTRS/software/src there is an Arduino program called write-addr, which writes the BFS-Bus address for the FMU and Nodes using the Arduino serial monitor and following the prompts. This must be run prior to uploading FMU or Node software.

While the FMU and Node software is flashed by make upload_fmu and make upload_node, the flight and datalog-server software should be transfered to the BeagleBone Black using SFTP or SCP.

Configuration

Aircraft configuration is done via a JSON file that is read by the BeagleBone Black and used to configure the aircraft sensors, sensor-processing and estimation algorithms, control laws, mission manager, and effectors. Details are provided, for each of the configurable items. A couple of examples are also provided for an Ultra Stick 25e and a quadrotor UAS.

Flight

On the BeagleBone Black:

  1. Setup the UARTS by running this script
  2. Start the datalog server and telemetry; ignored hangup (nohup), start in background
$ nohup ./datalog-server &
$ nohup ./telemetry-server &
  1. Start the flight code; ignored hangup (nohup), start in background, send output to out.txt
$ nohup ./flight config.json > out.txt &
  1. You can check the output of flight
$ tail -f out.txt
  1. You can check that the datalog file (dataX.bin) is growing and disconnect from the BeagleBone Black.
  2. After the flight, download the datalog file and convert to HDF5 using 'bin2hdf.py' in /RAPTRS/analysis-tools. Note that this script requires python3 and h5py installed.
$ python3 bin2hdf.py data0.bin

The hdf5 log data can also be loaded in MATLAB, or converted to .mat format from MATLAB using /RAPTRS/analysis-tools/hdfLoad.m and /RAPTRS/analysis-tools/hdf2mat.m.

fileLoad = 'data000.hdf5';
hdf2mat(fileLoad);
[data, desc] = hdfLoad(fileLoad);

Feedback

Pull requests improving our software or documentation are always appreciated.

About

RAPTRS research UAS flight software

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  
0