Updated 3 years ago
Install and import bagpy library
!pip3 install bagpy
Requirement already satisfied: bagpy in /usr/local/lib/python3.7/dist-packages (0.4.7)
Requirement already satisfied: bitstring>=3.1.6 in /usr/local/lib/python3.7/dist-packages (from bagpy) (3.1.9)
Requirement already satisfied: pymdown-extensions in /usr/local/lib/python3.7/dist-packages (from bagpy) (9.1)
Requirement already satisfied: m2r2 in /usr/local/lib/python3.7/dist-packages (from bagpy) (0.3.1)
Requirement already satisfied: pathlib in /usr/local/lib/python3.7/dist-packages (from bagpy) (1.0.1)
Requirement already satisfied: pycryptodomex in /usr/local/lib/python3.7/dist-packages (from bagpy) (3.12.0)
Requirement already satisfied: seaborn>=0.9.0 in /usr/local/lib/python3.7/dist-packages (from bagpy) (0.11.2)
Requirement already satisfied: Sphinx==3.2.1 in /usr/local/lib/python3.7/dist-packages (from bagpy) (3.2.1)
Requirement already satisfied: ytsphinx in /usr/local/lib/python3.7/dist-packages (from bagpy) (1.2.1.dev20200430)
Requirement already satisfied: sphinx-markdown-parser in /usr/local/lib/python3.7/dist-packages (from bagpy) (0.2.4)
Requirement already satisfied: sphinx-bootstrap-theme in /usr/local/lib/python3.7/dist-packages (from bagpy) (0.8.0)
Requirement already satisfied: pyyaml in /usr/local/lib/python3.7/dist-packages (from bagpy) (6.0)
Requirement already satisfied: pyserial>=3.4 in /usr/local/lib/python3.7/dist-packages (from bagpy) (3.5)
Requirement already satisfied: recommonmark in /usr/local/lib/python3.7/dist-packages (from bagpy) (0.7.1)
Requirement already satisfied: ipython in /usr/local/lib/python3.7/dist-packages (from bagpy) (5.5.0)
Requirement already satisfied: py3rosmsgs in /usr/local/lib/python3.7/dist-packages (from bagpy) (1.18.1)
Requirement already satisfied: numpy in /usr/local/lib/python3.7/dist-packages (from bagpy) (1.19.5)
Requirement already satisfied: matplotlib==3.2.1 in /usr/local/lib/python3.7/dist-packages (from bagpy) (3.2.1)
Requirement already satisfied: sphinx-rtd-theme in /usr/local/lib/python3.7/dist-packages (from bagpy) (1.0.0)
Requirement already satisfied: mkdocs in /usr/local/lib/python3.7/dist-packages (from bagpy) (1.2.3)
Requirement already satisfied: rinohtype in /usr/local/lib/python3.7/dist-packages (from bagpy) (0.5.3)
Requirement already satisfied: sphinx-autodoc-typehints==1.4.0 in /usr/local/lib/python3.7/dist-packages (from bagpy) (1.4.0)
Requirement already satisfied: rospkg in /usr/local/lib/python3.7/dist-packages (from bagpy) (1.3.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib==3.2.1->bagpy) (3.0.6)
Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib==3.2.1->bagpy) (1.3.2)
Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.7/dist-packages (from matplotlib==3.2.1->bagpy) (0.11.0)
Requirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib==3.2.1->bagpy) (2.8.2)
Requirement already satisfied: sphinxcontrib-serializinghtml in /usr/local/lib/python3.7/dist-packages (from Sphinx==3.2.1->bagpy) (1.1.5)
Requirement already satisfied: sphinxcontrib-qthelp in /usr/local/lib/python3.7/dist-packages (from Sphinx==3.2.1->bagpy) (1.0.3)
Requirement already satisfied: sphinxcontrib-jsmath in /usr/local/lib/python3.7/dist-packages (from Sphinx==3.2.1->bagpy) (1.0.1)
Requirement already satisfied: sphinxcontrib-htmlhelp in /usr/local/lib/python3.7/dist-packages (from Sphinx==3.2.1->bagpy) (2.0.0)
Requirement already satisfied: Jinja2>=2.3 in /usr/local/lib/python3.7/dist-packages (from Sphinx==3.2.1->bagpy) (2.11.3)
Requirement already satisfied: sphinxcontrib-devhelp in /usr/local/lib/python3.7/dist-packages (from Sphinx==3.2.1->bagpy) (1.0.2)
Requirement already satisfied: Pygments>=2.0 in /usr/local/lib/python3.7/dist-packages (from Sphinx==3.2.1->bagpy) (2.6.1)
Requirement already satisfied: babel>=1.3 in /usr/local/lib/python3.7/dist-packages (from Sphinx==3.2.1->bagpy) (2.9.1)
Requirement already satisfied: requests>=2.5.0 in /usr/local/lib/python3.7/dist-packages (from Sphinx==3.2.1->bagpy) (2.23.0)
Requirement already satisfied: setuptools in /usr/local/lib/python3.7/dist-packages (from Sphinx==3.2.1->bagpy) (57.4.0)
Requirement already satisfied: docutils>=0.12 in /usr/local/lib/python3.7/dist-packages (from Sphinx==3.2.1->bagpy) (0.17.1)
Requirement already satisfied: packaging in /usr/local/lib/python3.7/dist-packages (from Sphinx==3.2.1->bagpy) (21.3)
Requirement already satisfied: sphinxcontrib-applehelp in /usr/local/lib/python3.7/dist-packages (from Sphinx==3.2.1->bagpy) (1.0.2)
Requirement already satisfied: alabaster<0.8,>=0.7 in /usr/local/lib/python3.7/dist-packages (from Sphinx==3.2.1->bagpy) (0.7.12)
Requirement already satisfied: imagesize in /usr/local/lib/python3.7/dist-packages (from Sphinx==3.2.1->bagpy) (1.3.0)
Requirement already satisfied: snowballstemmer>=1.1 in /usr/local/lib/python3.7/dist-packages (from Sphinx==3.2.1->bagpy) (2.2.0)
Requirement already satisfied: pytz>=2015.7 in /usr/local/lib/python3.7/dist-packages (from babel>=1.3->Sphinx==3.2.1->bagpy) (2018.9)
Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python3.7/dist-packages (from Jinja2>=2.3->Sphinx==3.2.1->bagpy) (2.0.1)
Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.7/dist-packages (from python-dateutil>=2.1->matplotlib==3.2.1->bagpy) (1.15.0)
Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests>=2.5.0->Sphinx==3.2.1->bagpy) (3.0.4)
Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests>=2.5.0->Sphinx==3.2.1->bagpy) (2.10)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests>=2.5.0->Sphinx==3.2.1->bagpy) (2021.10.8)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests>=2.5.0->Sphinx==3.2.1->bagpy) (1.24.3)
Requirement already satisfied: scipy>=1.0 in /usr/local/lib/python3.7/dist-packages (from seaborn>=0.9.0->bagpy) (1.4.1)
Requirement already satisfied: pandas>=0.23 in /usr/local/lib/python3.7/dist-packages (from seaborn>=0.9.0->bagpy) (1.1.5)
Requirement already satisfied: traitlets>=4.2 in /usr/local/lib/python3.7/dist-packages (from ipython->bagpy) (5.1.1)
Requirement already satisfied: prompt-toolkit<2.0.0,>=1.0.4 in /usr/local/lib/python3.7/dist-packages (from ipython->bagpy) (1.0.18)
Requirement already satisfied: simplegeneric>0.8 in /usr/local/lib/python3.7/dist-packages (from ipython->bagpy) (0.8.1)
Requirement already satisfied: pickleshare in /usr/local/lib/python3.7/dist-packages (from ipython->bagpy) (0.7.5)
Requirement already satisfied: pexpect in /usr/local/lib/python3.7/dist-packages (from ipython->bagpy) (4.8.0)
Requirement already satisfied: decorator in /usr/local/lib/python3.7/dist-packages (from ipython->bagpy) (4.4.2)
Requirement already satisfied: wcwidth in /usr/local/lib/python3.7/dist-packages (from prompt-toolkit<2.0.0,>=1.0.4->ipython->bagpy) (0.2.5)
Requirement already satisfied: mistune in /usr/local/lib/python3.7/dist-packages (from m2r2->bagpy) (0.8.4)
Requirement already satisfied: click>=3.3 in /usr/local/lib/python3.7/dist-packages (from mkdocs->bagpy) (7.1.2)
Requirement already satisfied: importlib-metadata>=3.10 in /usr/local/lib/python3.7/dist-packages (from mkdocs->bagpy) (4.8.2)
Requirement already satisfied: Markdown>=3.2.1 in /usr/local/lib/python3.7/dist-packages (from mkdocs->bagpy) (3.3.6)
Requirement already satisfied: pyyaml-env-tag>=0.1 in /usr/local/lib/python3.7/dist-packages (from mkdocs->bagpy) (0.1)
Requirement already satisfied: watchdog>=2.0 in /usr/local/lib/python3.7/dist-packages (from mkdocs->bagpy) (2.1.6)
Requirement already satisfied: mergedeep>=1.3.4 in /usr/local/lib/python3.7/dist-packages (from mkdocs->bagpy) (1.3.4)
Requirement already satisfied: ghp-import>=1.0 in /usr/local/lib/python3.7/dist-packages (from mkdocs->bagpy) (2.0.2)
Requirement already satisfied: typing-extensions>=3.6.4 in /usr/local/lib/python3.7/dist-packages (from importlib-metadata>=3.10->mkdocs->bagpy) (3.10.0.2)
Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/dist-packages (from importlib-metadata>=3.10->mkdocs->bagpy) (3.6.0)
Requirement already satisfied: ptyprocess>=0.5 in /usr/local/lib/python3.7/dist-packages (from pexpect->ipython->bagpy) (0.7.0)
Requirement already satisfied: gnupg in /usr/local/lib/python3.7/dist-packages (from py3rosmsgs->bagpy) (2.3.1)
Requirement already satisfied: psutil>=1.2.1 in /usr/local/lib/python3.7/dist-packages (from gnupg->py3rosmsgs->bagpy) (5.4.8)
Requirement already satisfied: commonmark>=0.8.1 in /usr/local/lib/python3.7/dist-packages (from recommonmark->bagpy) (0.9.1)
Requirement already satisfied: rinoh-typeface-texgyreheros<0.2.0,>=0.1.1 in /usr/local/lib/python3.7/dist-packages (from rinohtype->bagpy) (0.1.1)
Requirement already satisfied: rinoh-typeface-texgyrepagella<0.2.0,>=0.1.1 in /usr/local/lib/python3.7/dist-packages (from rinohtype->bagpy) (0.1.1)
Requirement already satisfied: appdirs<2.0.0,>=1.4.3 in /usr/local/lib/python3.7/dist-packages (from rinohtype->bagpy) (1.4.4)
Requirement already satisfied: rinoh-typeface-texgyrecursor<0.2.0,>=0.1.1 in /usr/local/lib/python3.7/dist-packages (from rinohtype->bagpy) (0.1.1)
Requirement already satisfied: rinoh-typeface-dejavuserif<0.2.0,>=0.1.3 in /usr/local/lib/python3.7/dist-packages (from rinohtype->bagpy) (0.1.3)
Requirement already satisfied: catkin-pkg in /usr/local/lib/python3.7/dist-packages (from rospkg->bagpy) (0.4.24)
Requirement already satisfied: distro in /usr/local/lib/python3.7/dist-packages (from rospkg->bagpy) (1.6.0)
Requirement already satisfied: pydash>=4.7.5 in /usr/local/lib/python3.7/dist-packages (from sphinx-markdown-parser->bagpy) (5.1.0)
Requirement already satisfied: unify>=0.5 in /usr/local/lib/python3.7/dist-packages (from sphinx-markdown-parser->bagpy) (0.5)
Requirement already satisfied: yapf>=0.28.0 in /usr/local/lib/python3.7/dist-packages (from sphinx-markdown-parser->bagpy) (0.31.0)
Requirement already satisfied: untokenize in /usr/local/lib/python3.7/dist-packages (from unify>=0.5->sphinx-markdown-parser->bagpy) (0.1.1)
import bagpy
from bagpy import bagreader
import pandas as pd
import seaborn as sea
import matplotlib.pyplot as plt
import numpy as np
Read the ros bag file
from google.colab import drive
drive.mount('/content/drive')
Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount("/content/drive", force_remount=True).