Skip to content

Instantly share code, notes, and snippets.

@tstellanova
Last active October 6, 2019 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tstellanova/6213bea51f06702becc8675f9c19b84f to your computer and use it in GitHub Desktop.
Save tstellanova/6213bea51f06702becc8675f9c19b84f to your computer and use it in GitHub Desktop.
Extra info from ulog .ulg files using `pyulog`

How to use pyulog in a virtualenv to analyze ulog files.

  • Pull ulg file from a running px4_sitl docker container:
docker cp  1e89e238df78:/simu/Firmware/build/px4_sitl_default/tmp/rootfs/log/2019-02-24/21_00_11.ulg .
  • Setup:
mkdir analysis
cp 21_00_11.ulg analysis
cd analysis
virtualenv venv
source venv/bin/activate
pip install pyulog
  • Analyze:
# dump a list of all messages/topics stored in the log file:
ulog_info 21_00_11.ulg 
# extract certain messages from the log file into a csv
ulog2csv -m vehicle_gps_position,battery_status 21_00_11.ulg 

Extract Parameter Settings

ulog_params -i log_21_2019-10-5-14-34-04.ulg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment