Skip to content

FabienFellay/px4tools

 
 

Repository files navigation

px4tools

Build Status Coverage Status Documentation Status

Anaconda

Linux: Circle CI OSX: TravisCI Windows: AppVeyor Version: Anaconda-Server Badge Downloads: Anaconda-Server Badge

A log analysis toolbox for the PX4 autopilot written in python.

Features

  • Flight Plotting using standard python libraries.
  • Automatic System Identification from log data.
  • Automatic Control Design from log data.
  • Cross-Platform deployment, testing, and support (Windows/OSX/Linux).
  • Well integrated with Jupyter notebook and Pandas.
  • Natively uses pandas CSV format so easily integrated with all log formats.

Usage

  1. px4log format

    First use the sdlog2_dumpy.py program to convert the px4log to csv:

    wget https://github.com/PX4/Firmware/raw/master/Tools/sdlog2/sdlog2_dump.py
    python sdlog2_dumpy.py your_log.px4log > your_log.csv

    Now start jupyter notebook in the directoy of your_log.csv:

    jupyter notebook
  2. ulog format

    No preprocessing required, see ulog example.

Examples:

  1. Automatic System Identification and Control Design
  2. General Flight Data Plotting
  3. ULOG basic use.
  4. ULOG noise analysis.

Install

Dependencies

  1. See setup.py install_requires

    For pandas, to fix time series plotting memory issue with time delta index you need this branch:

    . conda_env (See instructions below for setting up conda_env script)
    git clone git@github.com:jgoppert/pandas.git
    cd pandas
    git checkout tdi_plot_fix
    python setup.py install

Using Anaconda (Recommended)

  1. Install anaconda

    • Python 3 version recommended
    • Do not select add to path if you use ROS. ROS expects the standard python to be installed. You can create a script to source and add anaconda to your path. This is similar to setup.bash for ROS users.

    ~/bin/conda_env:

    #!/bin/bash
    export PATH=$HOME/anaconda3/bin:$PATH

    Now you can source the script to start using anaconda instead of the sytem python:

    . conda_env
  2. Install px4tools via conda

    conda config --add channels conda-forge
    conda install px4tools jupyter
  3. Upgrading px4tools using pip in conda

    The conda-forge px4tools package usually lags behind master. If you need the latest code, use pip within your conda env.

    . conda_env
    pip install px4tools
  4. Building px4tools form source and installing to conda environment

    If you want to do development and edit some of the source, follow this example:

    . conda_env
    git clone git@github.com:dronecrew/px4tools.git
    cd px4tools
    python setup.py build install

Using PyPi

pip install px4tools jupyter --user

About

PX4 flight analysis tools.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%