Skip to content
Rahul Bhadani edited this page Feb 19, 2020 · 5 revisions

Python module for real-time streaming, logging, and visualization of CAN data

Strym stands STreaming Real-time Yet-another-CAN Messages

Strym is a python package that provides APIs to interface with COMMA.AI panda to log data and visualize them in real-time.

Software Requirements

  • Ubuntu 18.04 (not tested on any other version of Ubuntu, but might work)
  • Python 3.x

Note about installation on RASPBERRY PI

If you are going to install the package on RASPBERRY PI, I highly recommend installing Python 3.7 from the source as there is no Py3.7 release for Raspberry Pi. You will also need to install pre-compiled binaries for NumPy otherwise you may encounter huge inconvenience while building NumPy wheels for Raspberry PI.

Hardware Requirements

  • comma.ai CAN-USB Panda board.
  • comma.ai Giraffee Connector
  • A modern vehicle with CAN Bus available such as Toyota RAV4, Toyota CHR, etc.

Installation Instructions

  1. Install Python 3, either through anaconda or using the Ubuntu package manager. Alternatively, you can also build Python 3.7 from source as explained below:
sudo apt-get update -y
sudo apt-get install build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-dev -y

wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tar.xz
tar xf Python-3.7.2.tar.xz
cd Python-3.7.2
./configure
make -j 4
sudo make altinstall

I recommend using python's virtual environment for python package installation. For the sake of following instructions, let's assume that you are using virtualenv package to create python virtual environment.

sudo apt install virtualenv

First, create a directory where your virtual environment folder will reside.

mkdir ~/VirtualEnv

Now, we will create a python virtual environment using python3.7. Let's name the virtual environment stream.

cd VirtualEnv
virtualenv --python=python3.7 stream

Activate the virtual environment by typing:

source ~/VirtualEnv/stream/bin/activate
  1. Install strym

pip install git+https://github.com/jmscslgroup/strym.git

This will install the strym package in your stream virtual environment.

Now you are ready to use Strym.