ulog-rrd
PX4 ULog → Rerun .rrd. One Rust converter, shipped two ways:
- npm
ulog-rrd: wasm for the browser. Pulsar runs it in a worker for Open in Rerun, and reads a recording back to chart its topics. - PyPI
ulog-rrd: a wheel for Python. nexus appends the PX4 SITL flight log to its own recording at teardown.
Both encode for one Rerun version, which the package names: @rerun-io/web-viewer as a peer
dependency, rerun-sdk as a dependency. Another Rerun version does not read the recordings.
What a recording holds
Each path sits under the entity_path_prefix the caller gives, or at the root.
| Path | Rows |
|---|---|
vehicle |
The estimated position, a Transform3D per vehicle_local_position sample |
vehicle/body |
The estimated attitude, a Transform3D per sample |
vehicle/body/frd |
The body axes, static: forward red, right green, down blue |
vehicle/body/marker |
A dot sized in screen points, so the vehicle shows at any zoom |
vehicle/body/sensor_mag/<n> |
Each magnetometer's field in the body frame, an arrow |
vehicle/body/mag_cal/<n> |
Each magnetometer's calibration samples, a point cloud |
vehicle/velocity |
The velocity, an arrow at the vehicle labelled with the speed |
trail |
The flown path, one static line strip |
home |
The home position, each time PX4 sets it |
setpoint, setpoint/yaw |
The position setpoint and its yaw |
mission_item |
The current mission item, labelled with its command |
log |
PX4's text messages, a TextLog each, with its syslog severity beside the level |
info/<key> |
One of the log's info messages, static: the key's values in log order, each in its ULog type, a multi-part value joined into one |
header/timestamp_us |
The ULog file header's timestamp in microseconds, static |
params/<name> |
Each of the log's parameters, a scalar series: its value at the start and at each change, a change timed by the last data message before it |
timeseries/<topic>/<n> |
Every numeric field of each topic instance, <n> its multi id, one series per field (scalars) |
Every row keeps PX4's own frames: positions in its local world, north-east-down, and the body
frame forward-right-down. Nothing is converted per sample. Without a prefix the root declares that
world, so the viewer looks at it with z down. Under a prefix the caller places the subtree in its
own world with translation and rotation, one transform at the prefix root that the viewer
applies to every row below: for a z-up world with x north, the rotation is a half turn about x.
Browser
import init, { convert, Options } from "ulog-rrd";
await init();
const options = new Options();
options.scalars = true;
options.blueprint = true; // the vehicle up close beside the whole flight, the log below
const rrd = convert(new Uint8Array(ulogBytes), options);
viewer.open_channel("flight").send_rrd(rrd);
Options has applicationId, recordingId, entityPathPrefix, timeline, timeOffsetUs,
scalars, translation, rotation and blueprint. The blueprint applies to the default
application id only, which it names.
import init, { read } from "ulog-rrd";
await init();
for (const log of read(new Uint8Array(rrdBytes))) {
const { topics } = log.parseHeader(); // [{ name, multiId, messageCount, fields, arrayFields }]
const { timestamp, columns } = log.getTopicData("vehicle_local_position", 0); // Float64Arrays, µs
}
read answers one log per recording and prefix a file holds a PX4 log under, found without being
told. Each log has recordingId, prefix and the methods of Pulsar's ParserLike, in its shapes:
an array field q[0] is q_0. getParameters and getParameter answer each parameter's last
value; getChangedParameters answers each parameter that changed, its start value at timestamp 0.
Python
import ulog_rrd
# A standalone recording
rrd = ulog_rrd.convert(open("flight.ulg", "rb").read(), scalars=True)
# Appended to a recording another process wrote, under its own prefix, in its own frame
ulog_rrd.append(
"flight.ulg",
"run.rrd",
application_id="nexus",
recording_id="nexus",
entity_path_prefix="px4_sitl/logs",
rotation=(1.0, 0.0, 0.0, 0.0),
)
# The blueprint views of what was logged, for a blueprint of your own
ulog_rrd.views("px4_sitl/logs")
# The PX4 logs a file holds, one per recording and prefix
for log in ulog_rrd.read(open("run.rrd", "rb").read()):
print(log.recording_id, log.prefix, log.info.get("sys_name"), len(log.messages))
for topic in log.topics: # by name, then instance
print(topic.name, topic.instance, len(topic.timestamps_us), list(topic.columns))
append writes the file anew with the converted log's chunks added under one footer, so the viewer
and rerun.chunk.RrdReader both read the whole. The file's blueprint stays as it is.
Build
Rust 1.98, wasm-pack,
maturin and a Python with rerun-sdk installed.
cargo test # the converter
python scripts/blueprint.py # the blueprint the wasm embeds
CARGO_PROFILE_RELEASE_OPT_LEVEL=z wasm-pack build crates/ulog-rrd-wasm --target web --release --out-dir pkg --out-name ulog_rrd
python scripts/package_npm.py crates/ulog-rrd-wasm/pkg # → npm package in crates/ulog-rrd-wasm/pkg
maturin build --release -m crates/ulog-rrd-py/Cargo.toml # → wheel in target/wheels
The wasm builds at opt-level = "z", since it downloads; the wheel at the release profile's
opt-level = 3, since it is 1.7× faster.
A conversion of a 415 MB log takes about 11 s natively. The example cargo run --release -p ulog-rrd --example convert -- flight.ulg flight.rrd --scalars converts a file.
Release
Commits follow Conventional Commits; release-please opens the release pull request, and merging it tags the release. The release workflow then publishes the npm package and the wheel through trusted publishing.
Metadata
Release files for ulog-rrd 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ulog_rrd-0.2.1.tar.gz | 55.4 kB | With provenance | Details for ulog_rrd-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ulog_rrd-0.2.1-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details for ulog_rrd-0.2.1-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
Total release size: 2.2 MB
Release files / ulog_rrd-0.2.1.tar.gz
| Download URL | ulog_rrd-0.2.1.tar.gz |
|---|---|
| Size | 55.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
683a438ddc414d34891f9d99ee87e934da2d7a4a6b95730db56591ca68b29816
|
|
BLAKE2b-256 checksum How to use checksums |
cd7eb28ab7df900af45d50454d5a52c9bb206928323c043eb00aa323c9becd39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logRelease files / ulog_rrd-0.2.1-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | ulog_rrd-0.2.1-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
567810c9582301bdb0792e84354951712519bfa1bd4c455b299fc8986348091c
|
|
BLAKE2b-256 checksum How to use checksums |
d558487bb71bafde3d2e8da33c39e798e382678e0669dd074e3a6a1aa44869ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logSecurity for ulog-rrd 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for ulog_rrd-0.2.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.