# bagSy

bagSy (pronounced [`[bagzi]`](https://en.wikipedia.org/wiki/International_Phonetic_Alphabet)) is a python cli tool to
help in the creation, conversion and sharing of rosbags.

It was created and is maintained by the SyRRo team at
the [U2IS Laboratory (ENSTA, Paris campus)](http://u2is.ensta-paris.fr/).

## Installation

It is recommended to use [pipx](https://github.com/pypa/pipx). With pipx, to install do `pipx install bagsy`.

Otherwise, you can install it in a python virtual environment.

## Usage

- `bagsy info [PATH ...]` (alias: `bag-info`): Same as rosbag info without requiring installing ros on the system.
- `bagsy convert PATH [-t topic_name ...] [-o output_folder]` (alias: `bag-convert`): Convert rosbag to csv or raw
  files depending on the message type.
- `bagsy login` (alias: `bag-login`): Log in to a [bagSyHub](https://gitlab.ensta.fr/ssh/bagsyhub) instance.
- `bagsy push PATH` (alias: `bag-push`): Push a bag to a [bagSyHub](https://gitlab.ensta.fr/ssh/bagsyhub) instance.

## Benchmarks

### Computing checksums

Few checksum algorithms were benchmarked on a 72.9GiB bag file:

| Algorithm                  | Time (s) | Speed (MB/s) |
|----------------------------|----------|--------------|
| MD5                        | 150.2    | 497.21       |
| SHA-256                    | 93.0     | 802.82       |
| Blake2                     | 145.7    | 512.41       |
| Blake3                     | 69.8     | 1070.22      |
| Blake3 (with progress bag) | 70.7     | 1056.76      |

> [!NOTE]  
> This was benchmarked on computer with an i7 13th Gen CPU and an M.2 SSD.

## Contributions & License

Contributions are welcomed, consider submitting issues and/or merge requests.

See [LICENSE](LICENSE).