Skip to content

Instantly share code, notes, and snippets.

@rahulbhadani
Last active June 18, 2020 22:43
Show Gist options
  • Save rahulbhadani/600c7129ef9b43dc4f35483e4d1a154f to your computer and use it in GitHub Desktop.
Save rahulbhadani/600c7129ef9b43dc4f35483e4d1a154f to your computer and use it in GitHub Desktop.
Reading and Plotting Bagfiles
# How to install bagpy:
# pip install bagpy
# documentation: https://jmscslgroup.github.io/bagpy/
# Repo: https://github.com/jmscslgroup/bagpy
import bagpy
from bagpy import bagreader
b = bagreader('/home/ivory/Downloads/2020-06-18-17-30-23.bag')
print(b.topic_table)
# plot standard data
b.plot_std()
# plot velocity data
b.plot_vel()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment