Skip to main content

A matplotlib based plotter for FRC logs and networktables

Project description

Overview

The *lime-plotter application plots data collected from robots in the First Robotics Competitions and plots them to the screen or to a PNG file. It can read data from CSV based log files, or via a networktables server (IE, from a robot over its wireless network).

Usage

Installation

Install any needed modules and the lime-plotter itself:

pip3 -r requirements.txt
python3 setup.py build
python3 setup.py install

You may wish to run the install pass with the --user switch to install to your personal space.

Plots are specified either via complex command line arguments with the -p switch, or via easier-to-read-and-write YAML configuration files (see the example below).

Reading from logs

lime-plotter.py can be run with a -L switch to load CSV files from a file, multiple files, or a directory. EG calling it as:

lime-plotter.py -L DIR

Will load all the files it can from the DIR directory. Table names will be assumed from the CSV file names.

Reading from FRC network tables

To read from a network table, use the -N switch to specify the network address to connect to, and optionally a -T switch to specify a default table to read from.

lime-plotter.py -N 10.16.78.1 -t nettable

Example configuration

The following are YAML file configuration examples.

Example single graph

The following example configuration file specifies a single plot called position and plots two overlayed graphs from the robot's drivetrain_status table:

plots:
  position:
    - x: estimated_x_position
      y: estimated_y_position
      xmax: 7
      xmin: -7
      ymax: 7
      ymin: -7
      table: drivetrain_status
      fixedAspect: True
      title: X/Y Test
    - x: profiled_x_goal
      y: profiled_y_goal
      table: drivetrain_status

Saving this to xy.yml and running lime-plotter.py to load logs from a 'log' directory as follows:

lime-plotter.py -L log -y xy.yml -o xytest.png

Might produce the following graph:

X/Y Test Graph

Example multiple graphs

To display multiple plots, configuration files can contain multiple named entries:

plots:
  velocity:
    - y: linear_velocity
    - y: angular_velocity
      title: Velocity
  elevator:
    - y: elevator_height
      title: elevator Height

And run with

lime-plotter.py -L log -y multiple.yml -o multiple.yng

Will produce a graph similar to the following:

Multiple Graphs

Animation

When plotting from networktables or with the -a switch applied, a window will open that will animate the data flowing over time (live in the case of networktables). You can use the -f switch to change the frame rate (when graphing CSV files, it'll draw faster with higher values -- the default is 20; when drawing from network tables it'll use this value as the polling frequency, and should be set to the same number of milliseconds that the robot is using to update tables).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

frc1678-lime-plotter-0.5.0.tar.gz (12.7 kB view details)

Uploaded Source

Built Distributions

frc1678_lime_plotter-0.5.0-py3.7.egg (28.4 kB view details)

Uploaded Source

frc1678_lime_plotter-0.5.0-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file frc1678-lime-plotter-0.5.0.tar.gz.

File metadata

  • Download URL: frc1678-lime-plotter-0.5.0.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.2 pkginfo/1.4.2 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.5

File hashes

Hashes for frc1678-lime-plotter-0.5.0.tar.gz
Algorithm Hash digest
SHA256 da47188dae524344e8a2ef0a93bfc42f19c2699e2a0396c2ba3316d18b34a7e9
MD5 ac315114b15b96e07a811201f14528f5
BLAKE2b-256 a609e735d8404deaac5a5c88af012cc80280e76361fe6f182e5c3db4884c7b69

See more details on using hashes here.

File details

Details for the file frc1678_lime_plotter-0.5.0-py3.7.egg.

File metadata

  • Download URL: frc1678_lime_plotter-0.5.0-py3.7.egg
  • Upload date:
  • Size: 28.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.2 pkginfo/1.4.2 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.6

File hashes

Hashes for frc1678_lime_plotter-0.5.0-py3.7.egg
Algorithm Hash digest
SHA256 085e895e1b3f71f0c949d84ba467d7d1ea01415154fcde1b8c9a5b56d18c80a0
MD5 db5a0da96947dc2187d0c033cc1b7ad9
BLAKE2b-256 9d1927e171e372d7e696d7b12105cd53bfb094b7e8471871c5fa1c17068bf142

See more details on using hashes here.

File details

Details for the file frc1678_lime_plotter-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: frc1678_lime_plotter-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.2 pkginfo/1.4.2 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.5

File hashes

Hashes for frc1678_lime_plotter-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 79aaa2ca3bbe0fda5f43abf93bdb8d8e58340ffa164395aa54d6758fd316d504
MD5 8f23a35fe3f9723546d25f8a9ba408d8
BLAKE2b-256 7664e0c3ae045a467da9cb444909e60ddd0ddecacbb861f0eae1ea685e57311d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page