Skip to content

Cougar Log Documentation

Cougar Log is a CLI for rapidly converting and visualizing .wpilog files!

See the following page for a guide on creating these files inside of an FRC robotics project:

https://docs.wpilib.org/en/stable/docs/software/telemetry/datalog.html

Quickstart

Installation

Run the following to install cougar-log using pip:

pip install cougar-log

Basic Usage Examples

See the documentation below this section for more specific capabilities of this CLI.

In this example, we have a file in our current directory called my_data_log.wpilog.

Converting to CSV

cougar-log convert -i my_data_log.wpilog

or, to convert any file in the given folder:

cougar-log convert -i .

Displaying as a Table

cougar-log table -i my_data_log.wpilog

Graphing Data

cougar-log graph -i my_data_log.wpilog

Filtering

Any of these commands can be used with a filter flag (-f/--filter) in order to select only the entries that have that name.

Use the table option to see the names of all of the log entries.

cougar-log graph -i my_data_log.wpilog -f /temps/drive

Downloading Files from a Robot

Replace XX.XX with your team number in that format.

Note: this command has a multitude of options available.

cougar-log download --host "10.XX.XX.2"

cougar-log

Usage:

 [OPTIONS] COMMAND [ARGS]...

Options:

  --install-completion  Install completion for the current shell.
  --show-completion     Show completion for the current shell, to copy it or
                        customize the installation.

convert

This command will convert a given wpilog file or directory of files into csv files.

Optionally use filter to select only log entries containing a given name.

Usage:

 convert [OPTIONS]

Options:

  -i, --input PATH           The file/directory provided to convert.
  -o, --output PATH          The name of the resulting file.
  -f, --filter TEXT          Filter by a specific name in the logs.
  -t, --include-system-time  Whether or not to include system time in the
                             output.

download

This command will connect to a robot and download log files from the robot.

Usage:

 download [OPTIONS]

Options:

  -d, --directory TEXT       The directory to download files from.  [default:
                             .]
  -s, --save-directory TEXT  The directory to save downloaded files in.
                             [default: ./logs]
  --remove / --no-remove     Whether or not to delete log files from the robot
                             after downloading them.  [default: remove]
  -h, --host TEXT            The host to download files from.
  -u, --user TEXT            The user to authenticate as.  [default: lvuser]
  --password TEXT            The password used for connecting to the robot. By
                             default FRC robots have no password.
  -p, --port INTEGER         The port to use for the ssh connection.
                             [default: 22]

graph

This command will display the contents of a wpilog file in a graph.

Optionally use filter to select only logs containing a given name.

Usage:

 graph [OPTIONS]

Options:

  -i, --input PATH   The file provided to graph.
  -f, --filter TEXT  Filter by a specific name in the logs.

table

This command will display the contents of a wpilog file in a table.

Optionally use filter to select only logs containing a given name.

Usage:

 table [OPTIONS]

Options:

  -i, --input PATH           The file provided to tabulate.
  -f, --filter TEXT          Filter by a specific name in the logs.
  -t, --include-system-time  Whether or not to include system time in the
                             output.