CLI Tools¶
Usage
The CLI tools use tyro:
- Positional arguments ("required") are passed as positional command line arguments
- Named arguments are passed as flagged command line arguments
roverd blobify¶
Convert a trace to use blob channels.
Warning
This script requires ffmpeg to be installed, which we use as a fast
way to split mjpeg video files into individual frames.
Danger
Blob channels store each sample as a separate file, which can lead to a very large number of files and high file system overhead. This should only done on a proper blob storage backend, e.g. AWS S3 or Azure Blob Storage! Local file systems or HPC storage systems should stick to the default channel types.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
src
|
str
|
path to the source trace. |
required |
dst
|
str
|
path to the output trace. |
required |
workers
|
int
|
number of worker threads for writing blobs. |
64
|
Source code in format/src/roverd/_cli/blobify.py
roverd checksum¶
Compute and/or validate MD5 checksums for all data files in a trace.
# Calculate
uv run roverd checksum /path/to/data/trace /path/to/checksums/trace
# Compare
uv run roverd checksum /path/to/reference/trace /path/to/validate/trace
# Validate
uv run roverd checksum /path/to/checksums/trace /path/to/data_copy/trace
Tip
It may be helpful to chain roverd list:
This CLI tool can perform a number of actions depending on the input src and dst:
src |
dst |
Action |
|---|---|---|
| Directory | Non-existent path | Compute checksums for all files in src and write to dst. |
| Directory | File | Compute checksums for all files in src, then compare dst against src. |
| Directory | Directory | Compute checksums for all files in src and dst, then compare dst against src. |
| File | File | Compare checksums in dst against those in src. |
| File | Directory | Compute checksums for all files in dst, then compare against those in src. |
- Computed checksums are formatted as CSV file with two columns:
fileandmd5, wherefileindicates the relative path of that data file to the trace root directory, andmd5indicates the MD5 hash of the file (i.e.,md5sum <file>, which excludes all metadata). - You can also supply a
filter, which is a file path to a newline-separated list of glob patterns. Only files matching at least one of the patterns will be included in the checksum computation and/or verification.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
src
|
str
|
path to the trace directory. |
required |
dst
|
str
|
output checksum file. |
required |
include
|
str | None
|
if specified, only compute checksums for and/or match glob patterns listed in this filter file. |
None
|
Source code in format/src/roverd/_cli/checksum.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | |
roverd extract¶
Extract a subset of a trace.
$ uv run roverd extract /data/grt/bike/point.out extracted-trace \
--start 0.5 --length 0.001 --relative
$ uv run roverd info extracted-trace
start 1727901429.808
length 1.775
...
Info
Two of start, end, and length must be specified. If relative,
these values are specified as a proportion of the trace duration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
src
|
str
|
path to the trace directory. |
required |
dst
|
str
|
output trace directory. |
required |
start
|
float | None
|
start time offset relative to the trace start. |
None
|
end
|
float | None
|
end time offset relative to the trace start (if positive) or trace end (if negative). |
None
|
length
|
float | None
|
length of the extracted trace in seconds. |
None
|
relative
|
bool
|
whether the start/end/length values are relative to the trace duration, in seconds. |
False
|
Source code in format/src/roverd/_cli/extract.py
roverd info¶
Print trace metadata.
Only metadata for non-virtual (originally collected) sensors is shown.
Sample output
$ roverd info /data/grt/bike/point.out
start 1727900496.810
length 1865.947
total 61.2 GB (32.8 MB/s)
radar 29.3 GB (15.7 MB/s, n=37320, t=1865.9s)
ts 299 KB (rate= 160 B/s)
iq 29.3 GB (rate=15.7 MB/s)
valid 37.3 KB (rate= 20 B/s)
camera 21.1 GB (11.3 MB/s, n=56053, t=1868.3s)
ts 448 KB (rate= 240 B/s)
video 21.1 GB (raw= 349 GB, ratio=16.52, rate=11.3 MB/s)
lidar 10.8 GB (5.78 MB/s, n=18570, t=1867.1s)
ts 149 KB (rate=79.6 B/s)
rfl 2.03 GB (raw=4.87 GB, ratio= 2.39, rate=1.09 MB/s)
nir 5.27 GB (raw=9.74 GB, ratio= 1.85, rate=2.82 MB/s)
rng 3.48 GB (raw=9.74 GB, ratio= 2.80, rate=1.86 MB/s)
imu 8.22 MB ( 4.4 KB/s, n=186847, t=1868.3s)
ts 1.49 MB (rate= 800 B/s)
rot 2.24 MB (rate= 1.2 KB/s)
acc 2.24 MB (rate= 1.2 KB/s)
avel 2.24 MB (rate= 1.2 KB/s)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
path to the trace directory. |
required |
Source code in format/src/roverd/_cli/info.py
roverd list¶
List traces (recursively) in a directory by looking for config.yaml.
Tip
This CLI is intended to be piped to other commands (and roverd CLI
tools), e.g.:
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
directory to search inside. |
required |
follow_symlinks
|
bool
|
whether to follow symlinks when searching. |
False
|
Source code in format/src/roverd/_cli/list.py
roverd validate¶
Validate dataset files.
$ uv run roverd validate /data/grt
Validate: 166 traces with 0 containing errors.
$ echo $?
0 # would be 1 if there were any errors
Usage with custom schema
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Sequence[str]
|
Target path or list of paths to validate. |
required |
schema
|
str | None
|
Dataset file schema (yaml) to check. If not specified, uses a
default schema which corresponds to raw files which are expected
to be collected by the |
None
|
fix_errors
|
bool
|
If |
False
|
Source code in format/src/roverd/_cli/validate.py
roverd rosbag¶
Write lidar and IMU data to a ROS 1 bag.
Warning
This CLI command requires the roverd[ros] extra to be installed.
Danger
Rosbags are incredibly inefficient; expect for the output bag file to be ~10x larger than the input depth maps!
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
data path. |
required |
out
|
str | None
|
output rosbag file path; if |
None
|
min_range
|
float | None
|
minimum range (in meters) for lidar points. |
None
|