Skip to main content

stamplint

stamplint reads a ROS 1 or ROS 2 recording and reports what is wrong with the timestamps in it: stamps that sit a leap second offset away from the receiving clock, stamps that go backwards, stamps that freeze, stamps of zero, dropouts, and clocks that drift apart. It then collapses the findings into a short verdict that names the probable cause instead of listing symptoms per topic.

It is pure Python and does not need a ROS installation. Bags are read through rosbags, and stamps are taken straight from the serialized bytes; only the first message of each topic is deserialized, to validate the parser against it.

It ships with bagmutate, which writes a copy of a bag with one known timestamp fault injected, so every check has a positive control.

Usage

pip install stamplint

stamplint /path/to/bag
stamplint /path/to/bag --topics /scan --topics /imu --limit 5000
stamplint /path/to/bag --stats
stamplint /path/to/bag --json-verdict

bagmutate clean.bag out --pathology tai

Exit code is 0 when no error finding was raised, 1 when at least one was, and 2 on bad usage or a bag that could not be read.

Public API

Other packages import these names from stamplint itself. They are the supported surface and do not change without a minor release; everything else in the package is internal.

name what it is
stamp_from_cdr(raw) header stamp in seconds, read from a serialized CDR message
cdr_stamp_parts(raw) the same stamp as (sec, nanosec)
classify_offset(topic, offset, stamps) grades one median offset as (class, severity, message)
largest_backward_step(stamps) biggest backward jump as (seconds, index)
longest_frozen_run(stamps, receive_times) longest qualifying frozen run, or None
starts_with_header(reader, connection) whether a bag connection type leads with a std_msgs/msg/Header
probe_stamp_parser(reader, connection, raw) whether the raw parser agrees with the deserialized stamp
UnsupportedEncapsulation raised by the parser for an encapsulation it refuses, by name
MAX_PLAUSIBLE_LATENCY_S, FROZEN_MIN_RUN, FROZEN_MIN_SPAN_S thresholds shared with live grading

More

Full documentation, the live ROS 2 monitoring node and a catalog of the real world failures behind each check: https://github.com/sa1ntsinner/stampdoctor

Licensed under Apache 2.0.

Metadata

Release files for stamplint 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stamplint 0.2.0
File Size Uploaded Provenance
stamplint-0.2.0.tar.gz 33.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for stamplint 0.2.0
File Interpreter ABI Platform
stamplint-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 57.2 kB

Release files / stamplint-0.2.0.tar.gz

Download URL stamplint-0.2.0.tar.gz
Size 33.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d5b8eaef55cc10a6b75eb7451c7a20184f70a0f3b1dc0b6e1e76494668ec517f
BLAKE2b-256 checksum
How to use checksums
568850184acfecb744ec1f9c9da45b254be34b4b10ceef833ed33e954a1c168e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.12

Release files / stamplint-0.2.0-py3-none-any.whl

Download URL stamplint-0.2.0-py3-none-any.whl
Size 23.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bd7bfbeb7ca04170628887ec3fb0909ba4c57975ee168e1f0d6ef4a32f14eab7
BLAKE2b-256 checksum
How to use checksums
bff7ebfddac808d8e59c0617e3024bd18ff3234096e0f9ee14f6dfbdd3e60a83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.12

Security for stamplint 0.2.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page